No Matches
Public Member Functions | Public Attributes | List of all members
MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul Struct Reference

Assemble residual. More...

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

Inheritance diagram for MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul:
Collaboration diagram for MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul:

Public Member Functions

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

Public Attributes

VectorDouble rEsidual

Detailed Description

Assemble residual.


Definition at line 295 of file MinimalSurfaceElement.hpp.

Constructor & Destructor Documentation

◆ OpAssembleResidaul()

MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul::OpAssembleResidaul ( const string  field_name,
CommonData common_data 

Definition at line 298 of file MinimalSurfaceElement.hpp.

299 : FaceElementForcesAndSourcesCore::UserDataOperator(
300 field_name, UserDataOperator::OPROW),
301 commonData(common_data) {}
constexpr auto field_name

Member Function Documentation

◆ doWork()

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

Definition at line 303 of file MinimalSurfaceElement.hpp.

304 {
307 int nb_dofs = data.getIndices().size();
308 if (nb_dofs == 0) {
310 }
311 rEsidual.resize(nb_dofs, false);
312 rEsidual.clear();
313 int nb_gauss_pts = data.getN().size1();
314 for (int gg = 0; gg != nb_gauss_pts; gg++) {
315 double val = getGaussPts()(2, gg) * getArea();
316 ublas::matrix_row<MatrixDouble> an_by_grad_u(commonData.aNbyGradU, gg);
317 noalias(rEsidual) += val * prod(data.getDiffN(gg), an_by_grad_u);
318 }
319 CHKERR VecSetValues(getFEMethod()->snes_f, data.getIndices().size(),
320 &*data.getIndices().data().begin(), &rEsidual[0],
323 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.

Member Data Documentation

◆ commonData

CommonData& MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul::commonData

Definition at line 297 of file MinimalSurfaceElement.hpp.

◆ rEsidual

VectorDouble MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul::rEsidual

Definition at line 302 of file MinimalSurfaceElement.hpp.

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