v0.9.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/basic_finite_elements/poisson/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, DataForcesAndSourcesCore::EntData &row_data)
 This function is called by finite element. More...
 
virtual MoFEMErrorCode iNtegrate (DataForcesAndSourcesCore::EntData &data)=0
 Class dedicated to integrate operator. More...
 
virtual MoFEMErrorCode aSsemble (DataForcesAndSourcesCore::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 174 of file PoissonOperators.hpp.

Constructor & Destructor Documentation

◆ OpBaseRhs()

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

Definition at line 176 of file PoissonOperators.hpp.

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

Member Function Documentation

◆ aSsemble()

template<typename OPBASE>
virtual MoFEMErrorCode PoissonExample::OpBaseRhs< OPBASE >::aSsemble ( DataForcesAndSourcesCore::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,
DataForcesAndSourcesCore::EntData row_data 
)

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 185 of file PoissonOperators.hpp.

186  {
188  // get number of dofs on row
189  nbRows = row_data.getIndices().size();
190  if (!nbRows)
192  // get number of integration points
193  nbIntegrationPts = OPBASE::getGaussPts().size2();
194  // integrate local vector
195  CHKERR iNtegrate(row_data);
196  // assemble local vector
197  CHKERR aSsemble(row_data);
199  }
virtual MoFEMErrorCode aSsemble(DataForcesAndSourcesCore::EntData &data)=0
Class dedicated to assemble operator to global system vector.
virtual MoFEMErrorCode iNtegrate(DataForcesAndSourcesCore::EntData &data)=0
Class dedicated to integrate operator.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
int nbIntegrationPts
number of integration points
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ iNtegrate()

template<typename OPBASE>
virtual MoFEMErrorCode PoissonExample::OpBaseRhs< OPBASE >::iNtegrate ( DataForcesAndSourcesCore::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 218 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 217 of file PoissonOperators.hpp.


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