52 static boost::function<
double(
const double)>
f;
60 static inline constexpr double v_max = 12;
65 double e =
static_cast<double>(std::exp(
v_max));
67 return 0.5 * e * dv * dv + e * dv + e;
69 return static_cast<double>(std::exp(
v));
75 double e =
static_cast<double>(std::exp(
v_max));
79 return static_cast<double>(std::exp(
v));
85 return static_cast<double>(std::exp(
v_max));
87 return static_cast<double>(std::exp(
v));
109 return std::exp(
v_max);
137 return 1. / exp(
v_min);
141 return -1. / (
v *
v);
181 MoFEMErrorCode
query_interface(boost::typeindex::type_index type_index,
182 UnknownInterface **iface)
const;
196 SmartPetscObj<DM>
dM;
242 boost::shared_ptr<AnalyticalDisplacementBcVec>
250 template <
typename BC>
251 MoFEMErrorCode
getBc(boost::shared_ptr<BC> &bc_vec_ptr,
252 const std::string block_name,
const int nb_attributes) {
257 (boost::format(
"%s(.*)") % block_name).str()
262 std::vector<double> block_attributes;
263 CHKERR it->getAttributes(block_attributes);
264 if (block_attributes.size() < nb_attributes) {
266 "In block %s expected %d attributes, but given %ld",
267 it->getName().c_str(), nb_attributes, block_attributes.size());
272 bc_vec_ptr->emplace_back(it->getName(), block_attributes, faces);
286 boost::make_shared<DynamicRelaxationTimeScale>(
"rotation_history.txt");
289 GetBlockScalingMethod<DynamicRelaxationTimeScale>::get(
290 ts_rotation,
"rotation_history",
".txt", bc.blockName);
309 boost::shared_ptr<TractionFreeBc> &bc_ptr,
310 const std::string contact_set_name);
312 inline MoFEMErrorCode
315 boost::shared_ptr<TractionFreeBc>(
new TractionFreeBc());
328 MoFEMErrorCode
addDMs(
const BitRefLevel
bit = BitRefLevel().set(0),
334 const double sigma_y);
339 const double sigma_y);
347 const int tag,
const bool do_rhs,
const bool do_lhs,
348 const bool calc_rates, SmartPetscObj<Vec> ver_vec,
349 boost::shared_ptr<VolumeElementForcesAndSourcesCore> fe);
352 const int tag,
const bool add_elastic,
const bool add_material,
353 boost::shared_ptr<VolumeElementForcesAndSourcesCore> &fe_rhs,
354 boost::shared_ptr<VolumeElementForcesAndSourcesCore> &fe_lhs);
358 boost::shared_ptr<FaceElementForcesAndSourcesCore> &fe_rhs,
359 boost::shared_ptr<FaceElementForcesAndSourcesCore> &fe_lhs);
363 boost::shared_ptr<ContactTree> &fe_contact_tree
388 Vec f_residual = PETSC_NULLPTR,
389 Vec var_vec = PETSC_NULLPTR,
390 std::vector<Tag> tags_to_transfer = {});
393 Vec f_residual = PETSC_NULLPTR,
394 std::vector<Tag> tags_to_transfer = {});
397 boost::shared_ptr<double> area_ptr);
407 virtual MoFEMErrorCode
setUp(TS) = 0;
415 using TimeScale::TimeScale;
421 return TimeScale::getScale(time);
441 boost::shared_ptr<ParentFiniteElementAdjacencyFunctionSkeleton<2>>
461 Mat
S = PETSC_NULLPTR;
465 std::vector<boost::shared_ptr<Range>>
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
const double v
phase velocity of light in medium (cm/ns)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
double getScale(const double time) override
virtual MoFEMErrorCode setUp(TS)=0
static boost::shared_ptr< SetUpSchur > createSetUpSchur(MoFEM::Interface &m_field, EshelbianCore *ep_core_ptr)
std::vector< boost::shared_ptr< Range > > a00RangeList
MoFEMErrorCode setElasticElementOps(const int tag)
boost::shared_ptr< ExternalStrainVec > externalStrainVecPtr
MoFEMErrorCode addVolumeFiniteElement(const EntityHandle meshset=0)
MoFEMErrorCode addFields(const EntityHandle meshset=0)
static constexpr bool use_quadratic_exp
static enum StretchSelector stretchSelector
boost::shared_ptr< Range > frontAdjEdges
MoFEMErrorCode createCrackSurfaceMeshset()
MoFEMErrorCode addBoundaryFiniteElement(const EntityHandle meshset=0)
const std::string skeletonElement
static double inv_f_linear(const double v)
MoFEMErrorCode getSpatialRotationBc()
boost::shared_ptr< TractionBcVec > bcSpatialTractionVecPtr
boost::shared_ptr< Range > contactFaces
static double dd_f_log_e_quadratic(const double v)
static double dynamicTime
static double dd_f_log(const double v)
BitRefLevel bitAdjEnt
bit ref level for parent
static boost::function< double(const double)> inv_dd_f
MoFEM::Interface & mField
static constexpr double v_max
const std::string spatialL2Disp
static double inv_d_f_log(const double v)
std::map< std::string, boost::shared_ptr< ScalingMethod > > timeScaleMap
MoFEMErrorCode addMaterial_Hencky(double E, double nu)
friend struct solve_elastic_set_up
static PetscBool l2UserBaseScale
SmartPetscObj< DM > dM
Coupled problem all fields.
boost::shared_ptr< FaceElementForcesAndSourcesCore > elasticBcRhs
static int internalStressInterpOrder
SmartPetscObj< IS > crackHybridIs
MoFEMErrorCode projectGeometry(const EntityHandle meshset=0)
boost::shared_ptr< TractionFreeBc > bcSpatialFreeTractionVecPtr
const std::string materialH1Positions
static int nbJIntegralContours
MoFEMErrorCode setBlockTagsOnSkin()
std::vector< Tag > listTagsToTransfer
list of tags to transfer to postprocessor
boost::shared_ptr< FaceElementForcesAndSourcesCore > elasticBcLhs
static PetscBool crackingOn
MoFEMErrorCode addMaterial_HMHHStVenantKirchhoff(const int tape, const double lambda, const double mu, const double sigma_y)
MoFEMErrorCode addMaterial_HMHMooneyRivlin(const int tape, const double alpha, const double beta, const double lambda, const double sigma_y)
MoFEMErrorCode getTractionFreeBc(const EntityHandle meshset, boost::shared_ptr< TractionFreeBc > &bc_ptr, const std::string contact_set_name)
Remove all, but entities where kinematic constrains are applied.
MoFEMErrorCode setBaseVolumeElementOps(const int tag, const bool do_rhs, const bool do_lhs, const bool calc_rates, SmartPetscObj< Vec > ver_vec, boost::shared_ptr< VolumeElementForcesAndSourcesCore > fe)
MoFEMErrorCode calculateFaceMaterialForce(const int tag, TS ts)
static double griffithEnergy
Griffith energy.
MoFEMErrorCode calculateCrackArea(boost::shared_ptr< double > area_ptr)
boost::shared_ptr< VolumeElementForcesAndSourcesCore > elasticFeRhs
const std::string elementVolumeName
static double dd_f_log_e(const double v)
static enum RotSelector rotSelector
static enum RotSelector gradApproximator
MoFEMErrorCode getBc(boost::shared_ptr< BC > &bc_vec_ptr, const std::string block_name, const int nb_attributes)
CommInterface::EntitiesPetscVector vertexExchange
boost::shared_ptr< BcRotVec > bcSpatialRotationVecPtr
boost::shared_ptr< Range > maxMovedFaces
static PetscBool dynamicRelaxation
const std::string spatialH1Disp
MoFEMErrorCode solveElastic(TS ts, Vec x)
static double d_f_log(const double v)
boost::shared_ptr< NormalDisplacementBcVec > bcSpatialNormalDisplacementVecPtr
static double crackingStartTime
static enum MaterialModel materialModel
MoFEMErrorCode getOptions()
const std::string piolaStress
MoFEMErrorCode setElasticElementToTs(DM dm)
static double inv_d_f_log_e(const double v)
int contactRefinementLevels
MoFEMErrorCode gettingNorms()
[Getting norms]
std::vector< std::string > a00FieldList
MoFEMErrorCode setVolumeElementOps(const int tag, const bool add_elastic, const bool add_material, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< VolumeElementForcesAndSourcesCore > &fe_lhs)
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Getting interface of core database.
const std::string bubbleField
boost::shared_ptr< AnalyticalDisplacementBcVec > bcSpatialAnalyticalDisplacementVecPtr
SmartPetscObj< DM > dmMaterial
Material problem.
MoFEMErrorCode calculateOrientation(const int tag, bool set_orientation)
static double inv_f_log(const double v)
boost::shared_ptr< VolumeElementForcesAndSourcesCore > elasticFeLhs
static PetscBool noStretch
MoFEMErrorCode setNewFrontCoordinates()
boost::shared_ptr< ParentFiniteElementAdjacencyFunctionSkeleton< 2 > > parentAdjSkeletonFunctionDim2
boost::shared_ptr< ContactTree > contactTreeRhs
Make a contact tree.
static double exponentBase
MoFEMErrorCode setContactElementRhsOps(boost::shared_ptr< ContactTree > &fe_contact_tree)
static double dd_f_linear(const double v)
MoFEMErrorCode setFaceElementOps(const bool add_elastic, const bool add_material, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_rhs, boost::shared_ptr< FaceElementForcesAndSourcesCore > &fe_lhs)
MoFEMErrorCode postProcessSkeletonResults(const int tag, const std::string file, Vec f_residual=PETSC_NULLPTR, std::vector< Tag > tags_to_transfer={})
boost::shared_ptr< AnalyticalExprPython > AnalyticalExprPythonPtr
boost::shared_ptr< Range > skeletonFaces
boost::shared_ptr< PhysicalEquations > physicalEquations
const std::string rotAxis
static double inv_d_f_linear(const double v)
BitRefLevel bitAdjParentMask
bit ref level for parent parent
MoFEMErrorCode solveDynamicRelaxation(TS ts, Vec x, int start_step, double start_time)
Solve problem using dynamic relaxation method.
static double inv_dd_f_log(const double v)
const std::string contactDisp
static std::string internalStressTagName
static enum SymmetrySelector symmetrySelector
CommInterface::EntitiesPetscVector edgeExchange
SmartPetscObj< DM > dmPrjSpatial
Projection spatial displacement.
static boost::function< double(const double)> f
boost::shared_ptr< BcDispVec > bcSpatialDispVecPtr
const std::string skinElement
static PetscBool internalStressVoigt
static double inv_dd_f_linear(const double v)
MoFEMErrorCode getSpatialTractionFreeBc(const EntityHandle meshset=0)
static double inv_dd_f_log_e(const double v)
MoFEMErrorCode getExternalStrain()
MoFEMErrorCode getSpatialTractionBc()
static PetscBool setSingularity
static double d_f_log_e(const double v)
boost::shared_ptr< AnalyticalTractionBcVec > bcSpatialAnalyticalTractionVecPtr
static double f_log_e_quadratic(const double v)
MoFEMErrorCode addCrackSurfaces(const bool debug=false)
MoFEMErrorCode addDMs(const BitRefLevel bit=BitRefLevel().set(0), const EntityHandle meshset=0)
MoFEMErrorCode getSpatialDispBc()
[Getting norms]
BitRefLevel bitAdjParent
bit ref level for parent
MoFEMErrorCode postProcessResults(const int tag, const std::string file, Vec f_residual=PETSC_NULLPTR, Vec var_vec=PETSC_NULLPTR, std::vector< Tag > tags_to_transfer={})
static double d_f_log_e_quadratic(const double v)
CommInterface::EntitiesPetscVector volumeExchange
MoFEMErrorCode saveOrgCoords()
const std::string naturalBcElement
static boost::function< double(const double)> dd_f
static double f_log_e(const double v)
static constexpr double v_min
static int addCrackMeshsetId
static double inv_f_log_e(const double v)
MoFEMErrorCode createExchangeVectors(Sev sev)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
boost::shared_ptr< Range > crackFaces
static boost::function< double(const double)> d_f
boost::shared_ptr< Range > frontVertices
static enum EnergyReleaseSelector energyReleaseSelector
MoFEMErrorCode addMaterial_HMHNeohookean(const int tape, const double c10, const double K)
static boost::function< double(const double)> inv_d_f
boost::shared_ptr< PressureBcVec > bcSpatialPressureVecPtr
static double d_f_linear(const double v)
const std::string hybridSpatialDisp
SmartPetscObj< Vec > solTSStep
static double f_log(const double v)
CommInterface::EntitiesPetscVector faceExchange
SmartPetscObj< DM > dmElastic
Elastic problem.
boost::shared_ptr< Range > frontEdges
static boost::function< double(const double)> inv_f
const std::string stretchTensor
BitRefLevel bitAdjEntMask
bit ref level for parent parent
static double f_linear(const double v)
const std::string contactElement
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
base class for all interface classes
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.