template <int DIM>
struct OpDomainRhsHydrostaticStress
public:
boost::shared_ptr<VectorDouble> h_ptr,
double specific_weight_water = 9.81)
MoFEMErrorCode
iNtegrate(DataForcesAndSourcesCore::EntData &data) {
const int nb_dofs = data.getIndices().size();
if (nb_dofs) {
auto &nf = AssemblyDomainEleOp::locF;
const double area = getMeasure();
const int nb_integration_points = getGaussPts().size2();
auto t_w = getFTensor0IntegrationWeight();
auto t_base_diff = data.getFTensor1DiffN<DIM>();
auto t_h = getFTensor0FromVec(*
hPtr);
for (int gg = 0; gg != nb_integration_points; gg++) {
auto t_nf = getFTensor1FromPtr<DIM>(&nf[0]);
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_h;
}
}
}
private:
boost::shared_ptr<VectorDouble>
hPtr;
};
}
#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)
OpDomainRhsHydrostaticStress(std::string field_name1, boost::shared_ptr< VectorDouble > h_ptr, double specific_weight_water=9.81)
boost::shared_ptr< VectorDouble > hPtr
double specificWeightWater
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp