◆ OpError() [1/2]
- Examples
- approx_sphere.cpp.
Definition at line 62 of file initial_diffusion.cpp.
65
66 std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE], false);
67 }
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
boost::shared_ptr< VectorDouble > uAtPtsPtr
◆ OpError() [2/2]
OpError::OpError |
( |
const std::string | field_name, |
|
|
boost::shared_ptr< MatrixDouble > | x_ptr ) |
|
inline |
Definition at line 221 of file approx_sphere.cpp.
224
225 std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE], false);
226 }
constexpr auto field_name
boost::shared_ptr< MatrixDouble > xPtr
◆ doWork()
- Examples
- approx_sphere.cpp.
Definition at line 228 of file approx_sphere.cpp.
228 {
229
231
232 auto t_w = getFTensor0IntegrationWeight();
234 auto t_normal = getFTensor1NormalsAtGaussPts();
235 auto nb_integration_pts = getGaussPts().size2();
236
237 double error = 0;
238
239 for (int gg = 0; gg != nb_integration_pts; gg++) {
240
241 double l = std::sqrt(t_normal(
i) * t_normal(
i));
242 error += t_w *
l * std::abs((t_x(
i) * t_x(
i) - A * A));
243
244 ++t_w;
245 ++t_x;
246 ++t_normal;
247 }
248
250
252 }
FTensor::Index< 'i', 3 > i
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'l', 3 > l
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
static SmartPetscObj< Vec > errorVec
◆ errorVec
◆ l2Error
◆ uAtPtsPtr
◆ xPtr
The documentation for this struct was generated from the following files: