v0.11.1
Public Member Functions | Private Attributes | List of all members
MoFEM::FieldEvaluatorInterface::SetPts Struct Reference

Default evaluator for setting integration points. More...

#include <src/interfaces/FieldEvaluator.hpp>

Public Member Functions

 SetPts ()=delete
 
 SetPts (boost::shared_ptr< SetPtsData > data_ptr)
 
MoFEMErrorCode operator() (int order_row, int order_col, int order_data)
 

Private Attributes

boost::weak_ptr< SetPtsDatadataPtr
 

Detailed Description

Default evaluator for setting integration points.

Definition at line 87 of file FieldEvaluator.hpp.

Constructor & Destructor Documentation

◆ SetPts() [1/2]

MoFEM::FieldEvaluatorInterface::SetPts::SetPts ( )
delete

◆ SetPts() [2/2]

MoFEM::FieldEvaluatorInterface::SetPts::SetPts ( boost::shared_ptr< SetPtsData data_ptr)

Definition at line 89 of file FieldEvaluator.hpp.

89 : dataPtr(data_ptr) {}
boost::weak_ptr< SetPtsData > dataPtr

Member Function Documentation

◆ operator()()

MoFEMErrorCode MoFEM::FieldEvaluatorInterface::SetPts::operator() ( int  order_row,
int  order_col,
int  order_data 
)

Definition at line 76 of file FieldEvaluator.cpp.

77  {
79 
80  if (auto data_ptr = dataPtr.lock()) {
81 
82  decltype(data_ptr->nbEvalPoints) nbEvalPoints = data_ptr->nbEvalPoints;
83  decltype(data_ptr->verb) verb = data_ptr->verb;
84 
85  decltype(data_ptr->shapeFunctions) &shapeFunctions =
86  data_ptr->shapeFunctions;
87  decltype(data_ptr->evalPointEntityHandle) &evalPointEntityHandle =
88  data_ptr->evalPointEntityHandle;
89 
90  if (auto fe_ptr = data_ptr->feMethodPtr.lock()) {
91 
93  static_cast<VolumeElementForcesAndSourcesCore &>(*fe_ptr);
94 
95  MatrixDouble &gauss_pts = fe.gaussPts;
96  gauss_pts.resize(4, nbEvalPoints, false);
97  gauss_pts.clear();
98 
100  &shapeFunctions(0, 0), &shapeFunctions(0, 1), &shapeFunctions(0, 2),
101  &shapeFunctions(0, 3)};
103  &gauss_pts(0, 0), &gauss_pts(1, 0), &gauss_pts(2, 0)};
104 
105  int nb_gauss_pts = 0;
106  for (int nn = 0; nn != nbEvalPoints; ++nn) {
107  if (evalPointEntityHandle[nn] ==
108  fe.numeredEntFiniteElementPtr->getEnt()) {
109  for (const int i : {0, 1, 2}) {
110  t_gauss_pts(i) = t_shape(i + 1);
111  gauss_pts(3, nb_gauss_pts) = nn;
112  }
113  ++t_gauss_pts;
114  ++nb_gauss_pts;
115  }
116  ++t_shape;
117  }
118 
119  if (verb >= VERY_NOISY)
120  std::cout << "nbEvalOPoints / nbGaussPts: " << nbEvalPoints << " / "
121  << nb_gauss_pts << std::endl;
122  gauss_pts.resize(4, nb_gauss_pts, true);
123 
124  if (verb >= VERY_NOISY)
125  std::cout << "gauss pts: " << gauss_pts << std::endl;
126 
127  } else
128  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
129  "Pointer to element does not exists");
130 
131  } else
132  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
133  "Pointer to data does not exists");
134 
136 }
if(!static_cast< bool >(ifstream(param_file)))
@ VERY_NOISY
Definition: definitions.h:281
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:123
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
VolumeElementForcesAndSourcesCoreSwitch< 0 > VolumeElementForcesAndSourcesCore
Volume finite element default.
FTensor::Index< 'i', 3 > i
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:76

Member Data Documentation

◆ dataPtr

boost::weak_ptr<SetPtsData> MoFEM::FieldEvaluatorInterface::SetPts::dataPtr
private

Definition at line 93 of file FieldEvaluator.hpp.


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