|
| v0.14.0
|
Go to the documentation of this file.
6 #ifndef __BODY_FORCE_HPP
7 #define __BODY_FORCE_HPP
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],
95 const CubitMeshSets *cubit_meshset_ptr;
96 MeshsetsManager *mmanager_ptr;
101 CHKERR cubit_meshset_ptr->getAttributeDataStructure(
mapData[ms_id]);
117 #endif //__BODY_FORCE_HPP
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
MoFEM::Interface & mField
MoFEMErrorCode addBlock(const std::string field_name, Vec F, int ms_id)
OpBodyForce(const std::string field_name, Vec _F, Block_BodyForces &data, Range block_tets)
BodyForceConstantField(MoFEM::Interface &m_field)
MyVolumeFE(MoFEM::Interface &m_field)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
DomainNaturalBCRhs::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, SPACE_DIM > OpBodyForce
double getVolume() const
element volume (linear geometry)
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
Deprecated interface functions.
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
VolumeElementForcesAndSourcesCore(Interface &m_field, const EntityType type=MBTET)
#define CHKERR
Inline error check.
virtual moab::Interface & get_moab()=0
implementation of Data Operators for Forces and Sources
boost::shared_ptr< const NumeredEntFiniteElement > getNumeredEntFiniteElementPtr() const
Return raw pointer to NumeredEntFiniteElement.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Volume finite element base.
EntitiesFieldData::EntData EntData
constexpr auto field_name
DEPRECATED typedef BodyForceConstantField BodyFroceConstantField
USe BodyForceConstantField.
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
double FieldData
Field data type.
const FTensor::Tensor2< T, Dim, Dim > Vec
UBlasVector< double > VectorDouble
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
OpBodyForce(const std::string field_name, Block_BodyForces &data, Range block_tets)
std::map< int, Block_BodyForces > mapData
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ OPROW
operator doWork function is executed on FE rows