v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PoissonExample::OpResF_Boundary Struct Reference

#include <users_modules/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. 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 Member Functions

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

Protected Attributes

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

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

Constructor & Destructor Documentation

◆ OpResF_Boundary()

PoissonExample::OpResF_Boundary::OpResF_Boundary ( boost::shared_ptr< VectorDouble > &  lambda_vals)
inline

Definition at line 777 of file PoissonOperators.hpp.

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

Member Function Documentation

◆ iNtegrate()

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

Integrate local constrains vector.

Reimplemented from PoissonExample::Op_g.

Examples
PoissonOperators.hpp.

Definition at line 786 of file PoissonOperators.hpp.

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

Member Data Documentation

◆ lambdaVals

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

Definition at line 781 of file PoissonOperators.hpp.


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