v0.15.0
Loading...
Searching...
No Matches
PlasticOps::OpCalculatePlasticFlowLhs_dEPImpl< DIM, GAUSS, AssemblyDomainEleOp > Struct Template Reference

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

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

Public Member Functions

 OpCalculatePlasticFlowLhs_dEPImpl (const std::string row_field_name, const std::string col_field_name, boost::shared_ptr< CommonData > common_data_ptr, boost::shared_ptr< MatrixDouble > m_D_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Private Attributes

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

Detailed Description

template<int DIM, typename AssemblyDomainEleOp>
struct PlasticOps::OpCalculatePlasticFlowLhs_dEPImpl< DIM, GAUSS, AssemblyDomainEleOp >

Definition at line 947 of file PlasticOpsGeneric.hpp.

Constructor & Destructor Documentation

◆ OpCalculatePlasticFlowLhs_dEPImpl()

template<int DIM, typename AssemblyDomainEleOp >
PlasticOps::OpCalculatePlasticFlowLhs_dEPImpl< DIM, GAUSS, AssemblyDomainEleOp >::OpCalculatePlasticFlowLhs_dEPImpl ( const std::string row_field_name,
const std::string col_field_name,
boost::shared_ptr< CommonData > common_data_ptr,
boost::shared_ptr< MatrixDouble > m_D_ptr )

Definition at line 962 of file PlasticOpsGeneric.hpp.

967 : AssemblyDomainEleOp(row_field_name, col_field_name,
968 AssemblyDomainEleOp::OPROWCOL),
969 commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {
970 AssemblyDomainEleOp::sYmm = false;
971}
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<int DIM, typename AssemblyDomainEleOp >
MoFEMErrorCode PlasticOps::OpCalculatePlasticFlowLhs_dEPImpl< DIM, GAUSS, AssemblyDomainEleOp >::iNtegrate ( EntitiesFieldData::EntData & row_data,
EntitiesFieldData::EntData & col_data )
Examples
PlasticOpsGeneric.hpp.

Definition at line 1000 of file PlasticOpsGeneric.hpp.

1002 {
1004
1005 FTensor::Index<'i', DIM> i;
1006 FTensor::Index<'j', DIM> j;
1007 FTensor::Index<'k', DIM> k;
1008 FTensor::Index<'l', DIM> l;
1009 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
1011 FTensor::Index<'O', size_symm> O;
1012
1013 auto &locMat = AssemblyDomainEleOp::locMat;
1014
1015 const auto nb_integration_pts = AssemblyDomainEleOp::getGaussPts().size2();
1016 const auto nb_row_base_functions = row_data.getN().size2();
1017
1018 auto t_res_flow_dstrain =
1019 getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->resFlowDstrain);
1020 auto t_res_flow_dplastic_strain =
1021 getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->resFlowDstrainDot);
1022 auto t_L = symm_L_tensor(FTensor::Number<DIM>());
1023
1024 auto next = [&]() {
1025 ++t_res_flow_dstrain;
1026 ++t_res_flow_dplastic_strain;
1027 };
1028
1029 auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
1030 auto t_row_base = row_data.getFTensor0N();
1031 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
1032 double alpha = AssemblyDomainEleOp::getMeasure() * t_w;
1033 ++t_w;
1034
1036 t_res_mat(O, L) =
1037 alpha * (t_L(i, j, O) * ((t_res_flow_dplastic_strain(i, j, k, l) -
1038 t_res_flow_dstrain(i, j, k, l)) *
1039 t_L(k, l, L)));
1040 next();
1041
1042 size_t rr = 0;
1043 for (; rr != AssemblyDomainEleOp::nbRows / size_symm; ++rr) {
1044 auto t_mat = get_mat_tensor_sym_dtensor_sym(rr, locMat,
1046 auto t_col_base = col_data.getFTensor0N(gg, 0);
1047 for (size_t cc = 0; cc != AssemblyDomainEleOp::nbCols / size_symm; ++cc) {
1048 t_mat(O, L) += ((t_row_base * t_col_base) * t_res_mat(O, L));
1049 ++t_mat;
1050 ++t_col_base;
1051 }
1052
1053 ++t_row_base;
1054 }
1055
1056 for (; rr < nb_row_base_functions; ++rr)
1057 ++t_row_base;
1058 }
1059
1061}
#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
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static auto get_mat_tensor_sym_dtensor_sym(size_t rr, MatrixDouble &mat, FTensor::Number< 2 >)
auto symm_L_tensor(FTensor::Number< DIM >)
constexpr auto size_symm
Definition plastic.cpp:42

Member Data Documentation

◆ commonDataPtr

template<int DIM, typename AssemblyDomainEleOp >
boost::shared_ptr<CommonData> PlasticOps::OpCalculatePlasticFlowLhs_dEPImpl< DIM, GAUSS, AssemblyDomainEleOp >::commonDataPtr
private

Definition at line 957 of file PlasticOpsGeneric.hpp.

◆ mDPtr

template<int DIM, typename AssemblyDomainEleOp >
boost::shared_ptr<MatrixDouble> PlasticOps::OpCalculatePlasticFlowLhs_dEPImpl< DIM, GAUSS, AssemblyDomainEleOp >::mDPtr
private

Definition at line 958 of file PlasticOpsGeneric.hpp.


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