25 const int nb_gauss_pts = face_ptr_fe->
gaussPts.size2();
26 gaussPts.resize(4, nb_gauss_pts,
false);
29 constexpr double tet_coords[12] = {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1};
30 constexpr double hex_coords[24] = {0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0,
31 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1};
33 auto set_gauss = [&](
auto &
coords) {
36 auto &data = *face_ptr_fe->dataOnElement[
H1];
37 auto t_base = data.dataOnEntities[MBVERTEX][0].getFTensor0N(
NOBASE);
40 for (
int gg = 0; gg != nb_gauss_pts; ++gg) {
45 t_gauss_coords(
i) += t_base * t_coords(
i);
49 gaussPts(3, gg) = face_ptr_fe->gaussPts(2, gg);
56 CHKERR set_gauss(tet_coords);
59 CHKERR set_gauss(hex_coords);
63 "Element type not implemented: %d", type);
70VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::setPtrFE(
75 "User operator and finite element do not work together");
96 const auto nb_nodes_on_ele = CN::VerticesPerEntity(type);
103 auto sit = side_table.get<0>().find(face_entity);
104 if (sit == side_table.get<0>().end())
106 "Face can not be found on volume element");
118 conn, find(
conn, &
conn[nb_nodes_on_ele], face_ptr_fe->conn[nn]));
122 "No common node on face and element can not be found");
#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 ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< ordered_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, signed char, &SideNumber::side_number > > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.
FTensor::Index< 'i', SPACE_DIM > i
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
virtual moab::Interface & get_moab()=0
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
Shared pointer to finite element database structure.
ForcesAndSourcesCore * ptrFE
structure to get information from mofem into EntitiesFieldData
ForcesAndSourcesCore * sidePtrFE
Element to integrate on the sides.
MatrixDouble gaussPts
Matrix of integration points.
Base volume element used to integrate on skeleton.
MoFEMErrorCode operatorImpl()
Implementation detail for operator()
std::array< int, 4 > faceConnMap
std::array< int, 8 > tetConnMap
int nbNodesOnFace
Number of nodes on face.
int getRule(int order)
Compute quadrature rule index for a given polynomial order.
MoFEMErrorCode operator()()
Execute user operator
int faceSense
Sense of face, could be 1 or -1.
bool operatorImplCalled
flag to check if operatorImpl was called
MoFEMErrorCode setGaussPts(int order)
Configure Gauss points for the element side.
int faceSideNumber
Face side number.
MoFEMErrorCode operator()()
Main operator function executed for each loop iteration.
const EntityHandle * conn