Assemble residual.
More...
#include <users_modules/minimal_surface_equation/src/MinimalSurfaceElement.hpp>
Assemble residual.
- Examples
- minimal_surface_area.cpp.
Definition at line 295 of file MinimalSurfaceElement.hpp.
◆ OpAssembleResidaul()
MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul::OpAssembleResidaul |
( |
const string |
field_name, |
|
|
CommonData & |
common_data |
|
) |
| |
|
inline |
Definition at line 298 of file MinimalSurfaceElement.hpp.
299 : FaceElementForcesAndSourcesCore::UserDataOperator(
constexpr auto field_name
◆ doWork()
PetscErrorCode MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul::doWork |
( |
int |
side, |
|
|
EntityType |
type, |
|
|
DataForcesAndSourcesCore::EntData & |
data |
|
) |
| |
|
inline |
Definition at line 303 of file MinimalSurfaceElement.hpp.
304 {
306
307 int nb_dofs = data.getIndices().size();
308 if (nb_dofs == 0) {
310 }
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();
317 noalias(
rEsidual) += val * prod(data.getDiffN(gg), an_by_grad_u);
318 }
320 &*data.getIndices().data().begin(), &
rEsidual[0],
321 ADD_VALUES);
323 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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.
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
MatrixDouble aNbyGradU
nb_gauss_pts x 2,
◆ commonData
CommonData& MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul::commonData |
◆ rEsidual
VectorDouble MinimalSurfaceEquation::MinimalSurfaceElement::OpAssembleResidaul::rEsidual |
The documentation for this struct was generated from the following file: