#ifndef __MAT_OPS_HPP__
#define __MAT_OPS_HPP__
struct StateTag {
};
struct MatOpsTagsRegistry {
static int setTagName(std::string name,
int tag = -1);
protected:
};
struct MatOpsData : public boost::enable_shared_from_this<MatOpsData> {
using MatrixPtr = boost::shared_ptr<MatrixDouble>;
virtual std::pair<bool, MatrixPtr>
const MatrixDouble &data = MatrixDouble(),
int shift = 0) = 0;
virtual std::pair<bool, MatrixPtr>
const MatrixDouble &data = MatrixDouble(),
int shift = 0) = 0;
virtual std::pair<bool, MatrixPtr>
const MatrixDouble &data = MatrixDouble(),
int shift = 0) = 0;
virtual std::pair<bool, MatrixPtr>
const MatrixDouble &data = MatrixDouble(),
int shift = 0) = 0;
const std::string &tag_name,
int num_components) = 0;
virtual MoFEMErrorCode
virtual MoFEMErrorCode
std::vector<double> &dependent_variables_derivatives) = 0;
virtual MoFEMErrorCode
const std::vector<double> &dependent_variables) = 0;
const std::vector<double> &dependent_variables_derivatives) = 0;
};
struct AdolCEvaluation {
static MoFEMErrorCode
static MoFEMErrorCode
private:
inline static std::vector<double *>
jacPtrVec;
};
struct 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
virtual ForcesAndSourcesCore::UserDataOperator *
createOp(boost::shared_ptr<PhysicalEquations> physical_ptr,
bool eval_stress,
bool eval_tangent, bool update) = 0;
}
int gg) {
}
}
};
boost::weak_ptr<MatOpsData>,
};
struct MODEL {
};
template <class MODEL, int MODEL_TYPE>
boost::shared_ptr<PhysicalEquations>
int tag);
template <class MODEL, int MODEL_TYPE> struct OpMaterialFactory {
};
}
#endif
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()
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
virtual MoFEMErrorCode setActiveContinuousVector(std::vector< double > &active_variables)=0
virtual MoFEMErrorCode getDependentDerivativesContinuousVector(const std::vector< double > &dependent_variables_derivatives)=0
virtual MoFEMErrorCode setDependentDerivativesContinuousVector(std::vector< double > &dependent_variables_derivatives)=0
virtual MatrixPtr getActiveDataPtr(const std::string &name)=0
virtual std::pair< bool, MatrixPtr > insertDependentData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
virtual MoFEMErrorCode setupStateData()=0
virtual std::pair< bool, MatrixPtr > insertActiveData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
boost::shared_ptr< MatrixAdaptor > StateMatrixPtr
virtual MoFEMErrorCode bindStateTag(MoFEM::Interface &m_field, const std::string &tag_name, int num_components)=0
virtual ~MatOpsData()=default
virtual MoFEMErrorCode getActiveContinuousVector(const std::vector< double > &active_variables)=0
virtual std::pair< bool, MatrixPtr > insertCommonData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
boost::shared_ptr< MatrixDouble > MatrixPtr
virtual MatrixPtr getCommonDataPtr(const std::string &name)=0
virtual StateTags getStateTags() const =0
virtual StateMatrixPtr getStateDataPtr(const std::string &name, EntityHandle ent, int gg)=0
virtual MatrixPtr getDependentDataPtr(const std::string &name)=0
virtual MoFEMErrorCode setDependentContinuousVector(std::vector< double > &dependent_variables)=0
virtual MatrixPtr getDependentDerivativesDataPtr(const std::string &name)=0
virtual std::pair< bool, MatrixPtr > insertDependentDerivativesData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
virtual MoFEMErrorCode getDependentContinuousVector(const std::vector< double > &dependent_variables)=0
OpMaterialFactory()=delete
virtual MoFEMErrorCode recordTape()=0
virtual ~PhysicalEquations()=default
virtual MoFEMErrorCode setParams(FEMethod *fe_ptr, int gg)=0
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.