v0.8.23
Public Member Functions | Public Attributes | List of all members
MinimalSurfaceEquation::MinimalSurfaceElement::OpGetDataAtGaussPts Struct Reference

Evaluate function values and gradients at Gauss Pts. More...

#include <users_modules/minimal_surface_equation/src/MinimalSurfaceElement.hpp>

Inherits UserDataOperator.

Collaboration diagram for MinimalSurfaceEquation::MinimalSurfaceElement::OpGetDataAtGaussPts:
[legend]

Public Member Functions

 OpGetDataAtGaussPts (const string field_name, CommonData &common_data)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Public Attributes

CommonDatacommonData
 

Detailed Description

Evaluate function values and gradients at Gauss Pts.

Examples
minimal_surface_area.cpp.

Definition at line 191 of file MinimalSurfaceElement.hpp.

Constructor & Destructor Documentation

◆ OpGetDataAtGaussPts()

MinimalSurfaceEquation::MinimalSurfaceElement::OpGetDataAtGaussPts::OpGetDataAtGaussPts ( const string  field_name,
CommonData common_data 
)

Definition at line 194 of file MinimalSurfaceElement.hpp.

196  field_name, UserDataOperator::OPCOL),
197  commonData(common_data) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

PetscErrorCode MinimalSurfaceEquation::MinimalSurfaceElement::OpGetDataAtGaussPts::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData &  data 
)

Definition at line 199 of file MinimalSurfaceElement.hpp.

200  {
202 
203  int nb_dofs = data.getFieldData().size();
204  if (nb_dofs == 0) {
206  }
207  int nb_gauss_pts = data.getN().size1();
208 
209  // Element loops over entities, it start from vertices
210  if (type == MBVERTEX) {
211  // Setting size of common data vectors
212  commonData.gradU.resize(nb_gauss_pts, 2);
213  commonData.gradU.clear();
214  }
215 
216  for (int gg = 0; gg != nb_gauss_pts; gg++) {
217  MatrixAdaptor grad_shape_fun = data.getDiffN(gg);
218  ublas::matrix_row<MatrixDouble> grad_at_gauss_pt(commonData.gradU, gg);
219  noalias(grad_at_gauss_pt) +=
220  prod(trans(grad_shape_fun), data.getFieldData());
221  }
222 
224  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
MatrixDouble gradU
nb_gauss_pts x 2 gradients at integration pts
MatrixShallowArrayAdaptor< double > MatrixAdaptor
Matrix adaptor.
Definition: Types.hpp:118
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

Member Data Documentation

◆ commonData

CommonData& MinimalSurfaceEquation::MinimalSurfaceElement::OpGetDataAtGaussPts::commonData

Definition at line 193 of file MinimalSurfaceElement.hpp.


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