v0.14.0
Public Member Functions | Protected Attributes | List of all members
PoissonExample::OpBaseRhs< OPBASE > Struct Template Referenceabstract

template class for integration oh the right hand side More...

#include <users_modules/tutorials/cor-2to5/src/PoissonOperators.hpp>

Inheritance diagram for PoissonExample::OpBaseRhs< OPBASE >:
[legend]
Collaboration diagram for PoissonExample::OpBaseRhs< OPBASE >:
[legend]

Public Member Functions

 OpBaseRhs (const std::string field_name)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 This function is called by finite element. More...
 
virtual MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)=0
 Class dedicated to integrate operator. More...
 
virtual MoFEMErrorCode aSsemble (EntitiesFieldData::EntData &data)=0
 Class dedicated to assemble operator to global system vector. More...
 

Protected Attributes

int nbRows
 < error code More...
 
int nbIntegrationPts
 number of integration points More...
 

Detailed Description

template<typename OPBASE>
struct PoissonExample::OpBaseRhs< OPBASE >

template class for integration oh the right hand side

Definition at line 161 of file PoissonOperators.hpp.

Constructor & Destructor Documentation

◆ OpBaseRhs()

template<typename OPBASE >
PoissonExample::OpBaseRhs< OPBASE >::OpBaseRhs ( const std::string  field_name)
inline
Examples
PoissonOperators.hpp.

Definition at line 163 of file PoissonOperators.hpp.

163 : OPBASE(field_name, OPBASE::OPROW) {}

Member Function Documentation

◆ aSsemble()

template<typename OPBASE >
virtual MoFEMErrorCode PoissonExample::OpBaseRhs< OPBASE >::aSsemble ( EntitiesFieldData::EntData data)
pure virtual

Class dedicated to assemble operator to global system vector.

Parameters
dataentity data (indices, base functions, etc. ) on element row
Returns
error code

Implemented in PoissonExample::OpError, PoissonExample::Op_g, and PoissonExample::OpF.

Examples
PoissonOperators.hpp.

◆ doWork()

template<typename OPBASE >
MoFEMErrorCode PoissonExample::OpBaseRhs< OPBASE >::doWork ( int  row_side,
EntityType  row_type,
EntitiesFieldData::EntData row_data 
)
inline

This function is called by finite element.

Do work is composed from two operations, integrate and assembly. Also, it set values nbRows, and nbIntegrationPts.

Examples
PoissonOperators.hpp.

Definition at line 172 of file PoissonOperators.hpp.

173  {
175  // get number of dofs on row
176  nbRows = row_data.getIndices().size();
177  if (!nbRows)
179  // get number of integration points
180  nbIntegrationPts = OPBASE::getGaussPts().size2();
181  // integrate local vector
182  CHKERR iNtegrate(row_data);
183  // assemble local vector
184  CHKERR aSsemble(row_data);
186  }

◆ iNtegrate()

template<typename OPBASE >
virtual MoFEMErrorCode PoissonExample::OpBaseRhs< OPBASE >::iNtegrate ( EntitiesFieldData::EntData data)
pure virtual

Class dedicated to integrate operator.

Parameters
dataentity data on element row
Returns
error code

Implemented in PoissonExample::OpResF_Boundary, PoissonExample::OpRes_g, PoissonExample::OpResF_Domain, PoissonExample::OpError, PoissonExample::Op_g, and PoissonExample::OpF.

Examples
PoissonOperators.hpp.

Member Data Documentation

◆ nbIntegrationPts

template<typename OPBASE >
int PoissonExample::OpBaseRhs< OPBASE >::nbIntegrationPts
protected

number of integration points

Examples
PoissonOperators.hpp.

Definition at line 205 of file PoissonOperators.hpp.

◆ nbRows

template<typename OPBASE >
int PoissonExample::OpBaseRhs< OPBASE >::nbRows
protected

< error code

number of dofs on row

Examples
PoissonOperators.hpp.

Definition at line 204 of file PoissonOperators.hpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
OPBASE
PoissonExample::OpBaseRhs::iNtegrate
virtual MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)=0
Class dedicated to integrate operator.
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
PoissonExample::OpBaseRhs::aSsemble
virtual MoFEMErrorCode aSsemble(EntitiesFieldData::EntData &data)=0
Class dedicated to assemble operator to global system vector.
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
PoissonExample::OpBaseRhs::nbRows
int nbRows
< error code
Definition: PoissonOperators.hpp:204
PoissonExample::OpBaseRhs::nbIntegrationPts
int nbIntegrationPts
number of integration points
Definition: PoissonOperators.hpp:205