|
| v0.14.0
|
Go to the documentation of this file.
15 if (data.getIndices().size() == 0)
21 const auto &dof_ptr = data.getFieldDofs()[0];
22 const int rank = dof_ptr->getNbOfCoeffs();
23 const int nb_row_dofs = data.getIndices().size() / rank;
25 Nf.resize(data.getIndices().size());
28 for (
unsigned int gg = 0; gg < data.getN().size1(); gg++) {
34 dist -= zero_pressure;
40 for (
int rr = 0; rr < rank; rr++) {
47 cblas_daxpy(nb_row_dofs,
getGaussPts()(2, gg) * force,
48 &data.getN()(gg, 0), 1, &
Nf[rr], rank);
68 const std::string
field_name,
const std::string mesh_nodals_positions) {
80 mesh_nodals_positions);
88 if (
bit->getName().compare(0, 14,
"FLUID_PRESSURE") == 0) {
91 std::vector<double> attributes;
93 if (attributes.size() < 7) {
94 SETERRQ1(PETSC_COMM_SELF, 1,
95 "not enough block attributes to deffine fluid pressure "
96 "element, attributes.size() = %d ",
116 Range tets_skin_tris;
117 CHKERR skin.find_skin(0, tets,
false, tets_skin_tris);
119 std::ostringstream ss;
124 setOfFluids[
bit->getMeshsetId()].tRis, MBTRI,
"FLUID_PRESSURE_FE");
132 string field_name,
Vec F,
bool allow_negative_pressure,
bool ho_geometry) {
134 std::map<MeshSetId, FluidData>::iterator sit =
setOfFluids.begin();
139 allow_negative_pressure, ho_geometry));
145 os <<
"dEnsity " << e.
dEnsity << std::endl;
boost::ptr_vector< MethodForForceScaling > methodsOp
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode addNeumannFluidPressureBCElements(const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
virtual MPI_Comm & get_comm() const =0
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
double dEnsity
fluid density [kg/m^2] or any consistent unit
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Range tRis
range of surface element to which fluid pressure is applied
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
#define CHKERR
Inline error check.
MatrixDouble & getNormalsAtGaussPts()
if higher order geometry return normals at Gauss pts.
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual moab::Interface & get_moab()=0
std::map< MeshSetId, FluidData > setOfFluids
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string name_row)=0
set field col which finite element use
MoFEM::Interface & mField
VectorDouble & getNormal()
get triangle normal
bool allowNegativePressure
allows for negative pressures
VectorDouble zEroPressure
fluid level of reference zero pressure.
boost::shared_ptr< const NumeredEntFiniteElement > getNumeredEntFiniteElementPtr() const
Return raw pointer to NumeredEntFiniteElement.
MatrixDouble & getCoordsAtGaussPts()
Gauss points and weight, matrix (nb. of points x 3)
virtual bool check_field(const std::string &name) const =0
check if field is in database
boost::ptr_vector< MethodForForceScaling > & methodsOp
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_field)=0
set finite element field data
std::ostream & operator<<(std::ostream &os, const FluidPressure::FluidData &e)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
EntitiesFieldData::EntData EntData
constexpr auto field_name
const FEMethod * getFEMethod() const
Return raw pointer to Finite Element Method object.
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
MoFEMErrorCode setNeumannFluidPressureFiniteElementOperators(string field_name, Vec F, bool allow_negative_pressure=true, bool ho_geometry=false)
VectorDouble aCCeleration
acceleration [m/s^2]
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
const FTensor::Tensor2< T, Dim, Dim > Vec
UBlasVector< double > VectorDouble
static MoFEMErrorCode applyScale(const FEMethod *fe, boost::ptr_vector< MethodForForceScaling > &methods_op, VectorDouble &nf)
#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 ...