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

#include "tutorials/adv-2/src/FiniteThermalOps.hpp"

Inheritance diagram for FiniteThermalOps::OpCalculateQdotQLhs_dQ< DIM, GAUSS, AssemblyDomainEleOp >:
[legend]
Collaboration diagram for FiniteThermalOps::OpCalculateQdotQLhs_dQ< DIM, GAUSS, AssemblyDomainEleOp >:
[legend]

Public Member Functions

 OpCalculateQdotQLhs_dQ (const std::string row_field_name, const std::string col_field_name, ScalarFun resistance_function, boost::shared_ptr< MatrixDouble > mat_Grad_Ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Protected Attributes

ScalarFun resistanceFunction
 
boost::shared_ptr< MatrixDouble > matGradPtr
 

Detailed Description

template<int DIM, typename AssemblyDomainEleOp>
struct FiniteThermalOps::OpCalculateQdotQLhs_dQ< DIM, GAUSS, AssemblyDomainEleOp >

Definition at line 107 of file FiniteThermalOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateQdotQLhs_dQ()

template<int DIM, typename AssemblyDomainEleOp >
FiniteThermalOps::OpCalculateQdotQLhs_dQ< DIM, GAUSS, AssemblyDomainEleOp >::OpCalculateQdotQLhs_dQ ( const std::string row_field_name,
const std::string col_field_name,
ScalarFun resistance_function,
boost::shared_ptr< MatrixDouble > mat_Grad_Ptr,
boost::shared_ptr< Range > ents_ptr = nullptr )
inline

Definition at line 110 of file FiniteThermalOps.hpp.

115 : AssemblyDomainEleOp(row_field_name, col_field_name,
116 AssemblyDomainEleOp::OPROWCOL),
117 resistanceFunction(resistance_function), matGradPtr(mat_Grad_Ptr) {}
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<int DIM, typename AssemblyDomainEleOp >
MoFEMErrorCode FiniteThermalOps::OpCalculateQdotQLhs_dQ< DIM, GAUSS, AssemblyDomainEleOp >::iNtegrate ( EntitiesFieldData::EntData & row_data,
EntitiesFieldData::EntData & col_data )
protected

Definition at line 128 of file FiniteThermalOps.hpp.

130 {
132
133 FTensor::Index<'i', DIM> i;
134 FTensor::Index<'J', DIM> J;
135 FTensor::Index<'M', DIM> M;
136 FTensor::Index<'L', DIM> L;
137
138 auto t_w = this->getFTensor0IntegrationWeight();
139
140 auto t_row_base = row_data.getFTensor1N<3>();
141
143 FTensor::Tensor2<double, DIM, DIM> t_right_Cauchy_Green;
145 FTensor::Tensor1<double, DIM> t_Kinv_over_J_row_base;
146
147 constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
148
149 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(matGradPtr));
150
151 // get coordinate at integration points
152 auto t_coords = AssemblyDomainEleOp::getFTensor1CoordsAtGaussPts();
153
154 for (size_t gg = 0; gg != AssemblyDomainEleOp::nbIntegrationPts; ++gg) {
155
156 t_F(i, J) = t_grad(i, J) + t_kd(i, J); // Deformation gradient
157 auto t_J = determinantTensor(t_F); // Volume jacobian
158
159 t_right_Cauchy_Green(M, L) =
160 t_F(i, M) *
161 t_F(i, L); // The inverse of the material thermal conductivity tensor
162
163 const double alpha = this->getMeasure() * t_w;
164
165 t_Kinv_over_J(M, L) =
166 (alpha * resistanceFunction(t_coords(0), t_coords(1), t_coords(2)) /
167 t_J) *
168 t_right_Cauchy_Green(M, L);
169
170 size_t rr = 0;
171 for (; rr != AssemblyDomainEleOp::nbRows; ++rr) {
172 t_Kinv_over_J_row_base(L) = t_Kinv_over_J(M, L) * t_row_base(M);
173 auto t_col_base = col_data.getFTensor1N<3>(gg, 0);
174 for (size_t cc = 0; cc != AssemblyDomainEleOp::nbCols; ++cc) {
175 this->locMat(rr, cc) += t_Kinv_over_J_row_base(L) * t_col_base(L);
176 ++t_col_base;
177 }
178 ++t_row_base;
179 }
180 for (; rr < AssemblyDomainEleOp::nbRowBaseFunctions; ++rr)
181 ++t_row_base;
182
183 ++t_w; // move to another integration weight
184 ++t_coords;
185 ++t_grad;
186 }
187
189}
Kronecker Delta class.
#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()
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'M', 3 > M

Member Data Documentation

◆ matGradPtr

template<int DIM, typename AssemblyDomainEleOp >
boost::shared_ptr<MatrixDouble> FiniteThermalOps::OpCalculateQdotQLhs_dQ< DIM, GAUSS, AssemblyDomainEleOp >::matGradPtr
protected

Definition at line 121 of file FiniteThermalOps.hpp.

◆ resistanceFunction

template<int DIM, typename AssemblyDomainEleOp >
ScalarFun FiniteThermalOps::OpCalculateQdotQLhs_dQ< DIM, GAUSS, AssemblyDomainEleOp >::resistanceFunction
protected

Definition at line 120 of file FiniteThermalOps.hpp.


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