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 <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 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) {}

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

◆ 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.

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  }

◆ 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

Member Data Documentation

◆ nbIntegrationPts

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

number of integration points

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

Definition at line 207 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:460
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:548
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1214
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:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
PoissonExample::OpBaseRhs::nbRows
int nbRows
< error code
Definition: PoissonOperators.hpp:207
PoissonExample::OpBaseRhs::nbIntegrationPts
int nbIntegrationPts
number of integration points
Definition: PoissonOperators.hpp:208