v0.14.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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. 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 778 of file PoissonOperators.hpp.

Constructor & Destructor Documentation

◆ OpResF_Boundary()

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

Definition at line 780 of file PoissonOperators.hpp.

781  : Op_g(FVal(), "U", 1), lambdaVals(lambda_vals) {}

Member Function Documentation

◆ iNtegrate()

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

Integrate local constrains vector.

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  }

Member Data Documentation

◆ lambdaVals

boost::shared_ptr<VectorDouble> PoissonExample::OpResF_Boundary::lambdaVals
protected

Definition at line 784 of file PoissonOperators.hpp.


The documentation for this struct was generated from the following file:
PoissonExample::OpResF_Boundary::lambdaVals
boost::shared_ptr< VectorDouble > lambdaVals
Definition: PoissonOperators.hpp:784
MoFEM::EntitiesFieldData::EntData::getFTensor0N
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
Definition: EntitiesFieldData.hpp:1502
PoissonExample::Op_g::bEta
const double bEta
Definition: PoissonOperators.hpp:437
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
PoissonExample::Op_g::Op_g
Op_g(FVal f_value, const string field_name="L", const double beta=1)
Definition: PoissonOperators.hpp:425
PoissonExample::Op_g::locVec
VectorDouble locVec
Definition: PoissonOperators.hpp:436
FTensor::Tensor0
Definition: Tensor0.hpp:16
PoissonExample::Op_g::FVal
boost::function< double(const double, const double, const double)> FVal
Definition: PoissonOperators.hpp:423
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< FaceElementForcesAndSourcesCore::UserDataOperator >::nbRows
int nbRows
< error code
Definition: PoissonOperators.hpp:207
PoissonExample::OpBaseRhs< FaceElementForcesAndSourcesCore::UserDataOperator >::nbIntegrationPts
int nbIntegrationPts
number of integration points
Definition: PoissonOperators.hpp:208