6#ifndef __BODY_FORCE_HPP 
    7#define __BODY_FORCE_HPP 
   47    MoFEMErrorCode 
doWork(
int side, EntityType type,
 
   48                          EntitiesFieldData::EntData &data) {
 
   51      if (data.getIndices().size() == 0)
 
   57      const auto &dof_ptr = data.getFieldDofs()[0];
 
   58      int rank = dof_ptr->getNbOfCoeffs();
 
   59      int nb_row_dofs = data.getIndices().size() / rank;
 
   61      Nf.resize(data.getIndices().size());
 
   62      bzero(&*
Nf.data().begin(), data.getIndices().size() * 
sizeof(FieldData));
 
   64      for (
unsigned int gg = 0; gg < data.getN().size1(); gg++) {
 
   66        for (
int rr = 0; rr < rank; rr++) {
 
   70            acc = -
dAta.data.acceleration_x;
 
   72            acc = -
dAta.data.acceleration_y;
 
   74            acc = -
dAta.data.acceleration_z;
 
   76            SETERRQ(PETSC_COMM_SELF, 1, 
"data inconsistency");
 
   78          acc *= 
dAta.data.density;
 
   79          cblas_daxpy(nb_row_dofs, val * acc, &data.getN()(gg, 0), 1, &
Nf[rr],
 
   84      if (
F == PETSC_NULLPTR)
 
   87      CHKERR VecSetValues(
F, data.getIndices().size(), &data.getIndices()[0],
 
 
 
   95    const CubitMeshSets *cubit_meshset_ptr;
 
   96    MeshsetsManager *mmanager_ptr;
 
  101    CHKERR cubit_meshset_ptr->getAttributeDataStructure(
mapData[ms_id]);
 
 
 
DEPRECATED typedef BodyForceConstantField BodyFroceConstantField
USe BodyForceConstantField.
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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()
#define CHKERR
Inline error check.
implementation of Data Operators for Forces and Sources
constexpr auto field_name
MyVolumeFE(MoFEM::Interface &m_field)
OpBodyForce(const std::string field_name, Block_BodyForces &data, Range block_tets)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
OpBodyForce(const std::string field_name, Vec _F, Block_BodyForces &data, Range block_tets)
MoFEM::Interface & mField
std::map< int, Block_BodyForces > mapData
BodyForceConstantField(MoFEM::Interface &m_field)
MoFEMErrorCode addBlock(const std::string field_name, Vec F, int ms_id)
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
boost::shared_ptr< const NumeredEntFiniteElement > getNumeredEntFiniteElementPtr() const
Return raw pointer to NumeredEntFiniteElement.
@ OPROW
operator doWork function is executed on FE rows
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
double getVolume() const
element volume (linear geometry)
Volume finite element base.
VolumeElementForcesAndSourcesCore(Interface &m_field)