v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp > Struct Template Reference

#include "tutorials/adv-0_plasticity/src/PlasticOpsGeneric.hpp"

Inheritance diagram for PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >:
[legend]
Collaboration diagram for PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >:
[legend]

Public Member Functions

 OpCalculateConstraintsRhsImpl (const std::string field_name, boost::shared_ptr< CommonData > common_data_ptr, boost::shared_ptr< MatrixDouble > m_D_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::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< CommonData > commonDataPtr
 
boost::shared_ptr< MatrixDouble > mDPtr
 

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<typename AssemblyDomainEleOp>
struct PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >

Definition at line 776 of file PlasticOpsGeneric.hpp.

Constructor & Destructor Documentation

◆ OpCalculateConstraintsRhsImpl()

template<typename AssemblyDomainEleOp >
PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >::OpCalculateConstraintsRhsImpl ( const std::string  field_name,
boost::shared_ptr< CommonData >  common_data_ptr,
boost::shared_ptr< MatrixDouble >  m_D_ptr 
)

Definition at line 789 of file PlasticOpsGeneric.hpp.

793 : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
794 commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {}
constexpr auto field_name
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<typename AssemblyDomainEleOp >
MoFEMErrorCode PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >::iNtegrate ( EntitiesFieldData::EntData &  data)

Definition at line 798 of file PlasticOpsGeneric.hpp.

799 {
801
802 const size_t nb_integration_pts = AssemblyDomainEleOp::getGaussPts().size2();
803 const size_t nb_base_functions = data.getN().size2();
804
805 auto t_res_c = getFTensor0FromVec(commonDataPtr->resC);
806
807 auto next = [&]() { ++t_res_c; };
808
809 auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
810 auto &nf = AssemblyDomainEleOp::locF;
811 auto t_base = data.getFTensor0N();
812 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
813 const double alpha = AssemblyDomainEleOp::getMeasure() * t_w;
814 ++t_w;
815 const auto res = alpha * t_res_c;
816 next();
817
818 size_t bb = 0;
819 for (; bb != AssemblyDomainEleOp::nbRows; ++bb) {
820 nf[bb] += t_base * res;
821 ++t_base;
822 }
823 for (; bb < nb_base_functions; ++bb)
824 ++t_base;
825 }
826
828}
#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()
VectorDouble locF
local entity vector
int nbRows
number of dofs on rows

Member Data Documentation

◆ commonDataPtr

template<typename AssemblyDomainEleOp >
boost::shared_ptr<CommonData> PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >::commonDataPtr
private

Definition at line 784 of file PlasticOpsGeneric.hpp.

◆ mDPtr

template<typename AssemblyDomainEleOp >
boost::shared_ptr<MatrixDouble> PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >::mDPtr
private

Definition at line 785 of file PlasticOpsGeneric.hpp.


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