G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsMaterialMatrixTFT.h
Go to the documentation of this file.
1
16#pragma once
17
20
21namespace gismo
22{
23
24
34template < short_t dim,
35 class T,
36 bool linear=false
37 >
39{
40public:
42 typedef memory::shared_ptr< gsMaterialMatrixTFT > Ptr;
43
45 typedef memory::unique_ptr< gsMaterialMatrixTFT > uPtr;
46
49
52
55
56 // Define clone functions
57 GISMO_OVERRIDE_CLONE_FUNCTION(gsMaterialMatrixTFT)
58
59public:
60
61 // /**
62 // * @brief Constructs a TFT material matrix using a reference to another material matrix
63 // *
64 // * @param materialMatrix The original material matrix
65 // */
66 // gsMaterialMatrixTFT(typename gsMaterialMatrixBase<T>::uPtr materialMatrix)
67 // :
68 // gsMaterialMatrixTFT(memory::make_shared(materialMatrix->clone().release()))
69 // {}
70
77 :
78 gsMaterialMatrixTFT(memory::make_shared_not_owned(materialMatrix))
79 {}
80
87 :
88 gsMaterialMatrixTFT(memory::make_shared(materialMatrix.clone().release()))
89 {}
90
96 gsMaterialMatrixTFT(const material_ptr & materialMatrix)
97 :
98 m_materialMat(give(materialMatrix))
99 {
100 if (materialMatrix.get()->hasUndeformed())
101 this->setUndeformed(materialMatrix.get()->getUndeformed());
102 if (materialMatrix.get()->hasDeformed())
103 this->setDeformed(materialMatrix.get()->getDeformed());
104
105 this->setThickness(materialMatrix.get()->getThickness());
106
107 m_options.addReal("SlackMultiplier","Multiplies the original value of the matrix for the slack state",0);
108 m_options.addSwitch("Explicit","Explicit iterations; use tension field from a fixed deformed geometry that does not change when calling setDeformed",false);
109 }
110
113 inline enum MatIntegration isMatIntegrated() const override
114 // {return m_materialMat->isMatIntegrated(); gsWarn<<"Change this to a constant one, like for linear. So that no things out of the mid-plane are needed"; }
115 {return MatIntegration::Linear;} // Multiplies with z t or its moment
116
119 inline enum MatIntegration isVecIntegrated() const override
120 // {return m_materialMat->isVecIntegrated(); gsWarn<<"Change this to a constant one, like for linear. So that no things out of the mid-plane are needed"; }
121 {return MatIntegration::Linear;} // Multiplies with z t or its moment
122
123 // bool isLinear() { return isLinear_impl(); }
124 // typename util::enable_if<U::Linear,bool>::type
125 // eval_impl(const U & u, const index_t k)
126 // { return m_materialMat; }
127
129 void density_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override
130 { m_materialMat->density_into( patch,u,result ); }
131
133 void thickness_into(const index_t patch, const gsMatrix<T> & u, gsMatrix<T>& result) const override
134 { m_materialMat->thickness_into( patch,u,result ); }
135
137 gsMatrix<T> eval3D_matrix(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
139
141 gsMatrix<T> eval3D_vector(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
143
153 gsMatrix<T> eval3D_pstress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
154
156 gsMatrix<T> eval3D_pstrain(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z) const override;
157
159 gsMatrix<T> eval3D_strain(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
161
163 gsMatrix<T> eval3D_stress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override;
165
167 gsMatrix<T> eval3D_CauchyStress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override;
169
171 gsMatrix<T> eval3D_CauchyPStress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override
172 {return m_materialMat->eval3D_CauchyPStress(patch,u,z,out);}
173
175 gsMatrix<T> eval3D_tensionfield(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
177
179 gsMatrix<T> eval3D_theta(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
180 using Base::eval3D_theta;
181
183 gsMatrix<T> eval3D_gamma(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
184 using Base::eval3D_gamma;
185
187 gsMatrix<T> eval3D_pstretch(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z) const override
188 { return m_materialMat->eval3D_pstretch( patch,u,z ); }
189
191 gsMatrix<T> eval3D_pstretchDir(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z) const override
192 { return m_materialMat->eval3D_pstretchDir( patch,u,z ); }
193
195 void setParameters(const std::vector<gsFunctionSet<T>*> &pars) override
196 { m_materialMat->setParameters(pars); }
198
200 void info() const override
201 { m_materialMat->info(); }
202
204 void setUndeformed(function_ptr undeformed) override
205 {
206 Base::setUndeformed(undeformed);
207 m_materialMat->setUndeformed(m_patches);
208 }
209
211 void setDeformed(function_ptr deformed) override
212 {
213 Base::setDeformed(deformed);
214 m_materialMat->setDeformed(m_defpatches);
215 }
216
218 void setUndeformed(const gsFunctionSet<T> * undeformed) override
219 {
220 Base::setUndeformed(undeformed);
221 m_materialMat->setUndeformed(m_patches);
222 }
223
225 void setDeformed(const gsFunctionSet<T> * deformed) override
226 {
227 Base::setDeformed(deformed);
228 m_materialMat->setDeformed(m_defpatches);
229 }
230
232 void updateDeformed(const gsFunctionSet<T> * deformed)
233 {
235 m_defpatches0 = fun;
236 }
237
239 void updateDeformed(const function_ptr & deformed)
240 {
241 m_defpatches0 = deformed;
242 }
243
245 gsMatrix<T> eval_theta(const gsMatrix<T> & Cs, const gsMatrix<T> & Ns, const gsMatrix<T> & Es) const;
246
248 std::ostream &print(std::ostream &os) const override;
249
251 const gsMaterialMatrixBase<T> * material() const override { return m_materialMat.get(); }
252
254 gsMaterialMatrixBase<T> * material() override { return m_materialMat.get(); }
255
256protected:
257 template <bool _linear>
258 typename std::enable_if< _linear, gsMatrix<T> >::type _eval3D_matrix_impl(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const;
259
260 template <bool _linear>
261 typename std::enable_if<!_linear, gsMatrix<T> >::type _eval3D_matrix_impl(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const;
262
263 gsMatrix<T> _compute_TF(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const;
264 gsMatrix<T> _compute_TF(const index_t patch, const gsVector<T> & u, const T & z) const;
265
266 gsMatrix<T> _compute_E(const T theta, const gsMatrix<T> & C, const gsMatrix<T> & S, const gsMatrix<T> & E) const;
267
268 gsMatrix<T> _compute_S(const T theta, const gsMatrix<T> & C, const gsMatrix<T> & S) const;
269
270 gsMatrix<T> _compute_C(const T theta, const gsMatrix<T> & C, const gsMatrix<T> & S) const;
271
272 gsMatrix<T> _compute_C(const T theta, const gsMatrix<T> & C, const gsMatrix<T> & S, const gsMatrix<T> & dC) const;
273
274
275 T _compute_gamma(const T & theta, const gsMatrix<T> & C, const gsVector<T> & N, const gsVector<T> & E) const;
276 gsVector<T> _theta_interval(const gsMatrix<T> & C, const gsVector<T> & N, const gsVector<T> & E) const;
277 bool _check_theta_full(const T & theta, const gsMatrix<T> & C, const gsVector<T> & N, const gsVector<T> & E) const;
278 bool _check_theta_gamma(const T & theta, const gsMatrix<T> & C, const gsVector<T> & N, const gsVector<T> & E) const;
279
280protected:
281
282 mutable material_ptr m_materialMat;
283 using Base::m_patches;
284 using Base::m_defpatches;
285 function_ptr m_defpatches0;
286 using Base::m_options;
287
288 using Base::m_data;
289
290};
291
292} // namespace
293
294
295#ifndef GISMO_BUILD_LIB
296#include GISMO_HPP_HEADER(gsMaterialMatrixTFT.hpp)
297#endif
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition gsFunctionSet.h:219
memory::shared_ptr< gsFunctionSet > Ptr
Shared pointer for gsFunctionSet.
Definition gsFunctionSet.h:223
This class defines the base class for material matrices.
Definition gsMaterialMatrixBaseDim.h:37
virtual gsMatrix< T > eval3D_strain(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixBaseDim.hpp:271
virtual gsMatrix< T > eval3D_tensionfield(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixBaseDim.hpp:296
This class defines the base class for material matrices.
Definition gsMaterialMatrixBase.h:33
virtual gsMatrix< T > eval3D_CauchyStress(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
{ function_description }
Definition gsMaterialMatrixBase.h:581
virtual gsMatrix< T > eval3D_stress(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
{ function_description }
Definition gsMaterialMatrixBase.h:549
virtual gsMatrix< T > eval3D_matrix(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
Evaluates the matrix on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:367
memory::shared_ptr< gsMaterialMatrixBase > Ptr
Shared pointer for gsGeometry.
Definition gsMaterialMatrixBase.h:41
virtual void setThickness(const function_ptr &thickness)
Sets the thickness.
Definition gsMaterialMatrixBase.h:650
virtual gsMatrix< T > eval3D_vector(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
Evaluates the vector on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:422
virtual void setParameters(const std::vector< function_ptr > &pars)
Sets the material parameters.
Definition gsMaterialMatrixBase.h:684
This class defines a linear material.
Definition gsMaterialMatrixTFT.h:39
gsMatrix< T > eval3D_vector(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:55
gsMatrix< T > eval3D_strain(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:117
gsMatrix< T > eval3D_CauchyPStress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:171
gsMatrix< T > eval3D_CauchyStress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:199
void updateDeformed(const gsFunctionSet< T > *deformed)
Updates the reference to the deformed patches used for TFT (explicit only)
Definition gsMaterialMatrixTFT.h:232
const gsMaterialMatrixBase< T > * material() const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:251
void info() const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:200
enum MatIntegration isMatIntegrated() const override
Definition gsMaterialMatrixTFT.h:113
void updateDeformed(const function_ptr &deformed)
Updates the reference to the deformed patches used for TFT (explicit only)
Definition gsMaterialMatrixTFT.h:239
memory::shared_ptr< gsMaterialMatrixTFT > Ptr
Shared pointer for gsMaterialMatrixTFT.
Definition gsMaterialMatrixTFT.h:42
gsMatrix< T > eval3D_gamma(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:336
gsMaterialMatrixTFT(const material_ptr &materialMatrix)
Constructs a TFT material matrix using a reference to another material matrix.
Definition gsMaterialMatrixTFT.h:96
void density_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:129
gsMatrix< T > eval3D_pstretch(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:187
gsMatrix< T > eval3D_pstrain(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:89
enum MatIntegration isVecIntegrated() const override
Definition gsMaterialMatrixTFT.h:119
std::ostream & print(std::ostream &os) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:29
gsFunctionSet< T >::Ptr function_ptr
Shared pointer to a gsFunctionSet.
Definition gsMaterialMatrixTFT.h:54
gsMatrix< T > eval3D_pstretchDir(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:191
void setParameters(const std::vector< gsFunctionSet< T > * > &pars) override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:195
gsMatrix< T > eval3D_theta(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:304
void setUndeformed(const gsFunctionSet< T > *undeformed) override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:218
gsMaterialMatrixBase< T > * material() override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:254
void setDeformed(const gsFunctionSet< T > *deformed) override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:225
gsMatrix< T > eval3D_tensionfield(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:298
gsMaterialMatrixBase< T >::Ptr material_ptr
Shared pointer to a gsMaterialMatrixBase.
Definition gsMaterialMatrixTFT.h:48
void setUndeformed(function_ptr undeformed) override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:204
void thickness_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:133
void setDeformed(function_ptr deformed) override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.h:211
gsMatrix< T > eval_theta(const gsMatrix< T > &Cs, const gsMatrix< T > &Ns, const gsMatrix< T > &Es) const
Computes theta.
Definition gsMaterialMatrixTFT.hpp:455
std::enable_if< _linear, gsMatrix< T > >::type _eval3D_matrix_impl(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const
Provides an implementation of eval3D_matrix for gsMaterialMatrixLinear.
Definition gsMaterialMatrixTFT.hpp:371
gsMatrix< T > eval3D_stress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:155
memory::unique_ptr< gsMaterialMatrixTFT > uPtr
Unique pointer for gsMaterialMatrixTFT.
Definition gsMaterialMatrixTFT.h:45
gsMatrix< T > eval3D_pstress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
Definition gsMaterialMatrixTFT.hpp:61
gsMaterialMatrixTFT(gsMaterialMatrixBase< T > *materialMatrix)
Constructs a TFT material matrix using a reference to another material matrix.
Definition gsMaterialMatrixTFT.h:76
gsMaterialMatrixTFT(gsMaterialMatrixBase< T > &materialMatrix)
Constructs a TFT material matrix using a reference to another material matrix.
Definition gsMaterialMatrixTFT.h:86
gsMatrix< T > eval3D_matrix(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixTFT.hpp:42
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
void addReal(const std::string &label, const std::string &desc, const Real &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:211
void addSwitch(const std::string &label, const std::string &desc, const bool &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:235
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
MaterialOutput
This class describes the output type.
Definition gsMaterialMatrixUtils.h:99
MatIntegration
This class describes if an object is integrated through-thickness or not.
Definition gsMaterialMatrixUtils.h:36
#define short_t
Definition gsConfig.h:35
#define index_t
Definition gsConfig.h:32
Base class with dimension in template; used for metric computations.
Provides material matrix utilities.
shared_ptr< T > make_shared_not_owned(const T *x)
Creates a shared pointer which does not eventually delete the underlying raw pointer....
Definition gsMemory.h:189
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266