|
| v0.14.0
|
Go to the documentation of this file.
10 #include <MethodForForceScaling.hpp>
16 boost::ptr_vector<MethodForForceScaling> &methods_op,
bool use_snes_f)
18 F(
f), dAta(data), methodsOp(methods_op), useSnesF(use_snes_f) {}
28 EntityHandle ent = getNumeredEntFiniteElementPtr()->getEnt();
29 if (dAta.eDges.find(ent) == dAta.eDges.end()) {
35 int rank = dof_ptr->getNbOfCoeffs();
39 Nf.resize(nb_dofs,
false);
42 int nb_gauss_pts = data.
getN().size1();
43 wEights.resize(nb_gauss_pts,
false);
46 for (
int rr = 0; rr < rank; rr++) {
51 force = dAta.data.data.value3 * dAta.data.data.value1;
53 force = dAta.data.data.value4 * dAta.data.data.value1;
55 force = dAta.data.data.value5 * dAta.data.data.value1;
61 for (
int gg = 0; gg < nb_gauss_pts; gg++) {
66 for (
int dd = 0;
dd < 3;
dd++) {
67 wEights[gg] += pow(getTangentAtGaussPts()(gg,
dd), 2);
69 wEights[gg] = std::sqrt(wEights[gg]);
70 wEights[gg] *= getGaussPts()(1, gg);
73 cblas_daxpy(nb_dofs / rank, wEights[gg] * force, &data.
getN()(gg, 0), 1,
84 if (useSnesF ||
F == PETSC_NULL)
94 int ms_id,
bool use_snes_f) {
#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.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Data on single entity (This is passed as argument to DataOperator::doWork)
boost::ptr_vector< MethodForForceScaling > methodsOp
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
this struct keeps basic methods for moab meshset about material and boundary conditions
MoFEMErrorCode getBcDataStructure(CUBIT_BC_DATA_TYPE &data) const
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
#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
constexpr auto field_name
MoFEM::Interface & mField
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
MoFEMErrorCode addForce(const std::string field_name, Vec F, int ms_id, bool use_snes_f=false)
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
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.
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
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
OpEdgeForce(const std::string field_name, Vec f, bCForce &data, boost::ptr_vector< MethodForForceScaling > &methods_op, bool use_snes_f=false)
std::map< int, bCForce > mapForce
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...