23 const auto nb_nodes_on_ele = CN::VerticesPerEntity(type);
31 auto sit = side_table.get<0>().find(face_entity);
32 if (sit == side_table.get<0>().end())
34 "Face can not be found on volume element");
36 const auto nb_nodes_on_face = CN::VerticesPerEntity((*sit)->getEntType());
41 for (
int nn = 0; nn != nb_nodes_on_face; ++nn) {
43 conn, find(
conn, &
conn[nb_nodes_on_ele], face_ptr_fe->conn[nn]));
47 "No common node on face and element can not be found");
53 const int nb_gauss_pts = face_ptr_fe->gaussPts.size2();
54 gaussPts.resize(4, nb_gauss_pts,
false);
57 constexpr double tet_coords[12] = {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1};
58 constexpr double hex_coords[24] = {0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0,
59 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1};
61 auto set_gauss = [&](
auto &
coords) {
64 auto &data = *face_ptr_fe->dataOnElement[
H1];
65 auto t_base = data.dataOnEntities[MBVERTEX][0].getFTensor0N(
NOBASE);
68 for (
int gg = 0; gg != nb_gauss_pts; ++gg) {
69 for (
int bb = 0; bb != nb_nodes_on_face; ++bb) {
73 t_gauss_coords(
i) += t_base * t_coords(
i);
77 gaussPts(3, gg) = face_ptr_fe->gaussPts(2, gg);
84 CHKERR set_gauss(tet_coords);
87 CHKERR set_gauss(hex_coords);
91 "Element type not implemented: %d", type);
98VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::setPtrFE(
104 "User operator and finite element do not work together");
#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
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
ForcesAndSourcesCore * ptrFE
structure to get information form mofem into EntitiesFieldData
ForcesAndSourcesCore * sidePtrFE
Element to integrate on the sides.
MatrixDouble gaussPts
Matrix of integration points.
const EntityHandle * conn
Base volume element used to integrate on skeleton.
std::array< int, 4 > faceConnMap
std::array< int, 8 > tetConnMap
int faceSense
Sense of face, could be 1 or -1.
MoFEMErrorCode setGaussPts(int order)
int faceSideNumber
Face side number.