v0.14.0
Public Member Functions | List of all members
Poisson2DiscontGalerkinOperators::OpCalculateSideData Struct Reference

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

#include <tutorials/scl-11/src/PoissonDiscontinousGalerkin.hpp>

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

Public Member Functions

 OpCalculateSideData (std::string field_name, std::string col_field_name)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 

Detailed Description

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

Examples
poisson_2d_dis_galerkin.cpp.

Definition at line 38 of file PoissonDiscontinousGalerkin.hpp.

Constructor & Destructor Documentation

◆ OpCalculateSideData()

Poisson2DiscontGalerkinOperators::OpCalculateSideData::OpCalculateSideData ( std::string  field_name,
std::string  col_field_name 
)
inline
Examples
PoissonDiscontinousGalerkin.hpp.

Definition at line 40 of file PoissonDiscontinousGalerkin.hpp.

41  : FaceSideOp(field_name, col_field_name, FaceSideOp::OPROWCOL) {
42 
43  std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
44 
45  for (auto t = moab::CN::TypeDimensionMap[SPACE_DIM].first;
46  t <= moab::CN::TypeDimensionMap[SPACE_DIM].second; ++t)
47  doEntities[t] = true;
48  }

Member Function Documentation

◆ doWork()

MoFEMErrorCode Poisson2DiscontGalerkinOperators::OpCalculateSideData::doWork ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
EntData row_data,
EntData col_data 
)
inline
Examples
PoissonDiscontinousGalerkin.hpp.

Definition at line 50 of file PoissonDiscontinousGalerkin.hpp.

52  {
54 
55  // Note: THat for L2 base data rows, and columns are the same, so operator
56  // above can be simpler operator for the right hand side, and data can be
57  // stored only for rows, since for columns data are the same. However for
58  // complex multi-physics problems that not necessary would be a case. For
59  // generality, we keep generic case.
60 
61  if ((CN::Dimension(row_type) == SPACE_DIM) &&
62  (CN::Dimension(col_type) == SPACE_DIM)) {
63  const auto nb_in_loop = getFEMethod()->nInTheLoop;
64  indicesRowSideMap[nb_in_loop] = row_data.getIndices();
65  indicesColSideMap[nb_in_loop] = col_data.getIndices();
66  rowBaseSideMap[nb_in_loop] = row_data.getN();
67  colBaseSideMap[nb_in_loop] = col_data.getN();
68  rowDiffBaseSideMap[nb_in_loop] = row_data.getDiffN();
69  colDiffBaseSideMap[nb_in_loop] = col_data.getDiffN();
70  areaMap[nb_in_loop] = getMeasure();
71  senseMap[nb_in_loop] = getSkeletonSense();
72  if (!nb_in_loop) {
73  indicesRowSideMap[1].clear();
74  indicesColSideMap[1].clear();
75  rowBaseSideMap[1].clear();
76  colBaseSideMap[1].clear();
77  rowDiffBaseSideMap[1].clear();
78  colDiffBaseSideMap[1].clear();
79  areaMap[1] = 0;
80  senseMap[1] = 0;
81  }
82  } else {
83  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Should not happen");
84  }
85 
87  }

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:460
Poisson2DiscontGalerkinOperators::indicesRowSideMap
std::array< VectorInt, 2 > indicesRowSideMap
indices on rows for left hand-side
Definition: PoissonDiscontinousGalerkin.hpp:23
Poisson2DiscontGalerkinOperators::rowBaseSideMap
std::array< MatrixDouble, 2 > rowBaseSideMap
Definition: PoissonDiscontinousGalerkin.hpp:26
MoFEM::EntitiesFieldData::EntData::getDiffN
MatrixDouble & getDiffN(const FieldApproximationBase base)
get derivatives of base functions
Definition: EntitiesFieldData.hpp:1329
FaceSideOp
FaceSideEle::UserDataOperator FaceSideOp
Definition: poisson_2d_dis_galerkin.cpp:25
Poisson2DiscontGalerkinOperators::colDiffBaseSideMap
std::array< MatrixDouble, 2 > colDiffBaseSideMap
Definition: PoissonDiscontinousGalerkin.hpp:29
SPACE_DIM
constexpr int SPACE_DIM
Definition: child_and_parent.cpp:16
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1214
Poisson2DiscontGalerkinOperators::rowDiffBaseSideMap
std::array< MatrixDouble, 2 > rowDiffBaseSideMap
Definition: PoissonDiscontinousGalerkin.hpp:28
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
Poisson2DiscontGalerkinOperators::areaMap
std::array< double, 2 > areaMap
Definition: PoissonDiscontinousGalerkin.hpp:30
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:1318
Poisson2DiscontGalerkinOperators::colBaseSideMap
std::array< MatrixDouble, 2 > colBaseSideMap
Definition: PoissonDiscontinousGalerkin.hpp:27
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
Poisson2DiscontGalerkinOperators::indicesColSideMap
std::array< VectorInt, 2 > indicesColSideMap
indices on columns for left hand-side
Definition: PoissonDiscontinousGalerkin.hpp:25
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
Poisson2DiscontGalerkinOperators::senseMap
std::array< int, 2 > senseMap
Definition: PoissonDiscontinousGalerkin.hpp:31