17#include <boost/math/constants/constants.hpp>
19constexpr double third = boost::math::constants::third<double>();
24 const bool eval_rhs,
const bool eval_lhs,
25 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
26 boost::shared_ptr<PhysicalEquations> physics_ptr) {
32 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const double alpha_u) {
38 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
39 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
40 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv) {
45 std::string row_field, std::string col_field,
46 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
const double alpha) {
52 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
54 boost::shared_ptr<TopologicalData> topo_ptr,
const double alpha_u,
55 boost::shared_ptr<double> J_ptr) {
60 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
61 boost::shared_ptr<double> total_energy_ptr) {
66 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
67 boost::shared_ptr<PhysicalEquations> physics_ptr,
68 boost::shared_ptr<MatrixDouble> strain_ptr) {
73 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
74 boost::shared_ptr<PhysicalEquations> physics_ptr,
75 boost::shared_ptr<MatrixDouble> strain_ptr,
78 std::move(data_ptr), std::move(physics_ptr), std::move(strain_ptr));
83 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
84 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv) {
89 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
90 boost::shared_ptr<PhysicalEquations> physics_ptr) {
105 physicalEquations = boost::make_shared<HMHNeohookean>(mField, c10,
K);
113 physicalEquations = boost::make_shared<HMHStorakers>(mField,
eta,
mu, beta);
119 physicalEquations = boost::make_shared<HMHHencky>(mField,
E, nu);
124 boost::weak_ptr<MatOps::PhysicalEquations> mat_physical_equations_ptr) {
126 physicalEquations = boost::make_shared<MatPhysicalEquations>(
127 mat_physical_equations_ptr.lock());
Auxilary functions for Eshelbian plasticity.
Eshelbian plasticity interface.
Abaqus-compatible compressible Neo-Hookean material in principal stretches.
Storakers material model.
#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()
ForcesAndSourcesCore::UserDataOperator UserDataOperator
boost::shared_ptr< VectorDouble > VectorPtr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
constexpr auto field_name
MoFEMErrorCode addMaterial_Hencky(double E, double nu)
MoFEMErrorCode addMaterial_HMHStorakers(const double eta, const double mu, const double beta)
MoFEMErrorCode addMaterial_HMHNeohookean(const double c10, const double K)
MoFEMErrorCode addMaterial_Core(boost::weak_ptr< MatOps::PhysicalEquations > mat_physical_equations_ptr)
virtual VolUserDataOperator * returnOpCalculateExternalPressure(VectorPtr external_pressure_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
virtual VolUserDataOperator * returnOpCalculateVarStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpCalculateEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
virtual UserDataOperator * returnOpJacobian(const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
virtual VolUserDataOperator * returnOpSpatialPhysicalExternalStrain(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
virtual VolUserDataOperator * returnOpTopoSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, SmartPetscObj< Vec > assemble_vec, boost::shared_ptr< TopologicalData > topo_ptr, const double alpha_u, boost::shared_ptr< double > J_ptr)
virtual VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr, boost::shared_ptr< MatrixDouble > strain_ptr=nullptr)
virtual VolUserDataOperator * returnOpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
intrusive_ptr for managing petsc objects