v0.15.0
Loading...
Searching...
No Matches
PoissonExample::OpResF_Boundary Struct Reference

#include "tutorials/cor-2to5/src/PoissonOperators.hpp"

Inheritance diagram for PoissonExample::OpResF_Boundary:
[legend]
Collaboration diagram for PoissonExample::OpResF_Boundary:
[legend]

Public Member Functions

 OpResF_Boundary (boost::shared_ptr< VectorDouble > &lambda_vals)
 
- Public Member Functions inherited from PoissonExample::Op_g
 Op_g (FVal f_value, const string field_name="L", const double beta=1)
 
- Public Member Functions inherited from PoissonExample::OpBaseRhs< FaceElementForcesAndSourcesCore::UserDataOperator >
 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 Member Functions

MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 Integrate local constrains vector.
 
- Protected Member Functions inherited from PoissonExample::Op_g
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 Integrate local constrains vector.
 
MoFEMErrorCode aSsemble (EntitiesFieldData::EntData &data)
 assemble constrains vectors
 

Protected Attributes

boost::shared_ptr< VectorDouble > lambdaVals
 
- Protected Attributes inherited from PoissonExample::Op_g
FTensor::Number< 0 > NX
 x-direction index
 
FTensor::Number< 1 > NY
 y-direction index
 
FTensor::Number< 2 > NZ
 z-direction index
 
FVal fValue
 Function pointer evaluating values of "U" at the boundary.
 
VectorDouble locVec
 
const double bEta
 
- Protected Attributes inherited from PoissonExample::OpBaseRhs< FaceElementForcesAndSourcesCore::UserDataOperator >
int nbRows
 < error code
 
int nbIntegrationPts
 number of integration points
 

Additional Inherited Members

- Public Types inherited from PoissonExample::Op_g
typedef boost::function< double(const double, const double, const double)> FVal
 

Detailed Description

Definition at line 778 of file PoissonOperators.hpp.

Constructor & Destructor Documentation

◆ OpResF_Boundary()

PoissonExample::OpResF_Boundary::OpResF_Boundary ( boost::shared_ptr< VectorDouble > & lambda_vals)
inline
Examples
PoissonOperators.hpp.

Definition at line 780 of file PoissonOperators.hpp.

781 : Op_g(FVal(), "U", 1), lambdaVals(lambda_vals) {}
boost::shared_ptr< VectorDouble > lambdaVals
Op_g(FVal f_value, const string field_name="L", const double beta=1)
boost::function< double(const double, const double, const double)> FVal

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode PoissonExample::OpResF_Boundary::iNtegrate ( EntitiesFieldData::EntData & data)
inlineprotected

Integrate local constrains vector.

Examples
PoissonOperators.hpp.

Definition at line 789 of file PoissonOperators.hpp.

789 {
791 // set size to local vector
792 locVec.resize(nbRows, false);
793 // clear local vector
794 locVec.clear();
795 // get face area
796 const double area = getArea() * bEta;
797 // get integration weight
798 auto t_w = getFTensor0IntegrationWeight();
799 // get base function
800 auto t_u = data.getFTensor0N();
801 // get solution at integration point
802 auto t_lambda = getFTensor0FromVec(*lambdaVals);
803 // make loop over integration points
804 for (int gg = 0; gg != nbIntegrationPts; gg++) {
805 // evaluate function on boundary and scale it by area and integration
806 // weight
807 double alpha = area * t_w;
808 // get element of vector
810 &*locVec.data().begin());
811 for (int rr = 0; rr != nbRows; rr++) {
812 t_a += alpha * t_u * t_lambda;
813 ++t_a;
814 ++t_u;
815 }
816 ++t_w;
817 ++t_lambda;
818 }
820 }
#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()
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.

Member Data Documentation

◆ lambdaVals

boost::shared_ptr<VectorDouble> PoissonExample::OpResF_Boundary::lambdaVals
protected
Examples
PoissonOperators.hpp.

Definition at line 784 of file PoissonOperators.hpp.


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