25#include <boost/program_options.hpp>
27namespace po = boost::program_options;
29#include <boost/numeric/ublas/vector_proxy.hpp>
30#include <boost/numeric/ublas/matrix.hpp>
31#include <boost/numeric/ublas/matrix_proxy.hpp>
32#include <boost/numeric/ublas/vector.hpp>
33#include <boost/numeric/ublas/symmetric.hpp>
45#error "MoFEM need to be compiled with ADOL-C"
47#include <adolc/adolc.h>
51#include <adolc/adolc.h>
61using namespace boost::numeric;
70int main(
int argc,
char *argv[]) {
77 ParallelComm* pcomm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
78 if(pcomm == NULL) pcomm =
new ParallelComm(&moab,PETSC_COMM_WORLD);
80 PetscBool flg = PETSC_TRUE;
83 if(flg != PETSC_TRUE) {
84 SETERRQ(PETSC_COMM_SELF,1,
"*** ERROR -my_file (MESH FILE NEEDED)");
89 if(flg != PETSC_TRUE) {
92 PetscInt bubble_order;
94 if(flg != PETSC_TRUE) {
100 PetscBool is_partitioned = PETSC_FALSE;
104 double mygiven_strain[6];
108 given_strain.resize(6);
109 cblas_dcopy(6, &mygiven_strain[0], 1, &given_strain(0), 1);
110 cout<<
"given_strain ="<<given_strain<<endl;
113 if(is_partitioned == PETSC_TRUE) {
115 option =
"PARALLEL=BCAST_DELETE;PARALLEL_RESOLVE_SHARED_ENTS;PARTITION=PARALLEL_PARTITION;";
202 PetscPrintf(PETSC_COMM_WORLD,
"young_modulus = %4.2e \n",
young_modulus);
203 PetscPrintf(PETSC_COMM_WORLD,
"poisson_ratio = %4.2e \n",
poisson_ratio);
204 PetscPrintf(PETSC_COMM_WORLD,
"sIgma_y = %4.2e \n",cp.
sIgma_y);
205 PetscPrintf(PETSC_COMM_WORLD,
"H = %4.2e \n",cp.
H);
206 PetscPrintf(PETSC_COMM_WORLD,
"K = %4.2e \n",cp.
K);
207 PetscPrintf(PETSC_COMM_WORLD,
"phi = %4.2e \n",cp.
phi);
210 cp.
sTrain.resize(6,
false);
230 vector<BitRefLevel> bit_levels;
233 int def_meshset_info[2] = {0,0};
234 rval = moab.tag_get_handle(
235 "MESHSET_INFO",2,MB_TYPE_INTEGER,th_meshset_info,MB_TAG_CREAT|MB_TAG_SPARSE,&def_meshset_info
238 EntityHandle root = moab.get_root_set();
240 if(meshset_data[0]==0) {
245 bit_levels.push_back(
BitRefLevel().set(meshset_data[0]-1));
249 EntityHandle out_meshset;
252 ierr = m_field.get_entities_by_ref_level(bit_levels.back(),
BitRefLevel().set(),out_meshset); CHKERRQ(
ierr);
253 Range LatestRefinedTets;
254 rval = moab.get_entities_by_type(out_meshset, MBTET,LatestRefinedTets,
true);
CHKERRQ_MOAB(
rval);
255 Range LatestRefinedPrisms;
256 rval = moab.get_entities_by_type(out_meshset, MBPRISM,LatestRefinedPrisms,
true);
CHKERRQ_MOAB(
rval);
258 cout<<
"========================== LatestRefinedPrisms "<<LatestRefinedPrisms.size()<<endl;
259 cout<<
"========================== LatestRefinedTets "<<LatestRefinedTets.size()<<endl;
271 Range prims_on_problem_bit_level;
272 ierr = m_field.get_entities_by_type_and_ref_level(
273 problem_bit_level,
BitRefLevel().set(),MBPRISM,prims_on_problem_bit_level
275 Range tets_on_problem_bit_level;
276 ierr = m_field.get_entities_by_type_and_ref_level(
277 problem_bit_level,
BitRefLevel().set(),MBTET,tets_on_problem_bit_level
281 EntityHandle meshset_prims_on_problem_bit_level;
283 rval = moab.add_entities(meshset_prims_on_problem_bit_level,prims_on_problem_bit_level);
CHKERRQ_MOAB(
rval);
284 ierr = m_field.seed_ref_level_MESHSET(meshset_prims_on_problem_bit_level,
BitRefLevel().set()); CHKERRQ(
ierr);
297 if(it->getName().compare(0,12,
"AllBoundSurf") == 0 || it->getMeshsetId() == 103) {
325 ierr = m_field.
loop_dofs(
"MESH_NODE_POSITIONS",ent_method_material,0); CHKERRQ(
ierr);
339 if(it->getName() !=
"MAT_PLASTIC")
continue;
340 EntityHandle meshset = it->getMeshset();
341 int id = it->getMeshsetId();
344 meshset,MBTET,newtets,
true
348 newtets = intersect(newtets,LatestRefinedTets);
349 ierr = m_field.seed_finite_elements(newtets); CHKERRQ(
ierr);
363 std::map<int,boost::shared_ptr<SmallStrainTranverslyIsotropicADouble> > tranversly_isotropic_adouble_ptr_map;
364 std::map<int,boost::shared_ptr<SmallStrainTranverslyIsotropicDouble> > tranversly_isotropic_double_ptr_map;
365 bool trans_iso_blocks =
false;
368 string name = it->getName();
369 if (name.compare(0,20,
"MAT_ELASTIC_TRANSISO") == 0) {
370 cout<<
"================================ it is MAT_ELASTIC_TRANSISO "<<endl;
371 trans_iso_blocks =
true;
372 int id = it->getMeshsetId();
374 ierr = it->getAttributeDataStructure(mydata); CHKERRQ(
ierr);
375 tranversly_isotropic_adouble_ptr_map[id] = boost::make_shared<SmallStrainTranverslyIsotropicADouble>();
376 tranversly_isotropic_double_ptr_map[id] = boost::make_shared<SmallStrainTranverslyIsotropicDouble>();
378 tranversly_isotropic_adouble_ptr_map.at(
id)->E_p = mydata.
data.Youngp;
379 tranversly_isotropic_double_ptr_map.at(
id)->E_p = mydata.
data.Youngp;
380 tranversly_isotropic_adouble_ptr_map.at(
id)->E_z = mydata.
data.Youngz;
381 tranversly_isotropic_double_ptr_map.at(
id)->E_z = mydata.
data.Youngz;
382 tranversly_isotropic_adouble_ptr_map.at(
id)->nu_p = mydata.
data.Poissonp;
383 tranversly_isotropic_double_ptr_map.at(
id)->nu_p = mydata.
data.Poissonp;
384 tranversly_isotropic_adouble_ptr_map.at(
id)->nu_pz = mydata.
data.Poissonpz;
385 tranversly_isotropic_double_ptr_map.at(
id)->nu_pz = mydata.
data.Poissonpz;
387 if(mydata.
data.Shearzp!=0) {
388 shear_zp = mydata.
data.Shearzp;
390 shear_zp = mydata.
data.Youngz/(2*(1+mydata.
data.Poissonpz));
392 tranversly_isotropic_adouble_ptr_map.at(it->getMeshsetId())->G_zp = shear_zp;
393 tranversly_isotropic_double_ptr_map.at(it->getMeshsetId())->G_zp = shear_zp;
395 EntityHandle meshset = it->getMeshset();
397 meshset,MBTET,trans_elastic.
setOfBlocks[
id].tEts,
true
410 trans_elastic.
setOfBlocks[id].materialDoublePtr = tranversly_isotropic_double_ptr_map.at(
id);
411 trans_elastic.
setOfBlocks[id].materialAdoublePtr = tranversly_isotropic_adouble_ptr_map.at(
id);
428 map<int,NonlinearElasticElement::BlockData>::iterator sit = trans_elastic.
setOfBlocks.begin();
441 map<int,NonlinearElasticElement::BlockData>::iterator sit = trans_elastic.
setOfBlocks.begin();
471 boost::ptr_vector<CohesiveInterfaceElement::PhysicalEquation> interface_materials;
477 double interface_beta, interface_ft, interface_Gf, interface_h;
484 cout << endl << *it << endl;
486 string name = it->getName();
487 if (name.compare(0,10,
"MAT_INTERF") == 0) {
489 ierr = it->getAttributeDataStructure(mydata); CHKERRQ(
ierr);
493 interface_materials.back().youngModulus = mydata.
data.alpha;
498 interface_materials.back().h = interface_h;
499 interface_materials.back().beta = interface_beta;
500 interface_materials.back().ft = interface_ft;
501 interface_materials.back().Gf = interface_Gf;
503 EntityHandle meshset = it->getMeshset();
508 interface_materials.back().pRisms = ents3d.subset_by_type(MBPRISM);
514 boost::ptr_vector<CohesiveInterfaceElement::PhysicalEquation>::iterator pit = interface_materials.begin();
515 for(; pit != interface_materials.end();pit++) {
520 ierr = cohesive_elements.
addOps(
"DISPLACEMENT",interface_materials); CHKERRQ(
ierr);
524 lagrangian_element_disp.
addLagrangiangElement(
"LAGRANGE_ELEM",
"DISPLACEMENT",
"LAGRANGE_MUL_DISP",
"MESH_NODE_POSITIONS");
535 DMType dm_name =
"PLASTIC_PROB";
539 ierr = DMCreate(PETSC_COMM_WORLD,&dm);CHKERRQ(
ierr);
540 ierr = DMSetType(dm,dm_name);CHKERRQ(
ierr);
544 ierr = DMSetFromOptions(dm); CHKERRQ(
ierr);
558 ierr = VecDuplicate(
D,&F); CHKERRQ(
ierr);
561 ierr = VecGhostUpdateBegin(
D,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(
ierr);
562 ierr = VecGhostUpdateEnd(
D,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(
ierr);
564 ierr = MatZeroEntries(Aij); CHKERRQ(
ierr);
567 for(
int ii = 0;ii<6;ii++) {
568 ierr = VecDuplicate(
D,&Fvec[ii]); CHKERRQ(
ierr);
569 ierr = VecZeroEntries(Fvec[ii]); CHKERRQ(
ierr);
570 ierr = VecGhostUpdateBegin(Fvec[ii],INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(
ierr);
571 ierr = VecGhostUpdateEnd(Fvec[ii],INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(
ierr);
577 PetscBool bbar = PETSC_TRUE;
584 "DISPLACEMENT",small_strain_plasticity.
commonData
589 m_field,
"DISPLACEMENT",small_strain_plasticity.
commonData,cp
594 "DISPLACEMENT",small_strain_plasticity.
commonData
599 "DISPLACEMENT",small_strain_plasticity.
commonData
604 m_field,
"DISPLACEMENT",small_strain_plasticity.
commonData,cp
609 "DISPLACEMENT",small_strain_plasticity.
commonData
614 "DISPLACEMENT",small_strain_plasticity.
commonData
619 m_field,
"DISPLACEMENT",small_strain_plasticity.
commonData,cp
624 "DISPLACEMENT",small_strain_plasticity.
commonData
630 lagrangian_element_disp.
setRVEBCsOperatorsNonlinear(
"DISPLACEMENT",
"LAGRANGE_MUL_DISP",
"MESH_NODE_POSITIONS",Aij,Fvec,F,given_strain);
654 ierr = SNESCreate(PETSC_COMM_WORLD,&snes); CHKERRQ(
ierr);
659 ierr = SNESSetFromOptions(snes); CHKERRQ(
ierr);
672 int volume_vec_ghost[] = { 0 };
673 ierr = VecCreateGhost(
674 PETSC_COMM_WORLD,(!m_field.
get_comm_rank())?1:0,1,1,volume_vec_ghost,&volume_vec
676 ierr = VecZeroEntries(volume_vec); CHKERRQ(
ierr);
682 ierr = VecAssemblyBegin(volume_vec); CHKERRQ(
ierr);
683 ierr = VecAssemblyEnd(volume_vec); CHKERRQ(
ierr);
685 ierr = VecSum(volume_vec,&rve_volume); CHKERRQ(
ierr);
688 ierr = PetscPrintf(PETSC_COMM_WORLD,
"RVE Volume %3.2g\n",rve_volume); CHKERRQ(
ierr);
689 ierr = VecDestroy(&volume_vec);
692 double final_time = 1,delta_time = 0.1;
695 double delta_time0 = delta_time;
702 ierr = VecDuplicate(
D,&D0); CHKERRQ(
ierr);
706 SNESConvergedReason reason = SNES_CONVERGED_ITERATING;
707 for(;
t<final_time;step++) {
714 PETSC_COMM_WORLD,
"Step %d Time %6.4g final time %3.2g\n",step,
t,final_time
719 ierr = VecAssemblyBegin(
D);
720 ierr = VecAssemblyEnd(
D);
722 if(step == 0 || reason < 0) {
723 ierr = SNESSetLagJacobian(snes,-2); CHKERRQ(
ierr);
725 ierr = SNESSetLagJacobian(snes,-1); CHKERRQ(
ierr);
727 ierr = SNESSolve(snes,PETSC_NULL,
D); CHKERRQ(
ierr);
730 ierr = SNESGetIterationNumber(snes,&its); CHKERRQ(
ierr);
733 PETSC_COMM_WORLD,
"number of Newton iterations = %D\n",its
736 ierr = SNESGetConvergedReason(snes,&reason); CHKERRQ(
ierr);
742 }
else {
const int its_d = 60;
743 const double gamma = 0.5;
744 const double max_reudction = 1;
745 const double min_reduction = 1e-1;
747 reduction = pow((
double)its_d/(
double)(its+1),gamma);
748 if(delta_time >= max_reudction*delta_time0 && reduction > 1) {
750 }
else if(delta_time <= min_reduction*delta_time0 && reduction < 1) {
756 "reduction delta_time = %6.4e delta_time = %6.4e\n",
759 delta_time *= reduction;
760 if(reduction>1 && delta_time < min_reduction*delta_time0) {
761 delta_time = min_reduction*delta_time0;
765 dm,
D,INSERT_VALUES,SCATTER_REVERSE
769 dm,
"PLASTIC",&small_strain_plasticity.
feUpdate
775 dm,
"INTERFACE",&cohesive_elements.
feHistory
782 dm,
"PLASTIC",&post_proc
784 string out_file_name;
786 std::ostringstream stm;
787 stm <<
"out_" << step <<
".h5m";
788 out_file_name = stm.str();
791 PETSC_COMM_WORLD,
"out file %s\n",out_file_name.c_str()
794 out_file_name.c_str(),
"MOAB",
"PARALLEL=WRITE_PART"
800 StressHomo.resize(6);
806 int stress_homo_ghost[] = { 0,1,2,3,4,5,6 };
807 ierr = VecCreateGhost(
808 PETSC_COMM_WORLD,(!m_field.
get_comm_rank())?6:0,6,6,stress_homo_ghost,&stress_homo
815 ierr = VecGetArray(stress_homo,&avec); CHKERRQ(
ierr);
816 ierr = VecZeroEntries(stress_homo); CHKERRQ(
ierr);
821 PETSC_NULL,
"-my_rve_volume",&rve_volume,PETSC_NULL
823 ierr = VecAssemblyBegin(stress_homo); CHKERRQ(
ierr);
824 ierr = VecAssemblyEnd(stress_homo); CHKERRQ(
ierr);
825 ierr = VecScale(stress_homo,1.0/rve_volume); CHKERRQ(
ierr);
826 ierr = VecGhostUpdateBegin(stress_homo,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(
ierr);
827 ierr = VecGhostUpdateEnd(stress_homo,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(
ierr);
829 for(
int jj=0; jj<6; jj++) {
830 StressHomo(jj) = avec[jj];
836 PetscPrintf(PETSC_COMM_WORLD,
837 "Macro_Strain Homo_Stress Path "
841 for(
int ii=0; ii<6; ii++) {
850 for(
int ii=0; ii<6; ii++) {
858 PetscPrintf(PETSC_COMM_WORLD,
864 ierr = VecDestroy(&D0); CHKERRQ(
ierr);
866 ierr = MatDestroy(&Aij); CHKERRQ(
ierr);
867 ierr = VecDestroy(&F); CHKERRQ(
ierr);
Implementation of linear interface element.
Operators and data structures for non-linear elastic analysis.
Post-process fields on refined mesh.
Operators and data structures for small strain plasticity.
Small Strain plasticity material models.
Operator can be used with any volume element to calculate sum of volumes of all volumes in the set.
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
#define MYPCOMM_INDEX
default communicator number PCOMM
#define CHKERRQ_MOAB(a)
check error code of MoAB function
PetscErrorCode DMMoFEMSetIsPartitioned(DM dm, PetscBool is_partitioned)
PetscErrorCode DMMoFEMSNESSetFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES residual evaluation function
PetscErrorCode DMMoFEMCreateMoFEM(DM dm, MoFEM::Interface *m_field_ptr, const char problem_name[], const MoFEM::BitRefLevel bit_level, const MoFEM::BitRefLevel bit_mask=MoFEM::BitRefLevel().set())
Must be called by user to set MoFEM data structures.
PetscErrorCode DMMoFEMAddElement(DM dm, const char fe_name[])
add element to dm
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
set local (or ghosted) vector values on mesh for partition only
PetscErrorCode DMMoFEMSNESSetJacobian(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES Jacobian evaluation function
PetscErrorCode DMCreateMatrix_MoFEM(DM dm, Mat *M)
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
PetscErrorCode DMCreateGlobalVector_MoFEM(DM dm, Vec *g)
DMShellSetCreateGlobalVector.
PetscErrorCode DMMoFEMGetSnesCtx(DM dm, MoFEM::SnesCtx **snes_ctx)
get MoFEM::SnesCtx data structure
PetscErrorCode DMoFEMMeshToGlobalVector(DM dm, Vec g, InsertMode mode, ScatterMode scatter_mode)
set ghosted vector values on all existing mesh entities
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string &name_row)=0
set field row which finite element use
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual MoFEMErrorCode add_ents_to_finite_element_by_bit_ref(const BitRefLevel &bit, const BitRefLevel &mask, const std::string &name, EntityType type, int verb=DEFAULT_VERBOSITY)=0
add TET entities from given refinement level to finite element database given by name
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string &name_row)=0
set field col which finite element use
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
virtual MoFEMErrorCode set_field_order(const EntityHandle meshset, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
Set order approximation of the entities in the field.
virtual MoFEMErrorCode add_ents_to_field_by_type(const Range &ents, const EntityType type, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
virtual bool check_field(const std::string &name) const =0
check if field is in database
MoFEMErrorCode addFieldValuesGradientPostProc(const std::string field_name, Vec v=PETSC_NULL)
Add operator to post-process L2 or H1 field gradient.
MoFEMErrorCode addFieldValuesPostProc(const std::string field_name, Vec v=PETSC_NULL)
Add operator to post-process L2, H1, Hdiv, Hcurl field value.
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
virtual MoFEMErrorCode loop_finite_elements(const std::string &problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), int verb=DEFAULT_VERBOSITY)=0
Make a loop over finite elements.
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
const FTensor::Tensor2< T, Dim, Dim > Vec
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
implementation of Data Operators for Forces and Sources
PetscErrorCode SnesMat(SNES snes, Vec x, Mat A, Mat B, void *ctx)
This is MoFEM implementation for the left hand side (tangent matrix) evaluation in SNES solver.
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetReal(PetscOptions *, const char pre[], const char name[], PetscReal *dval, PetscBool *set)
PetscErrorCode SnesRhs(SNES snes, Vec x, Vec f, void *ctx)
This is MoFEM implementation for the right hand side (residual vector) evaluation in SNES solver.
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
PetscErrorCode PetscOptionsGetRealArray(PetscOptions *, const char pre[], const char name[], PetscReal dval[], PetscInt *nmax, PetscBool *set)
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
DeprecatedCoreInterface Interface
const double D
diffusivity
constexpr double t
plate stiffness
int main(int argc, char *argv[])
boost::ptr_vector< MethodForForceScaling > methodsOp
MyTriFE & getLoopFeRVEBCRhs()
PetscErrorCode setRVEBCsOperatorsNonlinear(string field_name, string lagrang_field_name, string mesh_nodals_positions, Mat aij, vector< Vec > &fvec, Vec f, VectorDouble given_strain)
MyTriFE feRVEBCRhsResidual
PetscErrorCode setRVEBCsHomoStressOperators(string field_name, string lagrang_field_name, string mesh_nodals_positions, Vec Stress_Homo)
MyTriFE & getLoopFeRVEBCStress()
PetscErrorCode addLagrangiangElement(const string element_name, const string field_name, const string lagrang_field_name, const string mesh_nodals_positions)
Constitutive (physical) equation for interface.
Cohesive element implementation.
MoFEMErrorCode addOps(const std::string field_name, boost::ptr_vector< CohesiveInterfaceElement::PhysicalEquation > &interfaces)
Driver function settting all operators needed for interface element.
virtual moab::Interface & get_moab()=0
virtual MoFEMErrorCode build_adjacencies(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
build adjacencies
virtual MoFEMErrorCode add_field(const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add field.
virtual int get_comm_rank() const =0
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Deprecated interface functions.
DEPRECATED MoFEMErrorCode seed_ref_level_3D(const EntityHandle meshset, const BitRefLevel &bit, int verb=-1)
seed 2D entities in the meshset and their adjacencies (only TETs adjacencies) in a particular BitRefL...
boost::ptr_vector< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
Transverse Isotropic material data structure.
Linear interface data structure.
Projection of edge entities with one mid-node on hierarchical basis.
Interface for nonlinear (SNES) solver.
Volume finite element base.
Operator performs automatic differentiation.
structure grouping operators and data used for calculation of nonlinear elastic element
MyVolumeFE feRhs
calculate right hand side for tetrahedral elements
std::map< int, BlockData > setOfBlocks
maps block set id with appropriate BlockData
moab::Interface & postProcMesh
MoFEMErrorCode generateReferenceElementMesh()
Generate reference mesh on single element.
J2 plasticity (Kinematic Isotropic (Linear) Hardening)
PetscErrorCode snesCreate()
VectorDouble plasticStrain
virtual PetscErrorCode createMatAVecR()
VectorDouble internalVariables
Small strain finite element implementation.
MyVolumeFE feRhs
calculate right hand side for tetrahedral elements
PetscErrorCode createInternalVariablesTag()
Force scale operator for reading two columns.
MoFEMErrorCode getForceScale(const double ts_t, double &scale)