v0.9.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PoissonExample::OpResF_Boundary Struct Reference

#include <users_modules/basic_finite_elements/poisson/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, DataForcesAndSourcesCore::EntData &row_data)
 This function is called by finite element. More...
 

Protected Member Functions

MoFEMErrorCode iNtegrate (DataForcesAndSourcesCore::EntData &data)
 Integrate local constrains vector. More...
 
- Protected Member Functions inherited from PoissonExample::Op_g
MoFEMErrorCode aSsemble (DataForcesAndSourcesCore::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 788 of file PoissonOperators.hpp.

Constructor & Destructor Documentation

◆ OpResF_Boundary()

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

Definition at line 790 of file PoissonOperators.hpp.

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

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode PoissonExample::OpResF_Boundary::iNtegrate ( DataForcesAndSourcesCore::EntData data)
protectedvirtual

Integrate local constrains vector.

Reimplemented from PoissonExample::Op_g.

Examples
PoissonOperators.hpp.

Definition at line 799 of file PoissonOperators.hpp.

799  {
801  // set size to local vector
802  locVec.resize(nbRows, false);
803  // clear local vector
804  locVec.clear();
805  // get face area
806  const double area = getArea() * bEta;
807  // get integration weight
808  auto t_w = getFTensor0IntegrationWeight();
809  // get base function
810  auto t_u = data.getFTensor0N();
811  // get solution at integration point
812  auto t_lambda = getFTensor0FromVec(*lambdaVals);
813  // make loop over integration points
814  for (int gg = 0; gg != nbIntegrationPts; gg++) {
815  // evaluate function on boundary and scale it by area and integration
816  // weight
817  double alpha = area * t_w;
818  // get element of vector
820  &*locVec.data().begin());
821  for (int rr = 0; rr != nbRows; rr++) {
822  t_a += alpha * t_u * t_lambda;
823  ++t_a;
824  ++t_u;
825  }
826  ++t_w;
827  ++t_lambda;
828  }
830  }
static FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:142
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
boost::shared_ptr< VectorDouble > lambdaVals
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

Member Data Documentation

◆ lambdaVals

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

Definition at line 794 of file PoissonOperators.hpp.


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