11#ifndef ADOLC_OPS_STRETCH_HPP
12#define ADOLC_OPS_STRETCH_HPP
48 template <AssemblyType A, IntegrationType I,
typename DomainEleOp>
51 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
53 boost::shared_ptr<PhysicalEquations> physical_equations_ptr,
54 Sev sev = Sev::noisy) {
56 constexpr int DIM = (MODEL_TYPE ==
MODEL_3D) ? 3 : 2;
57 auto op_this = getPipThis<DomainEleOp>(m_field, pip, fe_name,
field_name,
58 physical_equations_ptr, sev);
59 auto m_grad_grad = boost::make_shared<MatrixDouble>();
60 op_this->getOpPtrVector().push_back(
62 op_this->getOpPtrVector().push_back(
63 physical_equations_ptr->createOp(physical_equations_ptr,
true,
false));
64 auto m_k = physical_equations_ptr->adolcDataPtr->getCommonDataPtr(
"k");
65 op_this->getOpPtrVector().push_back(
70 template <AssemblyType A, IntegrationType I,
typename DomainEleOp>
73 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
75 boost::shared_ptr<PhysicalEquations> physical_equations_ptr,
76 Sev sev = Sev::noisy) {
78 constexpr int DIM = (MODEL_TYPE ==
MODEL_3D) ? 3 : 2;
79 auto op_this = getPipThis<DomainEleOp>(m_field, pip, fe_name,
field_name,
80 physical_equations_ptr, sev);
81 auto m_grad_grad = boost::make_shared<MatrixDouble>();
82 op_this->getOpPtrVector().push_back(
84 op_this->getOpPtrVector().push_back(
85 physical_equations_ptr->createOp(physical_equations_ptr,
true,
true));
86 auto m_k = physical_equations_ptr->adolcDataPtr->getCommonDataPtr(
"k");
88 physical_equations_ptr->adolcDataPtr->getCommonDataPtr(
"k_dF");
89 op_this->getOpPtrVector().push_back(
91 op_this->getOpPtrVector().push_back(
98 template <
typename DomainEleOp>
101 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pip,
103 boost::shared_ptr<PhysicalEquations> physical_equations_ptr,
106 auto ¶m_vec_by_range = physical_equations_ptr->paramVecByRange;
108 auto r = boost::make_shared<Range>();
109 for (
auto &p : param_vec_by_range) {
112 MOFEM_LOG(
"WORLD", Sev::inform) <<
"HuHu number of entities " << r->size();
114 constexpr int DIM = (MODEL_TYPE ==
MODEL_3D) ? 3 : 2;
118 auto space = field_structure->getSpace();
122 pip.push_back(op_this);
123 auto this_fe_ptr = op_this->getThisFEPtr();
124 auto &this_pip = op_this->getOpPtrVector();
125 this_fe_ptr->getRuleHook = [](
int order_row,
int order_col,
127 return 2 * (order_data - 1);
130 auto base_mass = boost::make_shared<MatrixDouble>();
131 auto data_l2 = boost::make_shared<EntitiesFieldData>(MBENTITYSET);
132 auto jac_ptr = boost::make_shared<MatrixDouble>();
133 auto det_ptr = boost::make_shared<VectorDouble>();
134 auto inv_jac_ptr = boost::make_shared<MatrixDouble>();
145 BaseDerivatives::SecondDerivative, base_mass, data_l2, base, space));
158 <<
"Unsupported space: " << space <<
" for field: " <<
field_name;
163 physical_equations_ptr->adolcDataPtr->getCommonDataPtr(
"grad");
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
@ L2
field with C-1 continuity
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
virtual const Field * get_field_structure(const std::string &name, enum MoFEMTypes bh=MF_EXIST) const =0
get field structure
#define MOFEM_LOG(channel, severity)
Log.
SeverityLevel
Severity levels.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
constexpr IntegrationType I
constexpr auto field_name
OpMaterialFactory()=delete
static auto getPipThis(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string fe_name, std::string field_name, boost::shared_ptr< PhysicalEquations > physical_equations_ptr, Sev sev)
static MoFEMErrorCode opRhsFactory(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string fe_name, std::string field_name, boost::shared_ptr< PhysicalEquations > physical_equations_ptr, Sev sev=Sev::noisy)
static MoFEMErrorCode opLhsFactory(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string fe_name, std::string field_name, boost::shared_ptr< PhysicalEquations > physical_equations_ptr, Sev sev=Sev::noisy)
Deprecated interface functions.
FieldApproximationBase getApproxBase() const
Get approximation basis type.
Get field gradients at integration pts for scalar field rank 0, i.e. vector field.
Operator for inverting matrices at integration points.
Execute "this" element in the operator.
Set inverse jacobian to base functions.