v0.14.0
Public Member Functions | Private Attributes | List of all members
ThermoElasticOps::OpStressThermal Struct Reference

#include <users_modules/tutorials/adv-2/src/ThermoElasticOps.hpp>

Inheritance diagram for ThermoElasticOps::OpStressThermal:
[legend]
Collaboration diagram for ThermoElasticOps::OpStressThermal:
[legend]

Public Member Functions

DEPRECATED OpStressThermal (const std::string field_name, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< VectorDouble > temp_ptr, boost::shared_ptr< MatrixDouble > m_D_ptr, boost::shared_ptr< double > coeff_expansion_ptr, boost::shared_ptr< MatrixDouble > stress_ptr)
 
DEPRECATED OpStressThermal (boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< VectorDouble > temp_ptr, boost::shared_ptr< MatrixDouble > m_D_ptr, boost::shared_ptr< double > coeff_expansion_ptr, boost::shared_ptr< MatrixDouble > stress_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 [Calculate stress] More...
 

Private Attributes

boost::shared_ptr< MatrixDouble > strainPtr
 
boost::shared_ptr< VectorDouble > tempPtr
 
boost::shared_ptr< MatrixDouble > mDPtr
 
boost::shared_ptr< doublecoeffExpansionPtr
 
boost::shared_ptr< MatrixDouble > stressPtr
 

Detailed Description

Examples
thermo_elastic.cpp.

Definition at line 23 of file ThermoElasticOps.hpp.

Constructor & Destructor Documentation

◆ OpStressThermal() [1/2]

ThermoElasticOps::OpStressThermal::OpStressThermal ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  strain_ptr,
boost::shared_ptr< VectorDouble >  temp_ptr,
boost::shared_ptr< MatrixDouble >  m_D_ptr,
boost::shared_ptr< double coeff_expansion_ptr,
boost::shared_ptr< MatrixDouble >  stress_ptr 
)
Deprecated:
do not use this constructor
Examples
ThermoElasticOps.hpp.

Definition at line 109 of file ThermoElasticOps.hpp.

115  : DomainEleOp(field_name, DomainEleOp::OPROW), strainPtr(strain_ptr),
116  tempPtr(temp_ptr), mDPtr(m_D_ptr), coeffExpansionPtr(coeff_expansion_ptr),
117  stressPtr(stress_ptr) {
118  // Operator is only executed for vertices
119  std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE], false);
120 }

◆ OpStressThermal() [2/2]

ThermoElasticOps::OpStressThermal::OpStressThermal ( boost::shared_ptr< MatrixDouble >  strain_ptr,
boost::shared_ptr< VectorDouble >  temp_ptr,
boost::shared_ptr< MatrixDouble >  m_D_ptr,
boost::shared_ptr< double coeff_expansion_ptr,
boost::shared_ptr< MatrixDouble >  stress_ptr 
)

Definition at line 122 of file ThermoElasticOps.hpp.

127  : DomainEleOp(NOSPACE, DomainEleOp::OPSPACE), strainPtr(strain_ptr),
128  tempPtr(temp_ptr), mDPtr(m_D_ptr), coeffExpansionPtr(coeff_expansion_ptr),
129  stressPtr(stress_ptr) {}

Member Function Documentation

◆ doWork()

MoFEMErrorCode ThermoElasticOps::OpStressThermal::doWork ( int  side,
EntityType  type,
EntData data 
)

[Calculate stress]

Examples
ThermoElasticOps.hpp.

Definition at line 132 of file ThermoElasticOps.hpp.

133  {
135  const auto nb_gauss_pts = getGaussPts().size2();
136  stressPtr->resize((SPACE_DIM * (SPACE_DIM + 1)) / 2, nb_gauss_pts);
137 
138  constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
139  auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*mDPtr);
140  auto t_strain = getFTensor2SymmetricFromMat<SPACE_DIM>(*strainPtr);
141  auto t_stress = getFTensor2SymmetricFromMat<SPACE_DIM>(*stressPtr);
142  auto t_temp = getFTensor0FromVec(*tempPtr);
147  for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
148  t_stress(i, j) =
149  t_D(i, j, k, l) * (t_strain(k, l) - t_kd(k, l) * (t_temp - ref_temp) *
150  (*coeffExpansionPtr));
151  ++t_strain;
152  ++t_stress;
153  ++t_temp;
154  }
156 }

Member Data Documentation

◆ coeffExpansionPtr

boost::shared_ptr<double> ThermoElasticOps::OpStressThermal::coeffExpansionPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 46 of file ThermoElasticOps.hpp.

◆ mDPtr

boost::shared_ptr<MatrixDouble> ThermoElasticOps::OpStressThermal::mDPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 45 of file ThermoElasticOps.hpp.

◆ strainPtr

boost::shared_ptr<MatrixDouble> ThermoElasticOps::OpStressThermal::strainPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 43 of file ThermoElasticOps.hpp.

◆ stressPtr

boost::shared_ptr<MatrixDouble> ThermoElasticOps::OpStressThermal::stressPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 47 of file ThermoElasticOps.hpp.

◆ tempPtr

boost::shared_ptr<VectorDouble> ThermoElasticOps::OpStressThermal::tempPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 44 of file ThermoElasticOps.hpp.


The documentation for this struct was generated from the following file:
NOSPACE
@ NOSPACE
Definition: definitions.h:83
ThermoElasticOps::OpStressThermal::mDPtr
boost::shared_ptr< MatrixDouble > mDPtr
Definition: ThermoElasticOps.hpp:45
ThermoElasticOps::OpStressThermal::coeffExpansionPtr
boost::shared_ptr< double > coeffExpansionPtr
Definition: ThermoElasticOps.hpp:46
ref_temp
double ref_temp
Definition: thermo_elastic.cpp:124
FTensor::Kronecker_Delta
Kronecker Delta class.
Definition: Kronecker_Delta.hpp:15
ThermoElasticOps::OpStressThermal::strainPtr
boost::shared_ptr< MatrixDouble > strainPtr
Definition: ThermoElasticOps.hpp:43
DomainEleOp
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
Definition: child_and_parent.cpp:36
SPACE_DIM
constexpr int SPACE_DIM
Definition: child_and_parent.cpp:16
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', SPACE_DIM >
ThermoElasticOps::OpStressThermal::stressPtr
boost::shared_ptr< MatrixDouble > stressPtr
Definition: ThermoElasticOps.hpp:47
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
ThermoElasticOps::OpStressThermal::tempPtr
boost::shared_ptr< VectorDouble > tempPtr
Definition: ThermoElasticOps.hpp:44
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21