42struct MatOpsData :
public boost::enable_shared_from_this<MatOpsData> {
60 virtual std::pair<bool, MatrixPtr>
66 virtual std::pair<bool, MatrixPtr>
72 virtual std::pair<bool, MatrixPtr>
78 virtual std::pair<bool, MatrixPtr>
96 EntityHandle ent,
int gg) = 0;
102 const std::string &tag_name,
103 int num_components) = 0;
115 std::vector<double> &dependent_variables_derivatives) = 0;
122 const std::vector<double> &dependent_variables) = 0;
125 const std::vector<double> &dependent_variables_derivatives) = 0;
135 EntityHandle entity,
int gg);
138 EntityHandle entity,
int gg);
151 boost::shared_ptr<MatOpsData> mat_ops_data_ptr,
int tag,
152 boost::shared_ptr<std::map<int, Range>> tag_vs_range_ptr =
nullptr)
163 int block_id,
const Range &block_entities,
164 const std::vector<double> &block_data) {
173 createOp(boost::shared_ptr<PhysicalEquations> physical_ptr,
bool eval_stress,
174 bool eval_tangent,
bool update) = 0;
177 boost::shared_ptr<MatOpsData>,
int, EntityHandle,
int)>;
225boost::shared_ptr<MatOpsData>
244template <
class MODEL,
int MODEL_TYPE>
245boost::shared_ptr<PhysicalEquations>
std::map< std::string, std::string > DataDictionary
std::vector< StateTag > StateTags
boost::shared_ptr< PhysicalEquations > createMatOpsPhysicalEquationsPtr(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag)
boost::shared_ptr< MatOpsData > createMatOpsDataPtr()
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
static MoFEMErrorCode evaluateVariable(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag, EntityHandle entity, int gg)
static std::vector< double > dependentVariablesDerivatives
static std::vector< double > dependentVariables
static MoFEMErrorCode evaluateDerivatives(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag, EntityHandle entity, int gg)
static std::vector< double > activeVariables
static std::vector< double * > jacPtrVec
Conservative elastic response with a stored-energy density.
Base for user-defined material data, supporting dynamic_pointer_cast.
virtual ~UserData()=default
virtual boost::shared_ptr< UserData > getUserDataPtr() const =0
Get the optional user-defined material data.
virtual MoFEMErrorCode setActiveContinuousVector(std::vector< double > &active_variables)=0
Pack active matrices into a contiguous vector in registration order.
virtual MoFEMErrorCode getDependentDerivativesContinuousVector(const std::vector< double > &dependent_variables_derivatives)=0
Unpack a contiguous vector into the registered response derivatives.
virtual MoFEMErrorCode setDependentDerivativesContinuousVector(std::vector< double > &dependent_variables_derivatives)=0
Pack response derivatives into a contiguous vector in registration order.
virtual MatrixPtr getActiveDataPtr(const std::string &name)=0
Access independent-variable storage by name.
virtual std::pair< bool, MatrixPtr > insertDependentData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
Constitutive responses, such as stress, depending on the active variables.
virtual MoFEMErrorCode setupStateData()=0
Find or create the registered MOAB state tags, preserving existing values.
virtual std::pair< bool, MatrixPtr > insertActiveData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
Independent constitutive variables, such as the deformation gradient.
boost::shared_ptr< MatrixAdaptor > StateMatrixPtr
virtual MoFEMErrorCode bindStateTag(MoFEM::Interface &m_field, const std::string &tag_name, int num_components)=0
Register a state name and its number of components per integration point.
virtual ~MatOpsData()=default
virtual MoFEMErrorCode getActiveContinuousVector(const std::vector< double > &active_variables)=0
Unpack a contiguous vector into the registered active matrices.
virtual std::pair< bool, MatrixPtr > insertCommonData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
Shared evaluation data, such as field values at quadrature points.
boost::shared_ptr< MatrixDouble > MatrixPtr
virtual MatrixPtr getCommonDataPtr(const std::string &name)=0
Access shared evaluation storage by name.
virtual StateTags getStateTags() const =0
Bound state-tag descriptors, not copies of the stored values.
virtual StateMatrixPtr getStateDataPtr(const std::string &name, EntityHandle ent, int gg)=0
virtual MatrixPtr getDependentDataPtr(const std::string &name)=0
Access constitutive-response storage by name.
virtual MoFEMErrorCode setDependentContinuousVector(std::vector< double > &dependent_variables)=0
Pack response matrices into a contiguous vector in registration order.
virtual MatrixPtr getDependentDerivativesDataPtr(const std::string &name)=0
Access response-derivative storage by name.
virtual std::pair< bool, MatrixPtr > insertDependentDerivativesData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
Derivatives of the dependent responses with respect to active variables.
virtual MoFEMErrorCode getDependentContinuousVector(const std::vector< double > &dependent_variables)=0
Unpack a contiguous vector into the registered response matrices.
virtual void setUserDataPtr(boost::shared_ptr< UserData > user_data_ptr)=0
Set data owned by this container; back-references should be weak.
Constitutive response expressed by first Piola stress.
static bool useDeformationGradient
Otherwise the displacement gradient is supplied and I is added.
OpMaterialFactory()=delete
PhysicalEquations(boost::shared_ptr< MatOpsData > mat_ops_data_ptr, int tag, boost::shared_ptr< std::map< int, Range > > tag_vs_range_ptr=nullptr)
virtual MoFEMErrorCode recordTape()=0
virtual ~PhysicalEquations()=default
virtual MoFEMErrorCode setParams(FEMethod *fe_ptr, int gg)=0
virtual MoFEMErrorCode addBlockParameters(MoFEM::Interface &m_field, const std::string &block_name, int block_id, const Range &block_entities, const std::vector< double > &block_data)
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
boost::shared_ptr< std::map< int, Range > > tagVsRangePtr
boost::shared_ptr< MatOpsData > matOpsDataPtr
virtual MoFEMErrorCode evaluateVariable(int tag, EntityHandle entity, int gg)
virtual MoFEMErrorCode evaluateDerivatives(int tag, EntityHandle entity, int gg)
virtual ForcesAndSourcesCore::UserDataOperator * createOp(boost::shared_ptr< PhysicalEquations > physical_ptr, bool eval_stress, bool eval_tangent, bool update)=0
HookFunction hookUpdateState
HookFunction hookEvaluateVariable
PhysicalEquations()=delete
HookFunction hookEvaluateDerivatives
virtual MoFEMErrorCode getOptions(MoFEM::Interface *m_field_ptr=nullptr)=0
std::function< MoFEMErrorCode(boost::shared_ptr< MatOpsData >, int, EntityHandle, int)> HookFunction
virtual MoFEMErrorCode updateState(int tag, EntityHandle entity, int gg)
Deprecated interface functions.
Structure for user loop methods on finite elements.