v0.15.0
Loading...
Searching...
No Matches
ThermalOps.hpp
Go to the documentation of this file.
1/**
2 * @file ThermalOps.hpp
3 * @author Ross Williams (ross.williams@glasgow.ac.uk)
4 * @brief Thermal operators agnostic to small/large deformations
5 * @version 0.14.0
6 * @date 2025-03-31
7 */
8
9#ifndef __THERMAL_OPS_HPP__
10#define __THERMAL_OPS_HPP__
11
12namespace ThermalOps {
13
14// Templated on IS_LARGE_STRAINS to allow different implementations with
15// different numbers of arguments at compile time
16/**
17 * @brief Integrate Lhs base of flux (1/k) base of flux (FLUX x FLUX)
18 *
19 */
20template <int SPACE_DIM, bool IS_LARGE_STRAINS> struct OpHdivHdivImpl;
21
22template <int SPACE_DIM>
24 : public FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm<
25 GAUSS>::OpMass<3, SPACE_DIM> {
26 OpHdivHdivImpl(const std::string row_field_name,
27 const std::string col_field_name,
28 ScalarFun resistance_function,
29 boost::shared_ptr<MatrixDouble> mat_Grad_Ptr,
30 boost::shared_ptr<Range> ents_ptr = nullptr)
31 : FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm<
32 GAUSS>::OpMass<3, SPACE_DIM>(row_field_name, col_field_name,
33 resistance_function, ents_ptr) {}
34};
35
36template <int SPACE_DIM>
38 : public FiniteThermalOps::OpCalculateQdotQLhs_dQ<SPACE_DIM, GAUSS,
39 AssemblyDomainEleOp> {
40 OpHdivHdivImpl(const std::string row_field_name,
41 const std::string col_field_name,
42 ScalarFun resistance_function,
43 boost::shared_ptr<MatrixDouble> mat_Grad_Ptr,
44 boost::shared_ptr<Range> ents_ptr = nullptr)
45 : FiniteThermalOps::OpCalculateQdotQLhs_dQ<SPACE_DIM, GAUSS,
47 row_field_name, col_field_name, resistance_function, mat_Grad_Ptr,
48 ents_ptr) {}
49};
51// Add alias to allow same implementation for small and large strains
53
54/**
55 * @brief Integrate Lhs div of base of flux times base of temperature (FLUX x
56 * T) and transpose of it, i.e. (T x FLUX)
57 *
58 */
59using OpHdivT = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm<
60 GAUSS>::OpMixDivTimesScalar<SPACE_DIM>;
61
62// Templated on IS_LARGE_STRAINS to allow different implementations with
63// different numbers of arguments at compile time. An empty operator is called
64// for IS_LARGE_STRAINS = false
65/**
66 * @brief Integrate Lhs of flux term coupled to displacement field
67 *
68 */
71
72/**
73 * @brief Integrate Lhs base of temperature times (heat capacity) times base of
74 * temperature (T x T)
75 *
76 */
77using OpCapacity = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm<
78 GAUSS>::OpMass<1, 1>;
79
80// Templated on IS_LARGE_STRAINS to allow different implementations with
81// different numbers of arguments at compile time
82/**
83 * @brief Integrating Rhs flux base (1/k) flux (FLUX)
84 */
85template <int SPACE_DIM, bool IS_LARGE_STRAINS> struct OpHdivFluxImpl;
87template <int SPACE_DIM>
88struct OpHdivFluxImpl<SPACE_DIM, false>
89 : public FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm<
90 GAUSS>::OpBaseTimesVector<3, SPACE_DIM, 1> {
91 OpHdivFluxImpl(const std::string field_name,
92 boost::shared_ptr<MatrixDouble> vec,
93 ScalarFun resistance_function,
94 boost::shared_ptr<MatrixDouble> mat_Grad_Ptr,
95 boost::shared_ptr<Range> ents_ptr = nullptr)
96 : FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm<
97 GAUSS>::OpBaseTimesVector<3, SPACE_DIM, 1>(field_name, vec,
98 resistance_function,
99 ents_ptr) {}
101template <int SPACE_DIM>
103 : public FiniteThermalOps::OpCalculateQdotQRhs<SPACE_DIM, GAUSS,
104 AssemblyDomainEleOp> {
105 OpHdivFluxImpl(const std::string field_name,
106 boost::shared_ptr<MatrixDouble> vec,
107 ScalarFun resistance_function,
108 boost::shared_ptr<MatrixDouble> mat_Grad_Ptr,
109 boost::shared_ptr<Range> ents_ptr = nullptr)
110 : FiniteThermalOps::OpCalculateQdotQRhs<SPACE_DIM, GAUSS,
112 field_name, vec, resistance_function, mat_Grad_Ptr, ents_ptr) {}
113};
114
115// Add alias to allow same implementation for small and large strains
116using OpHdivFlux = OpHdivFluxImpl<SPACE_DIM, IS_LARGE_STRAINS>;
117
118/**
119 * @brief Integrate Rhs div flux base times temperature (T)
120 *
121 */
122using OpHDivTemp = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm<
123 GAUSS>::OpMixDivTimesU<3, 1, SPACE_DIM>;
124
125/**
126 * @brief Integrate Rhs base of temperature time heat capacity times heat rate
127 * (T)
128 *
129 */
130using OpBaseDotT = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm<
131 GAUSS>::OpBaseTimesScalar<1>;
132
133/**
134 * @brief Integrate Rhs base of temperature times divergence of flux (T)
135 *
136 */
138
139} // namespace ThermalOps
140
141#endif // __THERMAL_OPS_HPP__
constexpr int SPACE_DIM
[Define dimension]
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixDivTimesScalar< SPACE_DIM > OpHdivT
Integrate Lhs div of base of flux times base of temperature (FLUX x T) and transpose of it,...
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 > OpCapacity
Integrate Lhs base of temperature times (heat capacity) times base of temperature (T x T)
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesScalar< 1 > OpBaseDotT
Integrate Rhs base of temperature time heat capacity times heat rate (T)
OpBaseDotT OpBaseDivFlux
Integrate Rhs base of temperature times divergence of flux (T)
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpMixDivTimesU< 3, 1, SPACE_DIM > OpHDivTemp
Integrate Rhs div flux base times temperature (T)
OpCalculateQdotQLhs_dU< SPACE_DIM, GAUSS, AssemblyDomainEleOp, IS_LARGE_STRAINS > OpHdivU
Integrate Lhs of flux term coupled to displacement field.
constexpr auto field_name
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMass
[Only used with Hooke equation (linear material model)]
Definition seepage.cpp:56
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 3, 3, 1 > OpHdivFlux
Integrating Rhs flux base (1/k) flux (FLUX)
Definition seepage.cpp:108
OpHdivFluxImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > vec, ScalarFun resistance_function, boost::shared_ptr< MatrixDouble > mat_Grad_Ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
OpHdivFluxImpl(const std::string field_name, boost::shared_ptr< MatrixDouble > vec, ScalarFun resistance_function, boost::shared_ptr< MatrixDouble > mat_Grad_Ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
Integrating Rhs flux base (1/k) flux (FLUX)
OpHdivHdivImpl(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)
OpHdivHdivImpl(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)
Integrate Lhs base of flux (1/k) base of flux (FLUX x FLUX)
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
constexpr bool IS_LARGE_STRAINS