|
| v0.14.0
|
Go to the documentation of this file.
9 #include <MethodForForceScaling.hpp>
13 using namespace boost::numeric;
20 boost::ptr_vector<MethodForForceScaling> &methods_op,
bool use_snes_f)
23 F(
_F), useSnesF(use_snes_f), dAta(data),
methodsOp(methods_op) {}
32 EntityHandle ent = getNumeredEntFiniteElementPtr()->getEnt();
33 if (dAta.nOdes.find(ent) == dAta.nOdes.end())
37 int rank = dof_ptr->getNbOfCoeffs();
39 if (data.
getIndices().size() != (
unsigned int)rank) {
44 for (
int rr = 0; rr != rank; ++rr) {
46 Nf[0] = dAta.data.data.value3 * dAta.data.data.value1;
48 Nf[1] = dAta.data.data.value4 * dAta.data.data.value1;
50 Nf[2] = dAta.data.data.value5 * dAta.data.data.value1;
59 if (useSnesF ||
F == PETSC_NULL)
69 int ms_id,
bool use_snes_f) {
87 double def_scale = 1.;
90 "_LoadFactor_Scale_", 1, MB_TYPE_DOUBLE,
thScale,
91 MB_TAG_CREAT | MB_TAG_EXCL | MB_TAG_MESH, &def_scale);
92 if (
rval == MB_ALREADY_ALLOCATED) {
94 (
const void **)&
sCale);
102 (
const void **)&
sCale);
#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.
Data on single entity (This is passed as argument to DataOperator::doWork)
OpNodalForce(const std::string field_name, Vec _F, bCForce &data, boost::ptr_vector< MethodForForceScaling > &methods_op, bool use_snes_f=false)
MoFEM::Interface & mField
structure for User Loop Methods on finite elements
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
this struct keeps basic methods for moab meshset about material and boundary conditions
boost::ptr_vector< MethodForForceScaling > methodsOp
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
MoFEMErrorCode getBcDataStructure(CUBIT_BC_DATA_TYPE &data) const
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
Deprecated interface functions.
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
#define CHKERR
Inline error check.
virtual moab::Interface & get_moab()=0
implementation of Data Operators for Forces and Sources
const VectorInt & getIndices() const
Get global indices of dofs on entity.
const VectorDofs & getFieldDofs() const
get dofs data stature FEDofEntity
Operator to assemble nodal force into right hand side vector.
constexpr auto field_name
structure to get information form mofem into EntitiesFieldData
std::map< int, bCForce > mapForce
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
const FTensor::Tensor2< T, Dim, Dim > Vec
@ MOFEM_DATA_INCONSISTENCY
Interface for managing meshsets containing materials and boundary conditions.
UBlasVector< double > VectorDouble
MyFE(MoFEM::Interface &m_field)
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
static MoFEMErrorCode applyScale(const FEMethod *fe, boost::ptr_vector< MethodForForceScaling > &methods_op, VectorDouble &nf)
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
MoFEMErrorCode addForce(const std::string field_name, Vec F, int ms_id, bool use_snes_f=false)
#define MoFEMFunctionReturn(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 ...