v0.15.0
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 "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.
 
virtual MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)=0
 Class dedicated to integrate operator.
 
virtual MoFEMErrorCode aSsemble (EntitiesFieldData::EntData &data)=0
 Class dedicated to assemble operator to global system vector.
 

Protected Attributes

int nbRows
 < error code
 
int nbIntegrationPts
 number of integration points
 

Detailed Description

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

template class for integration oh the right hand side

Definition at line 164 of file PoissonOperators.hpp.

Constructor & Destructor Documentation

◆ OpBaseRhs()

template<typename OPBASE >
PoissonExample::OpBaseRhs< OPBASE >::OpBaseRhs ( const std::string  field_name)
inline

Definition at line 166 of file PoissonOperators.hpp.

166: 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
Examples
mofem/tutorials/cor-2to5/src/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
mofem/tutorials/cor-2to5/src/PoissonOperators.hpp.

Definition at line 175 of file PoissonOperators.hpp.

176 {
178 // get number of dofs on row
179 nbRows = row_data.getIndices().size();
180 if (!nbRows)
182 // get number of integration points
183 nbIntegrationPts = OPBASE::getGaussPts().size2();
184 // integrate local vector
185 CHKERR iNtegrate(row_data);
186 // assemble local vector
187 CHKERR aSsemble(row_data);
189 }
#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.
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
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
Examples
mofem/tutorials/cor-2to5/src/PoissonOperators.hpp.

Member Data Documentation

◆ nbIntegrationPts

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

number of integration points

Examples
mofem/tutorials/cor-2to5/src/PoissonOperators.hpp.

Definition at line 208 of file PoissonOperators.hpp.

◆ nbRows

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

< error code

number of dofs on row

Examples
mofem/tutorials/cor-2to5/src/PoissonOperators.hpp.

Definition at line 207 of file PoissonOperators.hpp.


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