v0.15.0
Loading...
Searching...
No Matches
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.

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 }
constexpr int SPACE_DIM
constexpr double t
plate stiffness
Definition plate.cpp:58
FaceSideEle::UserDataOperator FaceSideOp
constexpr auto field_name

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 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ 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 ...
std::array< MatrixDouble, 2 > rowBaseSideMap
std::array< VectorInt, 2 > indicesColSideMap
indices on columns for left hand-side
std::array< MatrixDouble, 2 > colDiffBaseSideMap
std::array< MatrixDouble, 2 > colBaseSideMap
std::array< VectorInt, 2 > indicesRowSideMap
indices on rows for left hand-side
std::array< MatrixDouble, 2 > rowDiffBaseSideMap
MatrixDouble & getDiffN(const FieldApproximationBase base)
get derivatives of base functions
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.

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