v0.14.0
Public Member Functions | List of all members
OpCheckGaussCoords< ELE_OP, PARENT_ELE > Struct Template Reference
Inheritance diagram for OpCheckGaussCoords< ELE_OP, PARENT_ELE >:
[legend]
Collaboration diagram for OpCheckGaussCoords< ELE_OP, PARENT_ELE >:
[legend]

Public Member Functions

 OpCheckGaussCoords ()
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Detailed Description

template<typename ELE_OP, typename PARENT_ELE>
struct OpCheckGaussCoords< ELE_OP, PARENT_ELE >

Examples
child_and_parent.cpp.

Definition at line 137 of file child_and_parent.cpp.

Constructor & Destructor Documentation

◆ OpCheckGaussCoords()

template<typename ELE_OP , typename PARENT_ELE >
OpCheckGaussCoords< ELE_OP, PARENT_ELE >::OpCheckGaussCoords ( )
inline

Definition at line 138 of file child_and_parent.cpp.

138 : ELE_OP(NOSPACE, ELE_OP::OPSPACE) {}

Member Function Documentation

◆ doWork()

template<typename ELE_OP , typename PARENT_ELE >
MoFEMErrorCode OpCheckGaussCoords< ELE_OP, PARENT_ELE >::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData data 
)
inline

Definition at line 140 of file child_and_parent.cpp.

141  {
143 
144  MatrixDouble parent_coords;
145 
146  PARENT_ELE parent_fe(this->getPtrFE()->mField);
147  auto op = new ELE_OP(NOSPACE, ELE_OP::OPSPACE);
148  op->doWorkRhsHook = [&](DataOperator *op_ptr, int side,
149  EntityType type,
152 
153  MOFEM_LOG("SELF", Sev::noisy)
154  << "parent_coords in op "
155  << static_cast<ELE_OP *>(op_ptr)->getCoordsAtGaussPts();
156 
157  parent_coords = static_cast<ELE_OP *>(op_ptr)->getCoordsAtGaussPts();
159  };
160  parent_fe.getOpPtrVector().push_back(op);
161 
162  MOFEM_LOG("SELF", Sev::noisy) << "fe name " << this->getFEName();
163  CHKERR this->loopParent(this->getFEName(), &parent_fe);
164  MOFEM_LOG("SELF", Sev::noisy) << "parent_coords " << parent_coords;
165 
166  MatrixDouble child_coords = this->getCoordsAtGaussPts();
167  MOFEM_LOG("SELF", Sev::noisy) << "child_coords " << child_coords;
168 
169  child_coords -= parent_coords;
170 
171  MOFEM_LOG("SELF", Sev::noisy) << "Corrds diffs" << child_coords;
172 
173  double n = 0;
174  for (auto d : child_coords.data())
175  n += d * d;
176 
177  if (sqrt(n) > 1e-12)
178  SETERRQ1(PETSC_COMM_SELF, MOFEM_ATOM_TEST_INVALID,
179  "Parent and child global coords at integration points are "
180  "diffrent norm = %3.2e",
181  sqrt(n));
182 
184  }

The documentation for this struct was generated from the following file:
NOSPACE
@ NOSPACE
Definition: definitions.h:83
MoFEM::EntitiesFieldData::EntData
Data on single entity (This is passed as argument to DataOperator::doWork)
Definition: EntitiesFieldData.hpp:127
MoFEM::DataOperator
base operator to do operations at Gauss Pt. level
Definition: DataOperators.hpp:24
sdf_hertz.d
float d
Definition: sdf_hertz.py:5
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
ELE_OP
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
convert.type
type
Definition: convert.py:64
convert.n
n
Definition: convert.py:82
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
MOFEM_ATOM_TEST_INVALID
@ MOFEM_ATOM_TEST_INVALID
Definition: definitions.h:40
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346