G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsMaterialMatrixLinear.h
Go to the documentation of this file.
1
16#pragma once
17
20#include <gsIO/gsOptionList.h>
21
22namespace gismo
23{
24
25
35template < short_t dim,
36 class T >
38{
39public:
40
41 typedef T Scalar_t;
42
43 GISMO_OVERRIDE_CLONE_FUNCTION(gsMaterialMatrixLinear);
44
46
47 typedef typename Base::function_ptr function_ptr;
48
49 enum {Linear=1};
50
55
63 const gsFunctionSet<T> & thickness);
64
74 const gsFunctionSet<T> & thickness,
75 const gsFunctionSet<T> & YoungsModulus,
76 const gsFunctionSet<T> & PoissonRatio);
77
88 const gsFunctionSet<T> & thickness,
89 const gsFunctionSet<T> & YoungsModulus,
90 const gsFunctionSet<T> & PoissonRatio,
91 const gsFunctionSet<T> & Density);
92
93protected:
104 const gsFunctionSet<T> * thickness,
105 const gsFunctionSet<T> & YoungsModulus,
106 const gsFunctionSet<T> & PoissonRatio,
107 const gsFunctionSet<T> * Density);
108public:
117 const gsFunctionSet<T> & thickness,
118 const std::vector<gsFunctionSet<T> *> &pars);
119
129 const gsFunctionSet<T> & thickness,
130 const std::vector<gsFunctionSet<T> *> &pars,
131 const gsFunctionSet<T> & Density);
132
139 gsMaterialMatrixLinear( const gsFunctionSet<T> & thickness,
140 const std::vector<gsFunctionSet<T> *> &pars);
141
149 gsMaterialMatrixLinear( const gsFunctionSet<T> & thickness,
150 const std::vector<gsFunctionSet<T> *> &pars,
151 const gsFunctionSet<T> & Density);
152
153protected:
163 const gsFunctionSet<T> * thickness,
164 const std::vector<gsFunctionSet<T> *> &pars,
165 const gsFunctionSet<T> * Density);
166public:
167
169 inline enum MatIntegration isMatIntegrated() const override {return MatIntegration::Constant; }
170
172 inline enum MatIntegration isVecIntegrated() const override {return MatIntegration::Constant; }
173
175 void defaultOptions() override;
176
178 gsMatrix<T> eval3D_matrix (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
180
182 gsMatrix<T> eval3D_dmatrix(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
184
186 gsMatrix<T> eval3D_vector (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
188
190 gsMatrix<T> eval3D_CauchyVector (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
191
193 gsMatrix<T> eval3D_matrix_C(const gsMatrix<T> & Cmat, const index_t patch, const gsVector<T>& u, const T z, enum MaterialOutput out = MaterialOutput::Generic) const override;
195 gsMatrix<T> eval3D_vector_C(const gsMatrix<T> & Cmat, const index_t patch, const gsVector<T> & u, const T z, enum MaterialOutput out = MaterialOutput::Generic) const override;
196
198 gsMatrix<T> eval3D_pstress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
199
201 gsMatrix<T> eval3D_pstressDir(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
202
204 gsMatrix<T> eval3D_CauchyPStress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
205
207 gsMatrix<T> eval3D_stress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override;
209
211 virtual gsMatrix<T> eval3D_CauchyStress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override;
213
215 gsMatrix<T> eval3D_detF (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
216
218 void setYoungsModulus(const gsFunctionSet<T> & YoungsModulus) override { Base::setParameter(0,YoungsModulus); }
219
221 const function_ptr getYoungsModulus() const override { return Base::getParameter(0); }
222
224 void setPoissonsRatio(const gsFunctionSet<T> & PoissonsRatio) override { Base::setParameter(1,PoissonsRatio); }
225
227 const function_ptr getPoissonsRatio() const override { return Base::getParameter(1); }
228
230 std::ostream &print(std::ostream &os) const override;
231
232 gsMatrix<T> S(const gsMatrix<T> & strain) const override;
233
234 gsMatrix<T> C(const gsMatrix<T> & strain) const override;
235
237 gsMatrix<T> S(const gsMatrix<T> & C, const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const;
238
240 gsMatrix<T> C(const gsMatrix<T> & C, const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const;
241
243 gsMatrix<T> dC(const gsMatrix<T> & C, const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const;
244
245public:
247 typedef memory::shared_ptr< gsMaterialMatrixLinear > Ptr;
248
250 typedef memory::unique_ptr< gsMaterialMatrixLinear > uPtr;
251
252protected:
259 void _initialize();
260
261protected:
272 T _Cijkl (const index_t i, const index_t j, const index_t k, const index_t l) const;
273
288 T _Sij (const index_t i, const index_t j, const gsMatrix<T> & z) const;
289
290
291 using Base::_getMetric;
292
301 gsMatrix<T> _E (const T z, enum MaterialOutput out) const;
302
303protected:
304 // constructor
305 using Base::m_thickness;
306 using Base::m_pars;
307 using Base::m_density;
308
309 // Geometric data
310 using Base::m_data;
311
312 using Base::m_options;
313
314};
315
316#ifdef GISMO_WITH_PYBIND11
317
321 void pybind11_init_gsMaterialMatrixLinear2(pybind11::module &m);
322 void pybind11_init_gsMaterialMatrixLinear3(pybind11::module &m);
323
324#endif // GISMO_WITH_PYBIND11
325
326} // namespace
327
328
329#ifndef GISMO_BUILD_LIB
330#include GISMO_HPP_HEADER(gsMaterialMatrixLinear.hpp)
331#endif
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition gsFunctionSet.h:219
This class defines the base class for material matrices.
Definition gsMaterialMatrixBaseDim.h:37
void _getMetric(const index_t k, const T z) const
Gets metric quantities on the deformed and undeformed geometries.
Definition gsMaterialMatrixBaseDim.hpp:1021
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_dmatrix(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
Evaluates the derivative of the matrix on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:398
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
virtual const function_ptr getParameter(const index_t i) const
Gets parameter i.
Definition gsMaterialMatrixBase.h:730
virtual void setParameter(const index_t i, const function_ptr &par)
Sets the material parameters.
Definition gsMaterialMatrixBase.h:694
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
This class defines a linear material.
Definition gsMaterialMatrixLinear.h:38
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 gsMaterialMatrixLinear.hpp:306
gsMatrix< T > eval3D_matrix_C(const gsMatrix< T > &Cmat, const index_t patch, const gsVector< T > &u, const T z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:218
gsMatrix< T > S(const gsMatrix< T > &C, const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Computes the vector S as function of the deformation tensor C=FTF.
virtual 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 gsMaterialMatrixLinear.hpp:513
const function_ptr getPoissonsRatio() const override
Gets the Poisson's Ratio.
Definition gsMaterialMatrixLinear.h:227
enum MatIntegration isMatIntegrated() const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.h:169
void _initialize()
Initializes the object.
Definition gsMaterialMatrixLinear.hpp:171
void setYoungsModulus(const gsFunctionSet< T > &YoungsModulus) override
Sets the YoungsModulus.
Definition gsMaterialMatrixLinear.h:218
memory::shared_ptr< gsMaterialMatrixLinear > Ptr
Shared pointer for gsMaterialMatrixLinear.
Definition gsMaterialMatrixLinear.h:247
gsMatrix< T > dC(const gsMatrix< T > &C, const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Computes the derivative of the matrix C as function of the deformation tensor C=FTF.
T _Sij(const index_t i, const index_t j, const gsMatrix< T > &z) const
Computes the linear material matrix entry with indices i j k l.
Definition gsMaterialMatrixLinear.hpp:558
enum MatIntegration isVecIntegrated() const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.h:172
gsMatrix< T > eval3D_pstressDir(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:395
void defaultOptions() override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:164
gsMatrix< T > eval3D_detF(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:496
std::ostream & print(std::ostream &os) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:150
gsMatrix< T > C(const gsMatrix< T > &C, const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Computes the matrix C as function of the deformation tensor C=FTF.
gsMatrix< T > eval3D_CauchyVector(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:312
gsMatrix< T > _E(const T z, enum MaterialOutput out) const
Computes the strain tensor.
Definition gsMaterialMatrixLinear.hpp:593
memory::unique_ptr< gsMaterialMatrixLinear > uPtr
Unique pointer for gsMaterialMatrixLinear.
Definition gsMaterialMatrixLinear.h:250
gsMaterialMatrixLinear()
Empty constructor.
Definition gsMaterialMatrixLinear.hpp:30
const function_ptr getYoungsModulus() const override
Gets the YoungsModulus.
Definition gsMaterialMatrixLinear.h:221
void setPoissonsRatio(const gsFunctionSet< T > &PoissonsRatio) override
Sets the Poisson's Ratio.
Definition gsMaterialMatrixLinear.h:224
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 gsMaterialMatrixLinear.hpp:461
gsMatrix< T > eval3D_vector_C(const gsMatrix< T > &Cmat, const index_t patch, const gsVector< T > &u, const T z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:318
gsMatrix< T > eval3D_pstress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:362
gsMatrix< T > eval3D_dmatrix(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:255
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 gsMaterialMatrixLinear.hpp:178
gsMatrix< T > eval3D_CauchyPStress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixLinear.hpp:428
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
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.
Provides a list of labeled parameters/options that can be set and accessed easily.
The G+Smo namespace, containing all definitions for the library.