template <int DIM>
struct OpDomainRhsHydrostaticStress
public:
OpDomainRhsHydrostaticStress(std::string field_name1,
boost::shared_ptr<VectorDouble> p_ptr,
std::function<
double(
const double,
const double,
const double)>
multiplier_func)
MoFEMErrorCode
iNtegrate(DataForcesAndSourcesCore::EntData &data) {
const int nb_dofs = data.getIndices().size();
if (nb_dofs) {
auto &nf = AssemblyDomainEleOp::locF;
const double measure = getMeasure();
const int nb_integration_points = getGaussPts().size2();
auto t_w = getFTensor0IntegrationWeight();
auto t_base_diff = data.getFTensor1DiffN<DIM>();
auto t_p = getFTensor0FromVec(*
pPtr);
for (int gg = 0; gg != nb_integration_points; gg++) {
auto t_nf = getFTensor1FromPtr<DIM>(&nf[0]);
const double a = t_w * measure * t_p * biot;
for (int rr = 0; rr != nb_dofs / DIM; rr++) {
t_nf(
i) -= t_base_diff(
i) *
a;
++t_base_diff;
++t_nf;
}
++t_w;
++t_p;
}
}
}
private:
boost::shared_ptr<VectorDouble>
pPtr;
};
}
#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()
FTensor::Index< 'i', SPACE_DIM > i
MoFEMErrorCode iNtegrate(DataForcesAndSourcesCore::EntData &data)
boost::shared_ptr< VectorDouble > pPtr
std::function< double(const double, const double, const double)> multiplier_func
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp