v0.14.0
Public Member Functions | Private Attributes | List of all members
PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp > Struct Template Reference

#include <tutorials/adv-0/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)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 
boost::shared_ptr< MatrixDouble > mDPtr
 

Detailed Description

template<typename AssemblyDomainEleOp>
struct PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >

Definition at line 877 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 891 of file PlasticOpsGeneric.hpp.

894  : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
895  commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {}

Member Function Documentation

◆ iNtegrate()

template<typename AssemblyDomainEleOp >
MoFEMErrorCode PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >::iNtegrate ( EntitiesFieldData::EntData data)
Examples
PlasticOpsGeneric.hpp.

Definition at line 899 of file PlasticOpsGeneric.hpp.

900  {
902 
903  const size_t nb_integration_pts = AssemblyDomainEleOp::getGaussPts().size2();
904  const size_t nb_base_functions = data.getN().size2();
905 
906  auto t_res_c = getFTensor0FromVec(commonDataPtr->resC);
907 
908  auto next = [&]() { ++t_res_c; };
909 
910  auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
911  auto &nf = AssemblyDomainEleOp::locF;
912  auto t_base = data.getFTensor0N();
913  for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
914  const double alpha = AssemblyDomainEleOp::getMeasure() * t_w;
915  ++t_w;
916  const auto res = alpha * t_res_c;
917  next();
918 
919  size_t bb = 0;
920  for (; bb != AssemblyDomainEleOp::nbRows; ++bb) {
921  nf[bb] += t_base * res;
922  ++t_base;
923  }
924  for (; bb < nb_base_functions; ++bb)
925  ++t_base;
926  }
927 
929 }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 885 of file PlasticOpsGeneric.hpp.

◆ mDPtr

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

Definition at line 886 of file PlasticOpsGeneric.hpp.


The documentation for this struct was generated from the following file:
PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: PlasticOpsGeneric.hpp:885
MoFEM::OpBaseImpl::locF
VectorDouble locF
local entity vector
Definition: FormsIntegrators.hpp:251
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MoFEM::OpBaseImpl::nbRows
int nbRows
number of dofs on rows
Definition: FormsIntegrators.hpp:236
PlasticOps::OpCalculateConstraintsRhsImpl< GAUSS, AssemblyDomainEleOp >::mDPtr
boost::shared_ptr< MatrixDouble > mDPtr
Definition: PlasticOpsGeneric.hpp:886
AssemblyDomainEleOp
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
Definition: tensor_divergence_operator.cpp:59
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