19#ifndef __CRACK_PROPAGATION_HPP__
20#define __CRACK_PROPAGATION_HPP__
25 boost::shared_ptr<WrapMPIComm> moab_comm_wrap);
28 moab::Interface &moab_tmp,
29 const int from_proc,
Range &entities,
30 const bool adjacencies,
const bool tags);
90 version = Version(FM_VERSION_MAJOR, FM_VERSION_MINOR, FM_VERSION_BUILD);
101 MoFEMErrorCode
query_interface(boost::typeindex::type_index type_index,
102 UnknownInterface **iface)
const;
192 const int geometry_order = 1);
235 MoFEMErrorCode
partitionMesh(BitRefLevel bit1, BitRefLevel bit2,
240 const int verb =
QUIET,
241 const bool debug =
false);
245 const int verb =
QUIET,
246 const bool debug =
false);
264 const bool debug =
false);
284 const BitRefLevel &mask1,
285 const BitRefLevel &bit2,
286 const int verb =
QUIET,
287 const bool debug =
false);
300 std::vector<int> surface_ids,
301 const int verb =
QUIET,
302 const bool debug =
false);
312 const int verb =
QUIET,
313 const bool debug =
false);
332 MoFEMErrorCode
createDMs(SmartPetscObj<DM> &dm_elastic,
333 SmartPetscObj<DM> &dm_eigen_elastic,
334 SmartPetscObj<DM> &dm_material,
335 SmartPetscObj<DM> &dm_crack_propagation,
336 SmartPetscObj<DM> &dm_material_forces,
337 SmartPetscObj<DM> &dm_surface_projection,
338 SmartPetscObj<DM> &dm_crack_srf_area,
339 std::vector<int> surface_ids,
340 std::vector<std::string> fe_surf_proj_list);
343 const bool debug =
false);
357 const BitRefLevel
bit,
const BitRefLevel mask = BitRefLevel().set(),
358 const bool proc_only =
true,
const bool build_fields =
true,
359 const int verb =
QUIET,
const bool debug =
false);
367 const bool build_fields =
true,
368 const int verb =
QUIET);
372 const bool proc_only =
true,
373 const bool build_fields =
true,
374 const int verb =
QUIET,
375 const bool debug =
false);
379 const bool proc_only =
true,
380 const bool build_fields =
true,
381 const int verb =
QUIET,
382 const bool debug =
false);
386 const bool proc_only =
true,
387 const bool build_fields =
true,
388 const int verb =
QUIET,
389 const bool debug =
false);
393 const bool build_fields =
true,
394 const int verb =
QUIET,
395 const bool debug =
false);
405 const BitRefLevel bit_material,
406 const bool proc_only =
false,
407 const bool build_fields =
true,
408 const int verb =
QUIET,
409 const bool debug =
false);
424 const BitRefLevel bit2,
const BitRefLevel mask2,
425 const bool add_forces =
true,
const bool proc_only =
true,
426 const int verb =
QUIET);
430 const int verb =
QUIET);
434 const BitRefLevel mask = BitRefLevel().set(),
435 const bool proc_only =
true);
444 const BitRefLevel mask = BitRefLevel().set(),
445 const bool proc_only =
true);
454 const BitRefLevel mask = BitRefLevel().set(),
455 const bool proc_only =
true);
464 const BitRefLevel mask = BitRefLevel().set(),
465 const bool proc_only =
true);
474 const BitRefLevel mask = BitRefLevel().set(),
475 const bool proc_only =
true);
479 const BitRefLevel mask = BitRefLevel().set(),
480 const bool proc_only =
true,
481 const bool verb =
QUIET);
484 const BitRefLevel mask = BitRefLevel().set(),
485 const bool proc_only =
true,
486 const bool verb =
QUIET);
490 const BitRefLevel bit_material,
491 const BitRefLevel mask = BitRefLevel().set(),
492 const bool proc_only =
true,
const bool verb =
QUIET);
497 const BitRefLevel mask = BitRefLevel().set(),
498 const bool proc_only =
true,
const bool verb =
QUIET);
502 const BitRefLevel mask,
503 const std::vector<int> &ids,
504 const bool proc_only =
true,
505 const int verb =
QUIET,
506 const bool debug =
false);
510 const BitRefLevel mask,
511 const bool proc_only =
true,
512 const int verb =
QUIET,
513 const bool debug =
false);
517 const BitRefLevel mask,
const bool proc_only =
true,
518 const int verb =
QUIET,
const bool debug =
false);
537 SmartPetscObj<DM> dm_elastic,
538 SmartPetscObj<DM> dm_material,
const BitRefLevel
bit,
539 const BitRefLevel mask,
540 const std::vector<std::string> fe_list);
550 const std::string prb_name,
551 const BitRefLevel
bit,
552 const BitRefLevel mask = BitRefLevel().set());
563 const BitRefLevel
bit,
564 const BitRefLevel mask = BitRefLevel().set());
575 MoFEMErrorCode
createBcDM(SmartPetscObj<DM> &dm,
const std::string prb_name,
576 const BitRefLevel
bit,
577 const BitRefLevel mask = BitRefLevel().set());
590 const std::string prb_name,
591 const BitRefLevel
bit,
const BitRefLevel mask,
592 const std::vector<std::string> fe_list,
593 const bool debug =
false);
605 SmartPetscObj<DM> dm_material,
606 const std::string prb_name,
607 const int verb =
QUIET);
622 SmartPetscObj<DM> &dm, SmartPetscObj<DM> dm_material,
623 const std::string prb_name,
const std::vector<int> surface_ids,
624 const std::vector<std::string> fe_list,
const int verb =
QUIET);
636 SmartPetscObj<DM> dm_material,
637 const std::string prb_name,
638 const bool verb =
QUIET);
655 const int verb =
QUIET,
656 const bool debug =
false);
665 const bool debug =
false);
669 DM dm, Mat
m, Vec q, Vec f,
670 boost::shared_ptr<FEMethod> arc_method = boost::shared_ptr<FEMethod>(),
671 boost::shared_ptr<ArcLengthCtx> arc_ctx =
nullptr,
const int verb =
QUIET,
672 const bool debug =
false);
676 const bool debug =
false);
680 const int verb =
QUIET,
681 const bool debug =
false);
685 const bool debug =
false);
689 const int verb =
QUIET,
690 const bool debug =
false);
694 const bool fix_crack_front,
695 const int verb =
QUIET,
696 const bool debug =
false);
701 boost::shared_ptr<ArcLengthCtx> arc_ctx,
702 const std::vector<int> &surface_ids,
703 const int verb =
QUIET,
704 const bool debug =
false);
716 boost::shared_ptr<CrackFrontElement> &fe_lhs);
720 boost::shared_ptr<CrackFrontElement> &fe_lhs);
724 const bool fix_small_g,
725 const bool debug =
false);
749 const int verb =
QUIET,
750 const bool debug =
false);
764 const int verb =
QUIET,
765 const bool debug =
false);
768 const bool debug =
true);
772 const std::vector<int> &ids,
773 const int verb =
QUIET,
774 const bool debug =
false);
779 const int verb =
QUIET,
780 const bool debug =
false);
794 const int verb =
QUIET,
795 const bool debug =
false);
799 const int verb =
QUIET,
800 const bool debug =
false);
805 const int verb =
QUIET,
806 const bool debug =
false);
810 Vec f_griffith_proj, Vec f_lambda,
811 const double gc,
const int verb =
QUIET,
812 const bool debug =
true);
829 bool snes_set_up, Mat *shell_m);
854 const int verb =
QUIET,
855 const bool debug =
false);
860 MoFEMErrorCode
postProcessDM(DM dm,
const int step,
const std::string fe_name,
861 const bool approx_internal_stress);
884 const int verb =
QUIET);
912 inline boost::shared_ptr<FEMethod>
914 boost::shared_ptr<FEMethod> arc_method(
922 inline boost::shared_ptr<AnalyticalDirichletBC::DirichletBC>
968 const std::string lambda_field_name =
"LAMBDA_BOTH_SIDES",
969 const std::string spatial_field_name =
"MESH_NODE_POSITIONS")
973 CHKERRABORT(PETSC_COMM_WORLD,
ierr);
978 ierr = PetscOptionsBegin(PETSC_COMM_WORLD,
"",
979 "Get Booth surface constrains element scaling",
982 CHKERR PetscOptionsScalar(
"-booth_side_alpha",
"scaling parameter",
"",
984 ierr = PetscOptionsEnd();
1009 BitRefLevel bit_level)
1015 const BitRefLevel
bit);
1019 EntityHandle face = fe_method_ptr->numeredEntFiniteElementPtr->getEnt();
1020 BitRefLevel
bit = fe_method_ptr->problemPtr->getBitRefLevel();
1035 boost::shared_ptr<ArcLengthCtx> &arc_ptr)
1037 MOFEM_LOG(
"CPWorld", Sev::noisy) <<
"ArcLengthSnesCtx create";
1040 MOFEM_LOG(
"CPWorld", Sev::noisy) <<
"ArcLengthSnesCtx destroyed";
1065 boost::shared_ptr<CrackFrontElement>
feLhs;
1066 boost::shared_ptr<CrackFrontElement>
feRhs;
1067 boost::shared_ptr<CrackFrontElement>
1069 boost::shared_ptr<CrackFrontElement>
1072 boost::shared_ptr<ConstrainMatrixCtx>
1074 boost::shared_ptr<ConstrainMatrixCtx>
1076 boost::shared_ptr<MWLSApprox>
1079 boost::shared_ptr<NeumannForcesSurface::MyTriangleFE>
1081 boost::shared_ptr<DirichletSpatialPositionsBc>
1083 boost::shared_ptr<AnalyticalDirichletBC::DirichletBC>
1087 boost::shared_ptr<boost::ptr_map<string, NeumannForcesSurface>>
1089 boost::shared_ptr<boost::ptr_map<string, NeumannForcesSurface>>
1091 boost::shared_ptr<NeumannForcesSurface::DataAtIntegrationPts>
1093 boost::shared_ptr<boost::ptr_map<string, NeumannForcesSurface>>
1095 boost::shared_ptr<boost::ptr_map<string, NeumannForcesSurface>>
1097 boost::shared_ptr<NeumannForcesSurface::DataAtIntegrationPts>
1099 boost::shared_ptr<boost::ptr_map<string, EdgeForce>>
1101 boost::shared_ptr<boost::ptr_map<string, NodalForce>>
1106 boost::shared_ptr<CrackFrontElement>
1108 boost::shared_ptr<CrackFrontElement>
1112 boost::shared_ptr<Smoother::MyVolumeFE>
1114 boost::shared_ptr<Smoother::MyVolumeFE>
1122 boost::shared_ptr<SurfaceSlidingConstrains::DriverElementOrientation>
1124 boost::shared_ptr<SurfaceSlidingConstrains::DriverElementOrientation>
1126 boost::shared_ptr<SurfaceSlidingConstrains::DriverElementOrientation>
1139 boost::shared_ptr<GriffithForceElement::MyTriangleFEConstrainsDelta>
1141 boost::shared_ptr<GriffithForceElement::MyTriangleFEConstrains>
1143 boost::shared_ptr<GriffithForceElement::MyTriangleFEConstrains>
1146 boost::shared_ptr<boost::ptr_map<string, NeumannForcesSurface>>
1190 map<EntityHandle, VectorDouble3>
1192 map<EntityHandle, VectorDouble3>
1249 boost::shared_ptr<ContactSearchKdTree::ContactCommonData_multiIndex>
1261 boost::shared_ptr<FaceElementForcesAndSourcesCore>
1263 boost::shared_ptr<FaceElementForcesAndSourcesCore>
1265 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
1269 boost::shared_ptr<SimpleContactProblem::SimpleContactElement>
1271 boost::shared_ptr<SimpleContactProblem::SimpleContactElement>
1273 boost::shared_ptr<SimpleContactProblem::CommonDataSimpleContact>
1278 boost::shared_ptr<MortarContactProblem::MortarContactElement>
1280 boost::shared_ptr<MortarContactProblem::MortarContactElement>
1282 boost::shared_ptr<MortarContactProblem::CommonDataMortarContact>
1284 boost::shared_ptr<SimpleContactProblem::SimpleContactElement>
1286 boost::shared_ptr<SimpleContactProblem::SimpleContactElement>
1288 boost::shared_ptr<SimpleContactProblem::SimpleContactElement>
1290 boost::shared_ptr<SimpleContactProblem::CommonDataSimpleContact>
1294 boost::shared_ptr<SimpleContactProblem::SimpleContactElement>
1296 boost::shared_ptr<MortarContactProblem::MortarContactElement>
static PetscErrorCode ierr
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FTensor::Index< 'm', SPACE_DIM > m
#define MOFEM_LOG(channel, severity)
Log.
MoFEMErrorCode broadcast_entities(moab::Interface &moab, moab::Interface &moab_tmp, const int from_proc, Range &entities, const bool adjacencies, const bool tags)
MoFEMErrorCode clean_pcomms(moab::Interface &moab, boost::shared_ptr< WrapMPIComm > moab_comm_wrap)
AdolcTags
Tapes numbers used by ADOL-C.
@ GRIFFITH_CONSTRAINS_TAG
@ EXTERIOR_DERIVATIVE_TAG
tangent_tests
Names of tangent matrices tests.
constexpr auto field_name
static constexpr int approx_order
Store variables for ArcLength analysis.
virtual ~ArcLengthSnesCtx()
void setVecDiagM(Vec diag_m)
ArcLengthSnesCtx(MoFEM::Interface &m_field, const std::string problem_name, boost::shared_ptr< ArcLengthCtx > &arc_ptr)
Constrains material displacement on both sides.
const std::string lambdaFieldName
Range masterNodes
! Scaling parameter
MoFEMErrorCode getOptions()
MoFEMErrorCode preProcess()
const std::string spatialFieldName
BothSurfaceConstrains(MoFEM::Interface &m_field, const std::string lambda_field_name="LAMBDA_BOTH_SIDES", const std::string spatial_field_name="MESH_NODE_POSITIONS")
Construct a new Both Surface Constrains object.
MoFEMErrorCode postProcess()
MoFEM::Interface & mField
! Node on which lagrange multiplier is set
MoFEMErrorCode operator()()
Determine face orientation.
FaceOrientation(bool crack_front, Range contact_faces, BitRefLevel bit_level)
MoFEMErrorCode getElementOrientation(MoFEM::Interface &m_field, const EntityHandle face)
MoFEMErrorCode getElementOrientation(MoFEM::Interface &m_field, const FEMethod *fe_method_ptr)
BitRefLevel defaultBitLevel
bool useProjectionFromCrackFront
MoFEMErrorCode getElementOrientation(MoFEM::Interface &m_field, const EntityHandle face, const BitRefLevel bit)
virtual ~FaceOrientation()
operator to post-process results on crack front nodes
MoFEM::Interface & mField
MoFEMErrorCode operator()()
function is run for every finite element
MoFEMErrorCode postProcess()
function is run at the end of loop
MoFEMErrorCode preProcess()
function is run at the beginning of loop
PostProcVertexMethod(MoFEM::Interface &m_field, Vec f, std::string tag_name)
boost::shared_ptr< FaceElementForcesAndSourcesCore > feSpringRhsPtr
MoFEMErrorCode zeroLambdaFields()
Zero fields with lagrange multipliers.
boost::shared_ptr< BothSurfaceConstrains > bothSidesConstrains
MoFEMErrorCode solveElasticDM(DM dm, SNES snes, Mat m, Vec q, Vec f, bool snes_set_up, Mat *shell_m)
solve elastic problem
boost::shared_ptr< AnalyticalDirichletBC::DirichletBC > analyticalDirichletBc
MoFEMErrorCode declareSpringsAleFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true)
Declare FE for spring BC in ALE formulation (in material domain)
boost::shared_ptr< CrackFrontElement > feMaterialRhs
Integrate material stresses, assemble vector.
boost::shared_ptr< FaceElementForcesAndSourcesCore > feSpringLhsPtr
boost::shared_ptr< boost::ptr_map< string, NeumannForcesSurface > > surfacePressure
assemble surface pressure
boost::shared_ptr< SurfaceSlidingConstrains::DriverElementOrientation > contactOrientation
MoFEMErrorCode getArcLengthDof()
set pointer to arc-length DOF
MoFEMErrorCode declareSimpleContactAleFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true)
Declare FE for pressure BC in ALE formulation (in material domain)
MoFEMErrorCode createMaterialDM(SmartPetscObj< DM > &dm, const std::string prb_name, const BitRefLevel bit, const BitRefLevel mask, const std::vector< std::string > fe_list, const bool debug=false)
Create DM fto calculate material problem.
MoFEMErrorCode deleteEntities(const int verb=QUIET, const bool debug=false)
MoFEMErrorCode declareSmoothingFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true, const bool verb=QUIET)
declare mesh smoothing finite elements
MoFEMErrorCode declareBothSidesFE(const BitRefLevel bit_spatial, const BitRefLevel bit_material, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true, const bool verb=QUIET)
boost::shared_ptr< DirichletSpatialPositionsBc > spatialDirichletBc
apply Dirichlet BC to sparial positions
MoFEMErrorCode declareExternalForcesFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true)
MoFEMErrorCode solvePropagationDM(DM dm, DM dm_elastic, SNES snes, Mat m, Vec q, Vec f)
solve crack propagation problem
std::string mwlsApproxFile
Name of file with internal stresses.
map< int, boost::shared_ptr< SurfaceSlidingConstrains > > surfaceConstrain
MoFEMErrorCode readMedFile()
read mesh file
boost::shared_ptr< FaceElementForcesAndSourcesCore > feRhsSurfaceForceALEMaterial
boost::shared_ptr< CrackFrontElement > feRhs
Integrate elastic FE.
MoFEMErrorCode buildBothSidesFieldId(const BitRefLevel bit_spatial, const BitRefLevel bit_material, const bool proc_only=false, const bool build_fields=true, const int verb=QUIET, const bool debug=false)
Lagrange multipliers field which constrains material displacements.
PetscBool propagateCrack
If true crack propagation is calculated.
boost::shared_ptr< MortarContactProblem::MortarContactElement > fePostProcMortarContact
std::map< std::string, BitRefLevel > mapBitLevel
MoFEMErrorCode declareArcLengthFE(const BitRefLevel bits, const int verb=QUIET)
create arc-length element entity and declare elemets
Range mortarContactMasterFaces
MoFEM::Interface & mField
boost::shared_ptr< GriffithForceElement::MyTriangleFEConstrains > feGriffithConstrainsLhs
boost::shared_ptr< Smoother::MyVolumeFE > feSmootherLhs
Integrate smoothing operators.
double rHo0
Reference density if bone is analyzed.
double smootherGamma
Controls mesh smoothing.
MoFEMErrorCode setCrackFrontBitLevel(BitRefLevel from_bit, BitRefLevel bit, const int nb_levels=2, const bool debug=false)
Set bit ref level for entities adjacent to crack front.
MoFEMErrorCode testJacobians(const BitRefLevel bit, const BitRefLevel mask, tangent_tests test)
test LHS Jacobians
virtual ~CrackPropagation()
MoFEMErrorCode declareEdgeFE(std::string fe_name, const BitRefLevel bit, const BitRefLevel mask, const bool proc_only=true, const int verb=QUIET, const bool debug=false)
boost::shared_ptr< SimpleContactProblem::SimpleContactElement > feRhsSimpleContact
MoFEMErrorCode createSurfaceProjectionDM(SmartPetscObj< DM > &dm, SmartPetscObj< DM > dm_material, const std::string prb_name, const std::vector< int > surface_ids, const std::vector< std::string > fe_list, const int verb=QUIET)
create DM to calculate projection matrices (sub DM of DM material)
Range mortarContactSlaveFaces
boost::shared_ptr< boost::ptr_map< string, NeumannForcesSurface > > analiticalSurfaceElement
Range crackFrontNodesEdges
boost::shared_ptr< ConstrainMatrixCtx > projFrontCtx
Data structure to project on crack front.
PetscBool onlyHookeFromOptions
True if only Hooke material is applied.
MoFEMErrorCode getInterfaceVersion(Version &version) const
MoFEMErrorCode buildProblemFiniteElements(BitRefLevel bit1, BitRefLevel bit2, std::vector< int > surface_ids, const int verb=QUIET, const bool debug=false)
Build problem finite elements.
boost::shared_ptr< GriffithForceElement::MyTriangleFEConstrainsDelta > feGriffithConstrainsDelta
boost::shared_ptr< NonlinearElasticElement > elasticFe
PetscBool useEigenPositionsSimpleContact
boost::shared_ptr< MWLSApprox > & getMWLSApprox()
MoFEMErrorCode calculateMaterialForcesDM(DM dm, Vec q, Vec f, const int verb=QUIET, const bool debug=false)
assemble material forces, by running material finite element instance
MoFEMErrorCode declareFrontFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true, const bool verb=QUIET)
static bool parallelReadAndBroadcast
MoFEMErrorCode buildProblemFields(const BitRefLevel &bit1, const BitRefLevel &mask1, const BitRefLevel &bit2, const int verb=QUIET, const bool debug=false)
Build problem fields.
double getLoadScale() const
MoFEMErrorCode postProcessDM(DM dm, const int step, const std::string fe_name, const bool approx_internal_stress)
post-process results for elastic solution
boost::shared_ptr< SimpleContactProblem::SimpleContactElement > feLhsSimpleContactALE
boost::shared_ptr< SimpleContactProblem::CommonDataSimpleContact > commonDataSimpleContact
double betaGc
heterogeneous Griffith energy exponent
EntityHandle arcLengthVertex
Vertex associated with dof for arc-length control.
double griffithR
Griffith regularisation parameter.
std::string mwlsEigenStressTagName
Name of tag with eigen stresses.
MoFEMErrorCode partitionMesh(BitRefLevel bit1, BitRefLevel bit2, int verb=QUIET, const bool debug=false)
partotion mesh
PetscBool isGcHeterogeneous
flag for heterogeneous gc
MoFEMErrorCode addMWLSStressOperators(boost::shared_ptr< CrackFrontElement > &fe_rhs, boost::shared_ptr< CrackFrontElement > &fe_lhs)
boost::shared_ptr< Smoother::MyVolumeFE > feSmootherRhs
Integrate smoothing operators.
Range contactMeshsetFaces
std::string mwlsStressTagName
Name of tag with internal stresses.
map< EntityHandle, double > mapJ
hashmap of J - release energy at nodes
boost::shared_ptr< DirichletFixFieldAtEntitiesBc > fixMaterialEnts
boost::shared_ptr< FEMethod > zeroFlambda
assemble F_lambda vector
boost::shared_ptr< FaceElementForcesAndSourcesCore > feLhsSurfaceForceALEMaterial
boost::shared_ptr< NonlinearElasticElement > materialFe
boost::shared_ptr< boost::ptr_map< string, EdgeForce > > edgeForces
assemble edge forces
MoFEMErrorCode buildSurfaceFields(const BitRefLevel bit, const bool proc_only=true, const bool build_fields=true, const int verb=QUIET, const bool debug=false)
build fields with Lagrange multipliers to constrain surfaces
MoFEMErrorCode setSingularDofs(const string field_name, const int verb=QUIET)
set singular dofs (on edges adjacent to crack front) from geometry
MoFEMErrorCode savePositionsOnCrackFrontDM(DM dm, Vec q, const int verb=QUIET, const bool debug=false)
Range contactBothSidesMasterNodes
Range mortarContactElements
boost::shared_ptr< NeumannForcesSurface::MyTriangleFE > feMaterialAnaliticalTraction
Surface elment to calculate tractions in material space.
boost::shared_ptr< GriffithForceElement::MyTriangleFEConstrains > feGriffithConstrainsRhs
MoFEMErrorCode getOptions()
Get options form command line.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Getting interface of core database.
PetscBool resetMWLSCoeffsEveryPropagationStep
MoFEMErrorCode assembleMaterialForcesDM(DM dm, const int verb=QUIET, const bool debug=false)
create material element instance
map< EntityHandle, double > mapSmoothingForceFactor
EntityHandle meshsetFaces
MoFEMErrorCode calculateGriffithForce(DM dm, const double gc, Vec f_griffith, const int verb=QUIET, const bool debug=false)
calculate Griffith (driving) force
boost::shared_ptr< FEMethod > getFrontArcLengthControl(boost::shared_ptr< ArcLengthCtx > arc_ctx)
int getNbLoadSteps() const
PetscBool fixContactNodes
Range otherSideCrackFaces
boost::shared_ptr< MortarContactProblem > mortarContactProblemPtr
double fractionOfFixedNodes
boost::shared_ptr< FaceElementForcesAndSourcesCore > feLhsSpringALEMaterial
boost::shared_ptr< Smoother > smootherFe
MoFEMErrorCode setSpatialPositionFromCoords()
set spatial field from nodes
boost::shared_ptr< MortarContactProblem::CommonDataMortarContact > commonDataMortarContact
boost::shared_ptr< FaceElementForcesAndSourcesCore > feRhsSpringALEMaterial
Range contactBothSidesMasterFaces
MoFEMErrorCode updateMaterialFixedNode(const bool fix_front, const bool fix_small_g, const bool debug=false)
Update fixed nodes.
const boost::scoped_ptr< UnknownInterface > cpSolversPtr
MoFEMErrorCode createBcDM(SmartPetscObj< DM > &dm, const std::string prb_name, const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set())
Create problem to calculate boundary conditions.
double smootherAlpha
Controls mesh smoothing.
MoFEMErrorCode createEigenElasticDM(SmartPetscObj< DM > &dm, const std::string prb_name, const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set())
Create elastic problem DM.
boost::shared_ptr< SurfaceSlidingConstrains::DriverElementOrientation > skinOrientation
PetscBool addAnalyticalInternalStressOperators
MoFEMErrorCode buildElasticFields(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true, const bool build_fields=true, const int verb=QUIET, const bool debug=false)
Declate fields for elastic analysis.
MoFEMErrorCode setSingularElementMatrialPositions(const int verb=QUIET)
set singular dofs of material field (on edges adjacent to crack front) from geometry
bool isStressTagSavedOnNodes
boost::shared_ptr< DofEntity > arcLengthDof
MoFEMErrorCode declarePressureAleFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true)
Declare FE for pressure BC in ALE formulation (in material domain)
MoFEMErrorCode setMaterialPositionFromCoords()
set material field from nodes
MoFEMErrorCode addElasticFEInstancesToSnes(DM dm, Mat m, Vec q, Vec f, boost::shared_ptr< FEMethod > arc_method=boost::shared_ptr< FEMethod >(), boost::shared_ptr< ArcLengthCtx > arc_ctx=nullptr, const int verb=QUIET, const bool debug=false)
map< EntityHandle, VectorDouble3 > mapMatForce
hashmap of material force at nodes
boost::shared_ptr< boost::ptr_map< string, NeumannForcesSurface > > surfacePressureAle
assemble surface pressure (ALE)
MoFEMErrorCode calculateElasticEnergy(DM dm, const std::string msg="")
assemble elastic part of matrix, by running elastic finite element instance
MoFEMErrorCode createMaterialForcesDM(SmartPetscObj< DM > &dm, SmartPetscObj< DM > dm_material, const std::string prb_name, const int verb=QUIET)
Create DM for calculation of material forces (sub DM of DM material)
boost::shared_ptr< VolumeLengthQuality< adouble > > volumeLengthAdouble
MoFEMErrorCode projectGriffithForce(DM dm, Vec f_griffith, Vec f_griffith_proj, const int verb=QUIET, const bool debug=false)
project Griffith forces
double griffithE
Griffith stability parameter.
MoFEMErrorCode declareSurfaceFE(std::string fe_name, const BitRefLevel bit, const BitRefLevel mask, const std::vector< int > &ids, const bool proc_only=true, const int verb=QUIET, const bool debug=false)
declare surface sliding elements
boost::shared_ptr< ArcLengthCtx > arcEigenCtx
Range constrainedInterface
Range of faces on the constrained interface.
MoFEMErrorCode resolveSharedBitRefLevel(const BitRefLevel bit, const int verb=QUIET, const bool debug=false)
resole shared entities by bit level
MoFEMErrorCode assembleSmootherForcesDM(DM dm, const std::vector< int > ids, const int verb=QUIET, const bool debug=false)
create smoothing element instance
boost::shared_ptr< boost::ptr_map< string, NodalForce > > nodalForces
assemble nodal forces
boost::shared_ptr< VolumeLengthQuality< double > > volumeLengthDouble
int getNbCutSteps() const
MoFEMErrorCode setCoordsFromField(const std::string field_name="MESH_NODE_POSITIONS")
set coordinates from field
MoFEMErrorCode projectMaterialForcesDM(DM dm_project, Vec f, Vec f_proj, const int verb=QUIET, const bool debug=false)
project material forces along the crack elongation direction
MoFEMErrorCode buildEdgeFields(const BitRefLevel bit, const bool proc_only=true, const bool build_fields=true, const int verb=QUIET, const bool debug=false)
build fields with Lagrange multipliers to constrain edges
map< EntityHandle, double > mapG3
hashmap of g3 - release energy at nodes
PetscBool isPressureAle
If true surface pressure is considered in ALE.
Range crackFrontNodesTris
MoFEMErrorCode createElasticDM(SmartPetscObj< DM > &dm, const std::string prb_name, const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set())
Create elastic problem DM.
bool setSingularCoordinates
map< EntityHandle, double > mapG1
hashmap of g1 - release energy at nodes
MoFEMErrorCode declareCrackSurfaceFE(std::string fe_name, const BitRefLevel bit, const BitRefLevel mask, const bool proc_only=true, const int verb=QUIET, const bool debug=false)
MoFEMErrorCode createCrackPropagationDM(SmartPetscObj< DM > &dm, const std::string prb_name, SmartPetscObj< DM > dm_elastic, SmartPetscObj< DM > dm_material, const BitRefLevel bit, const BitRefLevel mask, const std::vector< std::string > fe_list)
Create DM by composition of elastic DM and material DM.
boost::shared_ptr< MortarContactProblem::MortarContactElement > feLhsMortarContact
MoFEMErrorCode tetsingReleaseEnergyCalculation()
This is run with ctest.
MoFEMErrorCode saveEachPart(const std::string prefix, const Range &ents)
Save entities on ech processor.
MoFEMErrorCode calculateSmoothingForceFactor(const int verb=QUIET, const bool debug=true)
boost::shared_ptr< ConstrainMatrixCtx > projSurfaceCtx
Data structure to project on the body surface.
static FTensor::Tensor2_symmetric< double, 3 > analyticalStrainFunction(FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, 3 > &t_coords)
boost::shared_ptr< ArcLengthCtx > arcCtx
MoFEMErrorCode cleanSingularElementMatrialPositions()
set maetrial field order to one
boost::shared_ptr< SurfaceSlidingConstrains::DriverElementOrientation > crackOrientation
double initialSmootherAlpha
map< int, boost::shared_ptr< EdgeSlidingConstrains > > edgeConstrains
PetscBool solveEigenStressProblem
Solve eigen problem.
MoFEMErrorCode writeCrackFont(const BitRefLevel &bit, const int step)
MoFEMErrorCode setFieldFromCoords(const std::string field_name)
set field from node positions
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > commonDataSpringsALE
MoFEMErrorCode addMWLSDensityOperators(boost::shared_ptr< CrackFrontElement > &fe_rhs, boost::shared_ptr< CrackFrontElement > &fe_lhs)
MoFEMErrorCode createCrackFrontAreaDM(SmartPetscObj< DM > &dm, SmartPetscObj< DM > dm_material, const std::string prb_name, const bool verb=QUIET)
create DM to calculate Griffith energy
MoFEMErrorCode declareElasticFE(const BitRefLevel bit1, const BitRefLevel mask1, const BitRefLevel bit2, const BitRefLevel mask2, const bool add_forces=true, const bool proc_only=true, const int verb=QUIET)
declare elastic finite elements
boost::shared_ptr< SimpleContactProblem::SimpleContactElement > feLhsSimpleContact
PetscBool contactOutputIntegPts
boost::shared_ptr< CrackFrontElement > feCouplingMaterialLhs
FE instance to assemble coupling terms.
double nBone
Exponent parameter in bone density.
boost::shared_ptr< CrackFrontElement > feCouplingElasticLhs
FE instance to assemble coupling terms.
boost::shared_ptr< NeumannForcesSurface::DataAtIntegrationPts > commonDataSurfaceForceAle
common data at integration points (ALE)
MoFEMErrorCode assembleElasticDM(const std::string mwls_stress_tag_name, const int verb=QUIET, const bool debug=false)
create elastic finite element instance for spatial assembly
boost::shared_ptr< boost::ptr_map< string, NeumannForcesSurface > > surfaceForces
assemble surface forces
boost::shared_ptr< GriffithForceElement::MyTriangleFE > feGriffithForceLhs
const boost::scoped_ptr< UnknownInterface > cpMeshCutPtr
boost::shared_ptr< SimpleContactProblem::SimpleContactElement > feLhsSimpleContactALEMaterial
boost::shared_ptr< boost::ptr_map< string, NeumannForcesSurface > > surfaceForceAle
assemble surface pressure (ALE)
boost::shared_ptr< GriffithForceElement > griffithForceElement
MoFEMErrorCode assembleCouplingForcesDM(DM dm, const int verb=QUIET, const bool debug=false)
assemble coupling element instances
MoFEMErrorCode declareSurfaceForceAleFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true)
Declare FE for pressure BC in ALE formulation (in material domain)
boost::shared_ptr< MWLSApprox > mwlsApprox
MoFEMErrorCode addMaterialFEInstancesToSnes(DM dm, const bool fix_crack_front, const int verb=QUIET, const bool debug=false)
add material elements instances to SNES
double crackAccelerationFactor
MoFEMErrorCode calculateReleaseEnergy(DM dm, Vec f_material_proj, Vec f_griffith_proj, Vec f_lambda, const double gc, const int verb=QUIET, const bool debug=true)
calculate release energy
bool onlyHooke
True if only Hooke material is applied.
boost::shared_ptr< SimpleContactProblem::SimpleContactElement > fePostProcSimpleContact
MoFEMErrorCode addPropagationFEInstancesToSnes(DM dm, boost::shared_ptr< FEMethod > arc_method, boost::shared_ptr< ArcLengthCtx > arc_ctx, const std::vector< int > &surface_ids, const int verb=QUIET, const bool debug=false)
add finite element to SNES for crack propagation problem
PetscBool printContactState
boost::shared_ptr< CrackFrontElement > feLhs
Integrate elastic FE.
MoFEMErrorCode calculateSurfaceProjectionMatrix(DM dm_front, DM dm_project, const std::vector< int > &ids, const int verb=QUIET, const bool debug=false)
assemble projection matrices
boost::shared_ptr< BothSurfaceConstrains > bothSidesContactConstrains
MoFEMErrorCode buildArcLengthField(const BitRefLevel bit, const bool build_fields=true, const int verb=QUIET)
Declate field for arc-length.
PetscBool doElasticWithoutCrack
int postProcLevel
level of postprocessing (amount of output files)
MoFEMErrorCode resolveShared(const Range &tets, Range &proc_ents, const int verb=QUIET, const bool debug=false)
resolve shared entities
boost::shared_ptr< AnalyticalDirichletBC::DirichletBC > getAnalyticalDirichletBc()
boost::shared_ptr< FaceElementForcesAndSourcesCore > feLhsSpringALE
boost::shared_ptr< FEMethod > assembleFlambda
assemble F_lambda vector
boost::shared_ptr< BothSurfaceConstrains > closeCrackConstrains
moab::Interface & contactPostProcMoab
PetscBool areSpringsAle
If true surface spring is considered in ALE.
boost::shared_ptr< ObosleteUsersModules::TangentWithMeshSmoothingFrontConstrain > tangentConstrains
Constrains crack front in tangent directiona.
MoFEMErrorCode calculateSmoothingForcesDM(DM dm, Vec q, Vec f, const int verb=QUIET, const bool debug=false)
assemble smoothing forces, by running material finite element instance
boost::shared_ptr< WrapMPIComm > moabCommWorld
Range contactBothSidesSlaveFaces
MoFEMErrorCode createProblemDataStructures(const std::vector< int > surface_ids, const int verb=QUIET, const bool debug=false)
Construct problem data structures.
boost::shared_ptr< ContactSearchKdTree::ContactCommonData_multiIndex > contactSearchMultiIndexPtr
boost::shared_ptr< MortarContactProblem::MortarContactElement > feRhsMortarContact
moab::Core contactPostProcCore
map< EntityHandle, VectorDouble3 > mapGriffith
hashmap of Griffith energy at nodes
MoFEMErrorCode addSmoothingFEInstancesToSnes(DM dm, const bool fix_crack_front, const int verb=QUIET, const bool debug=false)
add softening elements instances to SNES
MoFEMErrorCode declareMaterialFE(const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), const bool proc_only=true, const bool verb=QUIET)
declare material finite elements
boost::shared_ptr< ArcLengthCtx > & getEigenArcCtx()
MoFEMErrorCode createDMs(SmartPetscObj< DM > &dm_elastic, SmartPetscObj< DM > &dm_eigen_elastic, SmartPetscObj< DM > &dm_material, SmartPetscObj< DM > &dm_crack_propagation, SmartPetscObj< DM > &dm_material_forces, SmartPetscObj< DM > &dm_surface_projection, SmartPetscObj< DM > &dm_crack_srf_area, std::vector< int > surface_ids, std::vector< std::string > fe_surf_proj_list)
Crate DMs for all problems and sub problems.
boost::shared_ptr< SimpleContactProblem::CommonDataSimpleContact > commonDataSimpleContactALE
PetscBool ignoreMaterialForce
If true surface pressure is considered in ALE.
MoFEMErrorCode buildCrackSurfaceFieldId(const BitRefLevel bit, const bool proc_only=true, const bool build_fields=true, const int verb=QUIET, const bool debug=false)
declare crack surface files
boost::shared_ptr< GriffithForceElement::MyTriangleFE > feGriffithForceRhs
MoFEMErrorCode buildCrackFrontFieldId(const BitRefLevel bit, const bool build_fields=true, const int verb=QUIET, const bool debug=false)
declare crack surface files
boost::shared_ptr< CrackFrontElement > feEnergy
Integrate energy.
boost::shared_ptr< SimpleContactProblem > contactProblem
PetscBool otherSideConstrains
boost::shared_ptr< CrackFrontElement > feMaterialLhs
Integrate material stresses, assemble matrix.
int residualStressBlock
Block on which residual stress is applied.
double gC
Griffith energy.
boost::shared_ptr< SimpleContactProblem::SimpleContactElement > feRhsSimpleContactALEMaterial
double partitioningWeightPower
MoFEMErrorCode unsetSingularElementMatrialPositions()
remove singularity
MoFEMErrorCode calculateFrontProjectionMatrix(DM dm_surface, DM dm_project, const int verb=QUIET, const bool debug=false)
assemble crack front projection matrix (that constrains crack area growth)
PetscBool isSurfaceForceAle
If true surface pressure is considered in ALE.
std::string mwlsRhoTagName
Name of tag with density.
boost::shared_ptr< NeumannForcesSurface::DataAtIntegrationPts > commonDataSurfacePressureAle
common data at integration points (ALE)
boost::shared_ptr< ArcLengthCtx > & getArcCtx()
Deprecated interface functions.
Data structure to exchange data between mofem and User Loop Methods on entities.
base class for all interface classes
Class implemented by user to detect face orientation.