v0.14.0
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)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Detailed Description

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

Examples
plate.cpp, and PoissonDiscontinousGalerkin.hpp.

Definition at line 110 of file plate.cpp.

Constructor & Destructor Documentation

◆ OpCalculateSideData()

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

Definition at line 430 of file plate.cpp.

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

Member Function Documentation

◆ doWork()

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

Definition at line 434 of file plate.cpp.

435  {
437 
438  const auto nb_in_loop = getFEMethod()->nInTheLoop;
439 
440  auto clear = [](auto nb) {
441  indicesSideMap[nb].clear();
442  diffBaseSideMap[nb].clear();
443  diff2BaseSideMap[nb].clear();
444  };
445 
446  if (type == MBVERTEX) {
447  areaMap[nb_in_loop] = getMeasure();
448  senseMap[nb_in_loop] = getEdgeSense();
449  if (!nb_in_loop) {
450  clear(0);
451  clear(1);
452  areaMap[1] = 0;
453  senseMap[1] = 0;
454  }
455  }
456 
457  const auto nb_dofs = data.getIndices().size();
458  if (nb_dofs) {
459  indicesSideMap[nb_in_loop].push_back(data.getIndices());
460  diffBaseSideMap[nb_in_loop].push_back(
461  data.getN(BaseDerivatives::FirstDerivative));
462  diff2BaseSideMap[nb_in_loop].push_back(
463  data.getN(BaseDerivatives::SecondDerivative));
464  }
465 
467 }

The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
senseMap
std::array< int, 2 > senseMap
Definition: plate.cpp:103
FaceSideOp
ElementsAndOps< SPACE_DIM >::FaceSideOp FaceSideOp
Definition: plate.cpp:38
diff2BaseSideMap
std::array< std::vector< MatrixDouble >, 2 > diff2BaseSideMap
Definition: plate.cpp:101
indicesSideMap
std::array< std::vector< VectorInt >, 2 > indicesSideMap
indices on rows for left hand-side
Definition: plate.cpp:97
convert.type
type
Definition: convert.py:64
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1201
areaMap
std::array< double, 2 > areaMap
Definition: plate.cpp:102
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1305
diffBaseSideMap
std::array< std::vector< MatrixDouble >, 2 > diffBaseSideMap
Definition: plate.cpp:99
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440