G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsMaterialMatrixLinear.h
Go to the documentation of this file.
1 
16 #pragma once
17 
21 #include <gsIO/gsOptionList.h>
22 #include <gsCore/gsFuncData.h>
23 
24 namespace gismo
25 {
26 
27 
37 template < short_t dim,
38  class T >
40 {
41 public:
42 
43  typedef T Scalar_t;
44 
45  GISMO_OVERRIDE_CLONE_FUNCTION(gsMaterialMatrixLinear)
46 
48 
49  typedef typename Base::function_ptr function_ptr;
50 
51  enum {Linear=1};
52 
57 
65  const gsFunctionSet<T> & thickness);
66 
76  const gsFunctionSet<T> & thickness,
77  const gsFunctionSet<T> & YoungsModulus,
78  const gsFunctionSet<T> & PoissonRatio);
79 
90  const gsFunctionSet<T> & thickness,
91  const gsFunctionSet<T> & YoungsModulus,
92  const gsFunctionSet<T> & PoissonRatio,
93  const gsFunctionSet<T> & Density);
94 
95 protected:
106  const gsFunctionSet<T> * thickness,
107  const gsFunctionSet<T> & YoungsModulus,
108  const gsFunctionSet<T> & PoissonRatio,
109  const gsFunctionSet<T> * Density);
110 public:
119  const gsFunctionSet<T> & thickness,
120  const std::vector<gsFunctionSet<T> *> &pars);
121 
131  const gsFunctionSet<T> & thickness,
132  const std::vector<gsFunctionSet<T> *> &pars,
133  const gsFunctionSet<T> & Density);
134 
141  gsMaterialMatrixLinear( const gsFunctionSet<T> & thickness,
142  const std::vector<gsFunctionSet<T> *> &pars);
143 
151  gsMaterialMatrixLinear( const gsFunctionSet<T> & thickness,
152  const std::vector<gsFunctionSet<T> *> &pars,
153  const gsFunctionSet<T> & Density);
154 
155 protected:
165  const gsFunctionSet<T> * thickness,
166  const std::vector<gsFunctionSet<T> *> &pars,
167  const gsFunctionSet<T> * Density);
168 public:
169 
171 
173  inline enum MatIntegration isMatIntegrated() const override {return MatIntegration::Constant; }
174 
176  inline enum MatIntegration isVecIntegrated() const override {return MatIntegration::Constant; }
177 
179  void defaultOptions() override;
180 
182  gsMatrix<T> eval3D_matrix (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
183 
185  gsMatrix<T> eval3D_dmatrix(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
186 
188  gsMatrix<T> eval3D_vector (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
189 
191  gsMatrix<T> eval3D_CauchyVector (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
192 
194  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;
196  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;
197 
199  gsMatrix<T> eval3D_pstress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
200 
202  gsMatrix<T> eval3D_pstressDir(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
203 
205  gsMatrix<T> eval3D_CauchyPStress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
206 
208  gsMatrix<T> eval3D_stress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override;
209 
211  gsMatrix<T> eval3D_CauchyStress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override;
212 
214  gsMatrix<T> eval3D_detF (const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
215 
217  void setYoungsModulus(const gsFunctionSet<T> & YoungsModulus) override { Base::setParameter(0,YoungsModulus); }
218 
220  const function_ptr getYoungsModulus() const override { return Base::getParameter(0); }
221 
223  void setPoissonsRatio(const gsFunctionSet<T> & PoissonsRatio) override { Base::setParameter(1,PoissonsRatio); }
224 
226  const function_ptr getPoissonsRatio() const override { return Base::getParameter(1); }
227 
229  std::ostream &print(std::ostream &os) const override;
230 
231  gsMatrix<T> S(const gsMatrix<T> & strain) const override;
232 
233  gsMatrix<T> C(const gsMatrix<T> & strain) const override;
234 
236  gsMatrix<T> S(const gsMatrix<T> & C, const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const;
237 
239  gsMatrix<T> C(const gsMatrix<T> & C, const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const;
240 
242  gsMatrix<T> dC(const gsMatrix<T> & C, const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const;
243 
244 public:
246  typedef memory::shared_ptr< gsMaterialMatrixLinear > Ptr;
247 
249  typedef memory::unique_ptr< gsMaterialMatrixLinear > uPtr;
250 
251 protected:
258  void _initialize();
259 
260 protected:
271  T _Cijkl (const index_t i, const index_t j, const index_t k, const index_t l) const;
272 
287  T _Sij (const index_t i, const index_t j, const gsMatrix<T> & z) const;
288 
289 
290  using Base::_getMetric;
291 
300  gsMatrix<T> _E (const T z, enum MaterialOutput out) const;
301 
302 protected:
303  // constructor
304  using Base::m_thickness;
305  using Base::m_pars;
306  using Base::m_density;
307 
308  // Geometric data
309  using Base::m_data;
310 
311  using Base::m_options;
312 
313 };
314 
315 #ifdef GISMO_WITH_PYBIND11
316 
320  void pybind11_init_gsMaterialMatrixLinear2(pybind11::module &m);
321  void pybind11_init_gsMaterialMatrixLinear3(pybind11::module &m);
322 
323 #endif // GISMO_WITH_PYBIND11
324 
325 } // namespace
326 
327 
328 #ifndef GISMO_BUILD_LIB
329 #include GISMO_HPP_HEADER(gsMaterialMatrixLinear.hpp)
330 #endif
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:190
MaterialOutput
This class describes the output type.
Definition: gsMaterialMatrixUtils.h:98
gsMaterialMatrixLinear()
Empty constructor.
Definition: gsMaterialMatrixLinear.hpp:36
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:473
#define short_t
Definition: gsConfig.h:35
gsMatrix< T > _E(const T z, enum MaterialOutput out) const
Computes the strain tensor.
Definition: gsMaterialMatrixLinear.hpp:605
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:318
#define index_t
Definition: gsConfig.h:32
void setPoissonsRatio(const gsFunctionSet< T > &PoissonsRatio) override
Sets the Poisson&#39;s Ratio.
Definition: gsMaterialMatrixLinear.h:223
std::ostream & print(std::ostream &os) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixLinear.hpp:162
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:324
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:508
Base class with dimension in template; used for metric computations.
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:374
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:570
Provides a list of labeled parameters/options that can be set and accessed easily.
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:525
This class defines a linear material.
Definition: gsMaterialMatrixLinear.h:39
enum MatIntegration isVecIntegrated() const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixLinear.h:176
virtual void setParameter(const index_t i, const function_ptr &par)
Sets the material parameters.
Definition: gsMaterialMatrixBase.h:694
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:407
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
const function_ptr getYoungsModulus() const override
Gets the YoungsModulus.
Definition: gsMaterialMatrixLinear.h:220
Provides material matrix utilities.
memory::shared_ptr< gsMaterialMatrixLinear > Ptr
Shared pointer for gsMaterialMatrixLinear.
Definition: gsMaterialMatrixLinear.h:246
This class defines the base class for material matrices.
Definition: gsMaterialMatrixBaseDim.h:35
void defaultOptions() override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixLinear.hpp:176
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.
virtual const function_ptr getParameter(const index_t i) const
Gets parameter i.
Definition: gsMaterialMatrixBase.h:730
Provides a base class for material matrices.
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:440
void _initialize()
Initializes the object.
Definition: gsMaterialMatrixLinear.hpp:183
memory::unique_ptr< gsMaterialMatrixLinear > uPtr
Unique pointer for gsMaterialMatrixLinear.
Definition: gsMaterialMatrixLinear.h:249
void setYoungsModulus(const gsFunctionSet< T > &YoungsModulus) override
Sets the YoungsModulus.
Definition: gsMaterialMatrixLinear.h:217
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:267
const function_ptr getPoissonsRatio() const override
Gets the Poisson&#39;s Ratio.
Definition: gsMaterialMatrixLinear.h:226
This object is a cache for computed values from an evaluator.
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:330
MatIntegration
This class describes if an object is integrated through-thickness or not.
Definition: gsMaterialMatrixUtils.h:35
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:230
void _getMetric(const index_t k, const T z) const
Gets metric quantities on the deformed and undeformed geometries.
Definition: gsMaterialMatrixBaseDim.hpp:1021
enum MatIntegration isMatIntegrated() const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixLinear.h:173