43 static boost::function<
double(
const double)>
f;
51 static inline constexpr double v_max = 12;
56 double e =
static_cast<double>(std::exp(
v_max));
58 return 0.5 * e * dv * dv + e * dv + e;
60 return static_cast<double>(std::exp(
v));
66 double e =
static_cast<double>(std::exp(
v_max));
70 return static_cast<double>(std::exp(
v));
76 return static_cast<double>(std::exp(
v_max));
78 return static_cast<double>(std::exp(
v));
100 return std::exp(
v_max);
128 return 1. / exp(
v_min);
132 return -1. / (
v *
v);
173 UnknownInterface **iface)
const;
187 SmartPetscObj<DM>
dM;
234 boost::shared_ptr<AnalyticalDisplacementBcVec>
242 template <
typename BC>
243 MoFEMErrorCode
getBc(boost::shared_ptr<BC> &bc_vec_ptr,
244 const std::string block_name,
const int nb_attributes) {
249 (boost::format(
"%s(.*)") % block_name).str()
254 std::vector<double> block_attributes;
255 CHKERR it->getAttributes(block_attributes);
256 if (block_attributes.size() < nb_attributes) {
258 "In block %s expected %d attributes, but given %ld",
259 it->getName().c_str(), nb_attributes, block_attributes.size());
264 bc_vec_ptr->emplace_back(it->getName(), block_attributes, faces);
278 boost::make_shared<DynamicRelaxationTimeScale>(
"rotation_history.txt");
281 GetBlockScalingMethod<DynamicRelaxationTimeScale>::get(
282 ts_rotation,
"rotation_history",
".txt", bc.blockName);
301 boost::shared_ptr<TractionFreeBc> &bc_ptr,
302 const std::string contact_set_name);
304 inline MoFEMErrorCode
307 boost::shared_ptr<TractionFreeBc>(
new TractionFreeBc());
320 MoFEMErrorCode
addDMs(
const BitRefLevel
bit = BitRefLevel().set(0),
326 const double sigma_y);
331 const double sigma_y);
339 const int tag,
const bool do_rhs,
const bool do_lhs,
340 const bool calc_rates, SmartPetscObj<Vec> ver_vec,
341 boost::shared_ptr<VolumeElementForcesAndSourcesCore> fe);
344 const int tag,
const bool add_elastic,
const bool add_material,
345 boost::shared_ptr<VolumeElementForcesAndSourcesCore> &fe_rhs,
346 boost::shared_ptr<VolumeElementForcesAndSourcesCore> &fe_lhs);
350 boost::shared_ptr<FaceElementForcesAndSourcesCore> &fe_rhs,
351 boost::shared_ptr<FaceElementForcesAndSourcesCore> &fe_lhs);
355 boost::shared_ptr<ContactTree> &fe_contact_tree
369 Vec f_residual = PETSC_NULLPTR,
370 Vec var_vec = PETSC_NULLPTR,
371 std::vector<Tag> tags_to_transfer = {});
374 Vec f_residual = PETSC_NULLPTR,
375 std::vector<Tag> tags_to_transfer = {});
378 boost::shared_ptr<double> area_ptr);
388 virtual MoFEMErrorCode
setUp(TS) = 0;
396 using TimeScale::TimeScale;
402 return TimeScale::getScale(time);
423 boost::shared_ptr<ParentFiniteElementAdjacencyFunctionSkeleton<2>>
443 Mat
S = PETSC_NULLPTR;
447 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)
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)
boost::shared_ptr< Range > materialSkeletonFaces
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
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
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
MoFEMErrorCode getOptions()
const std::string piolaStress
MoFEMErrorCode setElasticElementToTs(DM dm)
static double inv_d_f_log_e(const double v)
int contactRefinementLevels
MoFEMErrorCode gettingNorms()
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
MoFEMErrorCode solveDynamicRelaxation(TS ts, Vec x)
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
static boost::function< double(const double)> d_f
boost::shared_ptr< Range > skeletonFaces
boost::shared_ptr< PhysicalEquations > physicalEquations
static boost::function< double(const double)> f
const std::string rotAxis
static double inv_d_f_linear(const double v)
BitRefLevel bitAdjParentMask
bit ref level for parent parent
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)> inv_d_f
boost::shared_ptr< BcDispVec > bcSpatialDispVecPtr
static boost::function< double(const double)> inv_f
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)
static int nbJIntegralLevels
MoFEMErrorCode addCrackSurfaces(const bool debug=false)
MoFEMErrorCode addDMs(const BitRefLevel bit=BitRefLevel().set(0), const EntityHandle meshset=0)
MoFEMErrorCode getSpatialDispBc()
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 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
boost::shared_ptr< Range > frontVertices
static enum EnergyReleaseSelector energyReleaseSelector
MoFEMErrorCode addMaterial_HMHNeohookean(const int tape, const double c10, const double K)
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.
static boost::function< double(const double)> inv_dd_f
EshelbianCore(MoFEM::Interface &m_field)
boost::shared_ptr< Range > frontEdges
static boost::function< double(const double)> dd_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.