v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SeepageOps::OpDomainRhsHydrostaticStress< DIM > Struct Template Reference

#include "tutorials/adv-5_poroelasticity/src/SeepageOps.hpp"

Inheritance diagram for SeepageOps::OpDomainRhsHydrostaticStress< DIM >:
[legend]
Collaboration diagram for SeepageOps::OpDomainRhsHydrostaticStress< DIM >:
[legend]

Public Member Functions

 OpDomainRhsHydrostaticStress (std::string field_name1, boost::shared_ptr< VectorDouble > p_ptr, std::function< double(const double, const double, const double)> multiplier_func)
 
MoFEMErrorCode iNtegrate (DataForcesAndSourcesCore::EntData &data)
 
- Public Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
 OpBaseImpl (const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
 Constructor for base operator implementation.
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 Do calculations for the left hand side.
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side.
 

Private Attributes

boost::shared_ptr< VectorDouble > pPtr
 
std::function< double(const double, const double, const double)> multiplier_func
 

Additional Inherited Members

- Public Types inherited from MoFEM::OpBaseImpl< A, EleOp >
using OpType = typename EleOp::OpType
 
using EntData = EntitiesFieldData::EntData
 
using MatSetValuesHook = boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)>
 
- Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set
 
FEFun feScalingFun
 set by fe entity handle
 
boost::shared_ptr< Range > entsPtr
 Entities on which element is run.
 
- Static Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
static MatSetValuesHook matSetValuesHook
 
- Protected Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
template<int DIM>
auto getNf ()
 Get local vector tensor for assembly.
 
template<int ROW_DIM, int COL_DIM = ROW_DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, COL_DIM >, ROW_DIM, COL_DIM > getLocMat (const int rr)
 Get local matrix tensor for assembly.
 
virtual MoFEMErrorCode iNtegrate (EntData &, EntData &)
 Integrate grad-grad operator.
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
 Assemble local matrix into global matrix.
 
virtual MoFEMErrorCode iNtegrate (EntData &)
 Class dedicated to integrate operator.
 
virtual MoFEMErrorCode aSsemble (EntData &data)
 Assemble local vector into global vector.
 
virtual size_t getNbOfBaseFunctions (EntitiesFieldData::EntData &data)
 Get number of base functions.
 
- Protected Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
int nbRows
 number of dofs on rows
 
int nbCols
 number if dof on column
 
int nbIntegrationPts
 number of integration points
 
int nbRowBaseFunctions
 number or row base functions
 
int rowSide
 row side number
 
int colSide
 column side number
 
EntityType rowType
 row type
 
EntityType colType
 column type
 
bool assembleTranspose
 
bool onlyTranspose
 
MatrixDouble locMat
 local entity block matrix
 
MatrixDouble locMatTranspose
 local entity block matrix
 
VectorDouble locF
 local entity vector
 

Detailed Description

template<int DIM>
struct SeepageOps::OpDomainRhsHydrostaticStress< DIM >
Examples
mofem/tutorials/adv-5_poroelasticity/seepage.cpp.

Definition at line 22 of file SeepageOps.hpp.

Constructor & Destructor Documentation

◆ OpDomainRhsHydrostaticStress()

template<int DIM>
SeepageOps::OpDomainRhsHydrostaticStress< DIM >::OpDomainRhsHydrostaticStress ( std::string  field_name1,
boost::shared_ptr< VectorDouble >  p_ptr,
std::function< double(const double, const double, const double)>  multiplier_func 
)
inline

Definition at line 25 of file SeepageOps.hpp.

28 : AssemblyDomainEleOp(field_name1, field_name1, DomainEleOp::OPROW),
boost::shared_ptr< VectorDouble > pPtr
std::function< double(const double, const double, const double)> multiplier_func
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<int DIM>
MoFEMErrorCode SeepageOps::OpDomainRhsHydrostaticStress< DIM >::iNtegrate ( DataForcesAndSourcesCore::EntData &  data)
inline
Examples
mofem/tutorials/adv-5_poroelasticity/src/SeepageOps.hpp.

Definition at line 31 of file SeepageOps.hpp.

31 {
33
34 const int nb_dofs = data.getIndices().size();
35
36 if (nb_dofs) {
37
38 auto &nf = AssemblyDomainEleOp::locF; //access to local vector
39 // get element measure
40 const double measure = getMeasure();
41
42 // get number of integration points
43 const int nb_integration_points = getGaussPts().size2();
44 // get integration weights
45 auto t_w = getFTensor0IntegrationWeight();
46
47 // get base function
48 auto t_base_diff = data.getFTensor1DiffN<DIM>();
49
50 //constexpr double g_acceleration = 9.81;
51
52 FTensor::Index<'i', DIM> i;
53
54 auto t_p = getFTensor0FromVec(*pPtr);
55 for (int gg = 0; gg != nb_integration_points; gg++) {
56
57 auto t_nf = getFTensor1FromPtr<DIM>(&nf[0]);
58
59 const double biot = multiplier_func(0.0, 0.0, 0.0);
60 const double a = t_w * measure * t_p * biot;
61
62 for (int rr = 0; rr != nb_dofs / DIM; rr++) { //loop over dofs (rr = alpha)
63 t_nf(i) -= t_base_diff(i) * a; //loop over dimensions
64
65 // move to the next base function
66 ++t_base_diff; // moves the pointer to the next shape function
67 ++t_nf;
68 }
69
70 // move to the weight of the next integration point
71 ++t_w;
72 ++t_p;
73 }
74
75 }
76
78 }
constexpr double a
#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()
FTensor::Index< 'i', SPACE_DIM > i
VectorDouble locF
local entity vector

Member Data Documentation

◆ multiplier_func

template<int DIM>
std::function<double(const double, const double, const double)> SeepageOps::OpDomainRhsHydrostaticStress< DIM >::multiplier_func
private

◆ pPtr

template<int DIM>
boost::shared_ptr<VectorDouble> SeepageOps::OpDomainRhsHydrostaticStress< DIM >::pPtr
private

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