v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OpCalculateSideData Struct Reference

Operator tp collect data from elements on the side of Edge/Face. More...

Inheritance diagram for OpCalculateSideData:
[legend]
Collaboration diagram for OpCalculateSideData:
[legend]

Public Member Functions

 OpCalculateSideData (std::string field_name, std::string col_field_name, UserDataOperator::OpType type)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
 OpCalculateSideData (std::string field_name, std::string col_field_name)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Detailed Description

Operator tp collect data from elements on the side of Edge/Face.

Examples
PoissonDiscontinousGalerkin.hpp, plate.cpp, and poisson_2d_dis_galerkin.cpp.

Definition at line 98 of file fluid_structure_eigenproblem.cpp.

Constructor & Destructor Documentation

◆ OpCalculateSideData() [1/2]

OpCalculateSideData::OpCalculateSideData ( std::string  field_name,
std::string  col_field_name,
UserDataOperator::OpType  type 
)
Examples
plate.cpp.

Definition at line 937 of file fluid_structure_eigenproblem.cpp.

940 : FaceSideOp(row_field_name, col_field_name, type) {}
ElementsAndOps< SPACE_DIM >::FaceSideOp FaceSideOp
Definition: plate.cpp:38

◆ OpCalculateSideData() [2/2]

OpCalculateSideData::OpCalculateSideData ( std::string  field_name,
std::string  col_field_name 
)

Definition at line 430 of file plate.cpp.

432 : FaceSideOp(row_field_name, col_field_name, FaceSideOp::OPROW) {}

Member Function Documentation

◆ doWork() [1/2]

MoFEMErrorCode OpCalculateSideData::doWork ( int  side,
EntityType  type,
EntData data 
)
Examples
plate.cpp.

Definition at line 942 of file fluid_structure_eigenproblem.cpp.

943 {
945
946 const auto nb_in_loop = getFEMethod()->nInTheLoop;
947
948 auto clear = [](auto nb) {
949 indicesUsSideMap[nb].clear();
950 indicesUfSideMap[nb].clear();
951 baseUsSideMap[nb].clear();
952 diffUsBaseSideMap[nb].clear();
953 baseUfSideMap[nb].clear();
954 diffUfBaseSideMap[nb].clear();
955 };
956
957 if (getOpType() == OPROW) {
958
959 if (type == MBVERTEX) {
960 areaMap[nb_in_loop] = getMeasure();
961 senseMap[nb_in_loop] = getSkeletonSense();
962 sideHandle[nb_in_loop] = getFEEntityHandle();
963 if (!nb_in_loop) {
964 clear(0);
965 clear(1);
966 sideHandle[1] = 0;
967 areaMap[1] = 0;
968 senseMap[1] = 0;
969 }
970 }
971
972 const auto nb_dofs = data.getIndices().size();
973 if (nb_dofs) {
974 indicesUsSideMap[nb_in_loop].push_back(data.getIndices());
975 baseUsSideMap[nb_in_loop].push_back(
976 data.getN(BaseDerivatives::ZeroDerivative));
977 diffUsBaseSideMap[nb_in_loop].push_back(
978 data.getN(BaseDerivatives::FirstDerivative));
979 }
980 } else if (getOpType() == OPCOL) {
981
982 if (type == MBVERTEX) {
983 if (areaMap[nb_in_loop] != getMeasure()) {
984 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
985 "Should be the same");
986 }
987 if (senseMap[nb_in_loop] != getSkeletonSense()) {
988 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
989 "Should be the same");
990 }
991 if (sideHandle[nb_in_loop] != getFEEntityHandle()) {
992 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
993 "Should be the same");
994 };
995 }
996
997 const auto nb_dofs = data.getIndices().size();
998 if (nb_dofs) {
999 indicesUfSideMap[nb_in_loop].push_back(data.getIndices());
1000 baseUfSideMap[nb_in_loop].push_back(
1001 data.getN(BaseDerivatives::ZeroDerivative));
1002 diffUfBaseSideMap[nb_in_loop].push_back(
1003 data.getN(BaseDerivatives::FirstDerivative));
1004 }
1005
1006 } else {
1007 SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Wrong OpType %s",
1008 OpTypeNames[getOpType()]);
1009 }
1010
1012}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
std::array< std::vector< MatrixDouble >, 2 > baseUfSideMap
std::array< std::vector< MatrixDouble >, 2 > baseUsSideMap
std::array< std::vector< VectorInt >, 2 > indicesUfSideMap
std::array< EntityHandle, 2 > sideHandle
std::array< std::vector< MatrixDouble >, 2 > diffUfBaseSideMap
std::array< std::vector< MatrixDouble >, 2 > diffUsBaseSideMap
std::array< std::vector< VectorInt >, 2 > indicesUsSideMap
std::array< double, 2 > areaMap
Definition: plate.cpp:102
std::array< int, 2 > senseMap
Definition: plate.cpp:103
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of dofs on entity.

◆ doWork() [2/2]

MoFEMErrorCode OpCalculateSideData::doWork ( int  side,
EntityType  type,
EntData data 
)

The documentation for this struct was generated from the following files: