v0.15.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp > Struct Template Reference

#include "users_modules/multifield-thermoplasticity-private/src/ThermoPlasticOps.hpp"

Inheritance diagram for ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >:
[legend]
Collaboration diagram for ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >:
[legend]

Public Member Functions

 OpCalculateAdiabaticHeatingRhsImpl (const std::string field_name, boost::shared_ptr< MatrixDouble > stress_measure, boost::shared_ptr< MatrixDouble > plastic_strain_rate_measure, ScalarFun inelastic_heating_function, boost::shared_ptr< Range > ents_ptr=nullptr)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Protected Attributes

boost::shared_ptr< MatrixDouble > stressMeasurePtr
 
boost::shared_ptr< MatrixDouble > plasticStrainRateMeasurePtr
 
ScalarFun inelasticHeatingFunction
 

Detailed Description

template<int DIM, typename AssemblyDomainEleOp>
struct ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >

Definition at line 94 of file ThermoPlasticOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateAdiabaticHeatingRhsImpl()

template<int DIM, typename AssemblyDomainEleOp >
ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >::OpCalculateAdiabaticHeatingRhsImpl ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  stress_measure,
boost::shared_ptr< MatrixDouble >  plastic_strain_rate_measure,
ScalarFun  inelastic_heating_function,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 97 of file ThermoPlasticOps.hpp.

103 : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
104 stressMeasurePtr(stress_measure),
105 plasticStrainRateMeasurePtr(plastic_strain_rate_measure),
106 inelasticHeatingFunction(inelastic_heating_function) {}
constexpr auto field_name
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<int DIM, typename AssemblyDomainEleOp >
MoFEMErrorCode ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >::iNtegrate ( EntitiesFieldData::EntData &  data)
protected

Definition at line 117 of file ThermoPlasticOps.hpp.

118 {
120
121 FTensor::Index<'i', DIM> i;
122 FTensor::Index<'j', DIM> j;
123
124 const auto nb_integration_pts = AssemblyDomainEleOp::getGaussPts().size2();
125
126 // get stress and strain values
127 auto t_stress = getFTensor2SymmetricFromMat<DIM>(*stressMeasurePtr);
128 auto t_plastic_strain_rate =
129 getFTensor2SymmetricFromMat<DIM>(*plasticStrainRateMeasurePtr);
130
131 // get element volume
132 const double vol = AssemblyDomainEleOp::getMeasure();
133 // get integration weights
134 auto t_w = AssemblyDomainEleOp::getFTensor0IntegrationWeight();
135 // get base function gradient on rows
136 auto t_row_base = data.getFTensor0N();
137
138 // get coordinate at integration points
139 auto t_coords = AssemblyDomainEleOp::getFTensor1CoordsAtGaussPts();
140
141 // loop over integration points
142 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
143 // take into account Jacobian
144 const double alpha =
145 t_w * vol *
146 inelasticHeatingFunction(t_coords(0), t_coords(1), t_coords(2)) *
147 t_stress(i, j) * t_plastic_strain_rate(i, j);
148
149 // loop over rows base functions
150 size_t rr = 0;
151 for (; rr != AssemblyDomainEleOp::nbRows; ++rr) {
152 AssemblyDomainEleOp::locF[rr] += alpha * t_row_base;
153 ++t_row_base;
154 }
155 for (; rr < AssemblyDomainEleOp::nbRowBaseFunctions; ++rr)
156 ++t_row_base;
157 ++t_w; // move to another integration weight
158 ++t_coords;
159 ++t_stress;
160 ++t_plastic_strain_rate;
161 };
163}
#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< 'j', 3 > j

Member Data Documentation

◆ inelasticHeatingFunction

template<int DIM, typename AssemblyDomainEleOp >
ScalarFun ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >::inelasticHeatingFunction
protected

Definition at line 111 of file ThermoPlasticOps.hpp.

◆ plasticStrainRateMeasurePtr

template<int DIM, typename AssemblyDomainEleOp >
boost::shared_ptr<MatrixDouble> ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >::plasticStrainRateMeasurePtr
protected

Definition at line 110 of file ThermoPlasticOps.hpp.

◆ stressMeasurePtr

template<int DIM, typename AssemblyDomainEleOp >
boost::shared_ptr<MatrixDouble> ThermoPlasticOps::OpCalculateAdiabaticHeatingRhsImpl< DIM, GAUSS, AssemblyDomainEleOp >::stressMeasurePtr
protected

Definition at line 109 of file ThermoPlasticOps.hpp.


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