8#ifndef __ADOLC_OPS_HPP__
9#define __ADOLC_OPS_HPP__
24 <<
"Tag name: " << name
25 <<
" is already registered with tag: " << it->second
26 <<
". Overwriting with new tag: " << tag;
30 if (p.second == tag) {
32 "Tag: " + std::to_string(tag) +
33 " is already registered with name: " + p.first);
43 if (p.second > max_tag) {
53 <<
"Tag name: " << name
75struct ADolCData :
public boost::enable_shared_from_this<ADolCData> {
80 virtual std::pair<bool, MatrixPtr>
82 const MatrixDouble &data = MatrixDouble(),
85 virtual std::pair<bool, MatrixPtr>
87 const MatrixDouble &data = MatrixDouble(),
90 virtual std::pair<bool, MatrixPtr>
92 const MatrixDouble &data = MatrixDouble(),
95 virtual std::pair<bool, MatrixPtr>
97 const MatrixDouble &data = MatrixDouble(),
105 virtual MoFEMErrorCode
107 virtual MoFEMErrorCode
110 std::vector<double> &dependent_variables_derivatives) = 0;
112 virtual MoFEMErrorCode
115 const std::vector<double> &dependent_variables) = 0;
117 const std::vector<double> &dependent_variables_derivatives) = 0;
127 boost::shared_ptr<ADolCData> adolc_data_ptr,
int tag,
128 boost::shared_ptr<std::map<int, Range>> tag_vs_range_ptr =
nullptr)
133 virtual MoFEMErrorCode
138 virtual ForcesAndSourcesCore::UserDataOperator *
139 createOp(boost::shared_ptr<PhysicalEquations> physical_ptr,
bool eval_stress,
140 bool eval_tangent) = 0;
149 return adolcDataPtr->setDependentDerivativesContinuousVector(
159 return adolcDataPtr->getDependentDerivativesContinuousVector(
192template <
class MODEL,
int MODEL_TYPE>
193boost::shared_ptr<PhysicalEquations>
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
@ MOFEM_OPERATION_UNSUCCESSFUL
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
boost::shared_ptr< ADolCData > createADolCDataPtr()
boost::shared_ptr< PhysicalEquations > createAdolCPhysicalEquationsPtr(boost::shared_ptr< ADolCData > adolc_data_ptr, int tag)
virtual MoFEMErrorCode getActiveContinuousVector(const std::vector< double > &active_variables)=0
virtual std::pair< bool, MatrixPtr > insertDependentDerivativesData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
virtual std::pair< bool, MatrixPtr > insertActiveData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
virtual MoFEMErrorCode getDependentDerivativesContinuousVector(const std::vector< double > &dependent_variables_derivatives)=0
virtual MatrixPtr getActiveDataPtr(const std::string &name)=0
virtual MoFEMErrorCode setActiveContinuousVector(std::vector< double > &active_variables)=0
virtual MatrixPtr getDependentDataPtr(const std::string &name)=0
virtual MatrixPtr getCommonDataPtr(const std::string &name)=0
boost::shared_ptr< MatrixDouble > MatrixPtr
virtual std::pair< bool, MatrixPtr > insertDependentData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
virtual MatrixPtr getDependentDerivativesDataPtr(const std::string &name)=0
virtual MoFEMErrorCode setDependentContinuousVector(std::vector< double > &dependent_variables)=0
virtual ~ADolCData()=default
virtual MoFEMErrorCode getDependentContinuousVector(const std::vector< double > &dependent_variables)=0
virtual MoFEMErrorCode setDependentDerivativesContinuousVector(std::vector< double > &dependent_variables_derivatives)=0
virtual std::pair< bool, MatrixPtr > insertCommonData(const std::string &name, const MatrixDouble &data=MatrixDouble(), int shift=0)=0
OpMaterialFactory()=delete
MoFEMErrorCode setDependentDerivativesContinuousVector()
MoFEMErrorCode getDependentDerivativesContinuousVector()
std::vector< std::pair< Range, std::vector< double > > > paramVecByRange
virtual ForcesAndSourcesCore::UserDataOperator * createOp(boost::shared_ptr< PhysicalEquations > physical_ptr, bool eval_stress, bool eval_tangent)=0
std::vector< double > dependentVariablesDerivatives
MoFEMErrorCode setActiveContinuousVector()
MoFEMErrorCode getActiveContinuousVector()
std::vector< double > dependentVariables
PhysicalEquations(boost::shared_ptr< ADolCData > adolc_data_ptr, int tag, boost::shared_ptr< std::map< int, Range > > tag_vs_range_ptr=nullptr)
MoFEMErrorCode getDependentContinuousVector()
virtual ~PhysicalEquations()=default
boost::shared_ptr< std::map< int, Range > > tagVsRangePtr
PhysicalEquations()=delete
MoFEMErrorCode setDependentContinuousVector()
virtual MoFEMErrorCode recordTape()=0
virtual MoFEMErrorCode getOptions(MoFEM::Interface *m_field_ptr=nullptr)=0
boost::shared_ptr< ADolCData > adolcDataPtr
virtual MoFEMErrorCode setParams(EntityHandle ent, int gg)=0
std::vector< double > activeVariables
Deprecated interface functions.