v0.13.2
Loading...
Searching...
No Matches
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

Definition at line 163 of file PoissonOperators.hpp.

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

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::OpF, PoissonExample::Op_g, and PoissonExample::OpError.

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 }
#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
int nbIntegrationPts
number of integration points
virtual MoFEMErrorCode aSsemble(EntitiesFieldData::EntData &data)=0
Class dedicated to assemble operator to global system vector.
virtual MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)=0
Class dedicated to integrate operator.

◆ 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::OpF, PoissonExample::Op_g, PoissonExample::OpError, PoissonExample::OpResF_Domain, PoissonExample::OpRes_g, and PoissonExample::OpResF_Boundary.

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: