G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsMaterialMatrixBaseDim.h
Go to the documentation of this file.
1 
16 #pragma once
17 
18 #include <gsCore/gsFuncData.h>
19 #include <gsUtils/gsThreaded.h>
20 
21 namespace gismo
22 {
23 
24 template <short_t dim, class T>
25 class gsMaterialMatrixBaseDimData;
26 
34 template <short_t dim, class T>
36 {
37 
38 public:
39 
40  typedef T Scalar_t;
41 
43 
44  typedef typename Base::function_ptr function_ptr;
45 
46  // enum {Linear=0}; // If true (1), this property entails that S = C *˙E
47 
49  :
50  Base(nullptr,nullptr,nullptr,nullptr)
51  {
52  this->defaultOptions();
53  membersSetZero();
54  }
55 
57  :
58  Base(mp,nullptr,nullptr,nullptr)
59  {
60  GISMO_ASSERT(mp->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
61  this->defaultOptions();
62  membersSetZero();
63  }
64 
66  const gsFunctionSet<T> * mp_def)
67  :
68  Base(mp,mp_def,nullptr,nullptr)
69  {
70  GISMO_ASSERT(mp->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
71  GISMO_ASSERT(mp_def->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
72  this->defaultOptions();
73  membersSetZero();
74  }
75 
77  const gsFunctionSet<T> * thickness,
78  const gsFunctionSet<T> * Density)
79  :
80  Base(mp,nullptr,thickness,Density)
81  {
82  GISMO_ASSERT(mp->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
83  this->defaultOptions();
84  membersSetZero();
85  }
86 
88  const gsFunctionSet<T> * mp_def,
89  const gsFunctionSet<T> * thickness,
90  const gsFunctionSet<T> * Density)
91  :
92  Base(mp,mp_def,thickness,Density)
93  {
94  GISMO_ASSERT(mp->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
95  GISMO_ASSERT(mp_def->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
96  this->defaultOptions();
97  membersSetZero();
98  }
99 
102 
103 public:
105  virtual void defaultOptions() override;
106 
108  virtual void density_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override;
109 
111  virtual void thickness_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override;
112 
114  virtual void parameters_into(const index_t patch, const gsMatrix<T> & u, gsMatrix<T>& result) const override;
115 
117  virtual gsMatrix<T> eval3D_spec2cov(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
118 
120  virtual gsMatrix<T> eval3D_spec2con(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
121 
123  virtual gsMatrix<T> eval3D_cov2cart(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
124 
126  virtual gsMatrix<T> eval3D_con2cart(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
127 
129  virtual gsMatrix<T> eval3D_deformation(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
130 
132  virtual gsMatrix<T> eval3D_strain(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
133 
135  virtual gsMatrix<T> eval3D_tensionfield(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const override;
136 
138  virtual gsMatrix<T> eval3D_pstretch(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
139 
141  virtual gsMatrix<T> eval3D_pstretchDir(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
142 
144  virtual gsMatrix<T> eval3D_pstrain(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const override;
145 
146  virtual bool initialized() const override
147  {
148  return ((m_thickness != nullptr)); // && (m_patches!= nullptr) //HV: could be defined without geometry, then call "setUndeformed"
149  }
150 
151 public:
152 
153  void _computePoints(const index_t patch, const gsMatrix<T> & u) const;
154 
156  gsMatrix<T> _getAcov_def(index_t k, T z) const;
157 
159  gsMatrix<T> _getAcon_def(index_t k, T z) const;
160 
162  gsMatrix<T> _getBcov_def(index_t k, T z) const;
163 
165  gsMatrix<T> _getncov_def(index_t k, T z) const;
166 
168  gsMatrix<T> _getGcov_def(index_t k, T z) const;
169 
171  gsMatrix<T> _getGcon_def(index_t k, T z) const;
172 
174  gsMatrix<T> _getacov_def(index_t k, T z) const;
175 
177  gsMatrix<T> _getacon_def(index_t k, T z) const;
178 
180  gsMatrix<T> _getgcov_def(index_t k, T z) const;
181 
183  gsMatrix<T> _getgcon_def(index_t k, T z) const;
184 
186  gsMatrix<T> _getAcov_ori(index_t k, T z) const;
187 
189  gsMatrix<T> _getAcon_ori(index_t k, T z) const;
190 
192  gsMatrix<T> _getBcov_ori(index_t k, T z) const;
193 
195  gsMatrix<T> _getncov_ori(index_t k, T z) const;
196 
198  gsMatrix<T> _getGcov_ori(index_t k, T z) const;
199 
201  gsMatrix<T> _getGcon_ori(index_t k, T z) const;
202 
204  gsMatrix<T> _getacov_ori(index_t k, T z) const;
205 
207  gsMatrix<T> _getacon_ori(index_t k, T z) const;
208 
210  gsMatrix<T> _getgcov_ori(index_t k, T z) const;
211 
213  gsMatrix<T> _getgcon_ori(index_t k, T z) const;
214 
216  void _computeMetricDeformed(const index_t patch, const gsMatrix<T> & u) const;
217 
219  void _computeMetricUndeformed(const index_t patch, const gsMatrix<T> & u) const;
220 
222  void _getMetric(const index_t k, const T z) const;
223 
225  void _getMetric(index_t k, T z, const gsMatrix<T> & C) const;
226 
228  void _getMetricDeformed(const index_t k, const T z) const;
229 
230  void _getMetricDeformed(const gsMatrix<T> & C) const;
231 
233  void _getMetricUndeformed(const index_t k, const T z) const;
234 
236  std::pair<gsVector<T>,gsMatrix<T>> _evalStretch(const gsMatrix<T> & C, const gsMatrix<T> & gcon_ori ) const;
237 
239  std::pair<gsVector<T>,gsMatrix<T>> _evalPStrain(const gsMatrix<T> & C ) const;
240 
242  std::pair<gsVector<T>,gsMatrix<T>> _evalPStress(const gsMatrix<T> & S ) const;
243 
245  void _computeStretch(const gsMatrix<T> & C, const gsMatrix<T> & gcon_ori ) const;
246 
248  void _computePStrain(const gsMatrix<T> & C ) const;
249 
251  void _computePStress(const gsMatrix<T> & C ) const;
252 
253 
255  gsMatrix<T> _transformation(const gsMatrix<T> & basis1, const gsMatrix<T> & basis2 ) const;
256 
257  virtual void setUndeformed(const gsFunctionSet<T> * undeformed) override
258  {
259  GISMO_ASSERT(undeformed->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
260  function_ptr f_ptr = memory::make_shared_not_owned(undeformed);
261  Base::setUndeformed(f_ptr);
262  }
263 
264  virtual void setDeformed(const gsFunctionSet<T> * deformed) override
265  {
266  GISMO_ASSERT(deformed->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
267  function_ptr f_ptr = memory::make_shared_not_owned(deformed);
268  Base::setDeformed(f_ptr);
269  }
270 
271  virtual void setUndeformed(const function_ptr undeformed) override
272  {
273  GISMO_ASSERT(undeformed->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
274  Base::setUndeformed(undeformed);
275  }
276 
277  virtual void setDeformed(const function_ptr deformed) override
278  {
279  GISMO_ASSERT(deformed->targetDim()==dim,"Geometric dimension and the template dimension are not the same!");
280  Base::setDeformed(deformed);
281  }
282 
283 private:
284 
285  template <short_t _type>
286  typename std::enable_if<_type==0, index_t>::type _tensionField(const gsVector<T> &, const gsVector<T> & Ep) const;
287 
288  template <short_t _type>
289  typename std::enable_if<_type==1, index_t>::type _tensionField(const gsVector<T> &, const gsVector<T> & Ep) const;
290 
291  template <short_t _type>
292  typename std::enable_if<_type==2, index_t>::type _tensionField(const gsVector<T> &, const gsVector<T> & Ep) const;
293 
294  template <short_t _type>
295  typename std::enable_if<_type!=0 &&
296  _type!=1 &&
297  _type!=2, index_t>::type _tensionField(const gsVector<T> &, const gsVector<T> & Ep) const
299 
301  template<short_t _dim>
302  typename std::enable_if<_dim==2, void>::type _computeMetricDeformed_impl(const index_t patch, const gsMatrix<T> & u) const;
303 
305  template<short_t _dim>
306  typename std::enable_if<_dim==3, void>::type _computeMetricDeformed_impl(const index_t patch, const gsMatrix<T> & u) const;
307 
309  template<short_t _dim>
310  typename std::enable_if<_dim==2, void>::type _computeMetricUndeformed_impl(const index_t patch, const gsMatrix<T> & u) const;
311 
313  template<short_t _dim>
314  typename std::enable_if<_dim==3, void>::type _computeMetricUndeformed_impl(const index_t patch, const gsMatrix<T> & u) const;
315 
317  template<short_t _dim>
318  typename std::enable_if<_dim==2, void>::type _getMetric_impl(const index_t k, const T z) const;
319 
320  template<short_t _dim>
321  typename std::enable_if<_dim==3, void>::type _getMetric_impl(const index_t k, const T z) const;
322 
324  template<short_t _dim>
325  typename std::enable_if<_dim==2, void>::type _getMetricDeformed_impl(const index_t k, const T z) const;
326 
328  template<short_t _dim>
329  typename std::enable_if<_dim==3, void>::type _getMetricDeformed_impl(const index_t k, const T z) const;
330 
332  template<short_t _dim>
333  typename std::enable_if<_dim==2, void>::type _getMetricUndeformed_impl(const index_t k, const T z) const;
334 
336  template<short_t _dim>
337  typename std::enable_if<_dim==3, void>::type _getMetricUndeformed_impl(const index_t k, const T z) const;
338 
339  // -------------------------------------------------------------------------------------------------------------
340  // Separate getters
341  // -------------------------------------------------------------------------------------------------------------
342 
344  template<short_t _dim>
345  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getBcov_def_impl(index_t k, T z) const;
346 
348  template<short_t _dim>
349  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getBcov_def_impl(index_t k, T z) const;
350 
352  template<short_t _dim>
353  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getncov_def_impl(index_t k, T z) const;
354 
356  template<short_t _dim>
357  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getncov_def_impl(index_t k, T z) const;
358 
360  template<short_t _dim>
361  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getGcov_def_impl(index_t k, T z) const;
362 
364  template<short_t _dim>
365  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getGcov_def_impl(index_t k, T z) const;
366 
368  template<short_t _dim>
369  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getGcon_def_impl(index_t k, T z) const;
370 
372  template<short_t _dim>
373  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getGcon_def_impl(index_t k, T z) const;
374 
376  template<short_t _dim>
377  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getgcov_def_impl(index_t k, T z) const;
378 
380  template<short_t _dim>
381  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getgcov_def_impl(index_t k, T z) const;
382 
384  template<short_t _dim>
385  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getBcov_ori_impl(index_t k, T z) const;
386 
388  template<short_t _dim>
389  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getBcov_ori_impl(index_t k, T z) const;
390 
392  template<short_t _dim>
393  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getncov_ori_impl(index_t k, T z) const;
394 
396  template<short_t _dim>
397  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getncov_ori_impl(index_t k, T z) const;
398 
400  template<short_t _dim>
401  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getGcov_ori_impl(index_t k, T z) const;
402 
404  template<short_t _dim>
405  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getGcov_ori_impl(index_t k, T z) const;
406 
408  template<short_t _dim>
409  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getGcon_ori_impl(index_t k, T z) const;
410 
412  template<short_t _dim>
413  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getGcon_ori_impl(index_t k, T z) const;
414 
416  template<short_t _dim>
417  typename std::enable_if<_dim==2, gsMatrix<T>>::type _getgcov_ori_impl(index_t k, T z) const;
418 
420  template<short_t _dim>
421  typename std::enable_if<_dim==3, gsMatrix<T>>::type _getgcov_ori_impl(index_t k, T z) const;
422 
423 
424 protected:
425 
426  void membersSetZero()
427  {
428  m_data.mine().membersSetZero();
429  }
430 
431  using Base::m_patches;
432  using Base::m_defpatches;
433 
434  using Base::m_options;
435 
436  using Base::m_pars;
437  using Base::m_thickness;
438  using Base::m_density;
439 
440  // Geometric data point
441  mutable util::gsThreaded< gsMaterialMatrixBaseDimData<dim,T> > m_data;
442 public:
443 
444 # define Eigen gsEigen
445  EIGEN_MAKE_ALIGNED_OPERATOR_NEW //must be present whenever the class contains fixed size matrices
446 # undef Eigen
447 };
448 
449 template<short_t dim, class T>
450 class gsMaterialMatrixBaseDimData
451 {
452 public:
453 
454  void membersSetZero()
455  {
456  m_Acov_ori.setZero(); m_Acon_ori.setZero(); m_Acov_def.setZero(); m_Acon_def.setZero(); m_Bcov_ori.setZero(); m_Bcon_ori.setZero(); m_Bcov_def.setZero(); m_Bcon_def.setZero();
457  m_acov_ori.setZero(); m_acon_ori.setZero(); m_acov_def.setZero(); m_acon_def.setZero();
458  m_ncov_ori.setZero(); m_ncov_def.setZero();
459  m_Gcov_ori.setZero(); m_Gcon_ori.setZero(); m_Gcov_def.setZero(); m_Gcon_def.setZero(); m_Gcov_ori_L.setZero(); m_Gcov_def_L.setZero();
460  m_gcov_ori.setZero(); m_gcov_def.setZero();m_gcon_ori.setZero(); m_gcon_def.setZero();
461  m_Acov_ori_mat.setZero(); m_Acon_ori_mat.setZero(); m_Acov_def_mat.setZero(); m_Acon_def_mat.setZero(); m_Bcov_ori_mat.setZero(); m_Bcov_def_mat.setZero();
462  m_acov_ori_mat.setZero(); m_acon_ori_mat.setZero(); m_acov_def_mat.setZero(); m_acon_def_mat.setZero(); m_ncov_ori_mat.setZero(); m_ncov_def_mat.setZero(); m_normal_ori_mat.setZero(); m_normal_def_mat.setZero();
463 
464  }
465  // Material parameters and kinematics
466  mutable gsMatrix<T> m_parmat;
467  mutable gsVector<T> m_parvals;
468  mutable gsMatrix<T> m_Tmat,m_rhomat;
469 
470  mutable gsMatrix<T> m_Acov_ori, m_Acon_ori, m_Acov_def, m_Acon_def, m_Bcov_ori, m_Bcon_ori, m_Bcov_def, m_Bcon_def;
471  mutable gsMatrix<T> m_acov_ori, m_acon_ori, m_acov_def, m_acon_def;
472  mutable gsMatrix<T> m_ncov_ori, m_ncov_def;
473  mutable gsMatrix<T> m_Gcov_ori, m_Gcon_ori, m_Gcov_def, m_Gcon_def, m_Gcov_ori_L, m_Gcov_def_L;
474  mutable gsMatrix<T> m_gcov_ori, m_gcov_def,m_gcon_ori, m_gcon_def;
475  mutable gsMatrix<T> m_Acov_ori_mat, m_Acon_ori_mat, m_Acov_def_mat, m_Acon_def_mat, m_Bcov_ori_mat, m_Bcov_def_mat;
476  mutable gsMatrix<T> m_acov_ori_mat, m_acon_ori_mat, m_acov_def_mat, m_acon_def_mat, m_ncov_ori_mat, m_ncov_def_mat, m_normal_ori_mat, m_normal_def_mat;
477 
478  mutable gsMatrix<T> m_stretches, m_stretchvec, m_pstress, m_pstressvec, m_pstrain, m_pstrainvec;
479 
480  mutable T m_J0_sq, m_J_sq;
481 
482  mutable gsVector<T> m_thetas, m_gammas;
483 
484 # define Eigen gsEigen
485  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
486 # undef Eigen //must be present whenever the class contains fixed size matrices
487 };
488 
489 #ifdef GISMO_WITH_PYBIND11
490 
494  void pybind11_init_gsMaterialMatrixBaseDim2(pybind11::module &m);
495  void pybind11_init_gsMaterialMatrixBaseDim3(pybind11::module &m);
496 
497 #endif // GISMO_WITH_PYBIND11
498 
499 } // namespace
500 
501 #ifndef GISMO_BUILD_LIB
502 #include GISMO_HPP_HEADER(gsMaterialMatrixBaseDim.hpp)
503 #endif
gsMatrix< T > _getAcon_def(index_t k, T z) const
Returns the contravariant a tensor on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:658
MaterialOutput
This class describes the output type.
Definition: gsMaterialMatrixUtils.h:98
std::enable_if< _dim==2, gsMatrix< T > >::type _getgcov_ori_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:969
gsMatrix< T > _getBcov_ori(index_t k, T z) const
Returns the covariant b tensor on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:739
virtual gsMatrix< T > eval3D_pstretchDir(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:222
shared_ptr< T > make_shared_not_owned(const T *x)
Creates a shared pointer which does not eventually delete the underlying raw pointer. Usefull to refer to objects which should not be destroyed.
Definition: gsMemory.h:189
virtual void defaultOptions() override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:38
void _computeMetricDeformed(const index_t patch, const gsMatrix< T > &u) const
Computes metric quantities on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:417
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
std::pair< gsVector< T >, gsMatrix< T > > _evalStretch(const gsMatrix< T > &C, const gsMatrix< T > &gcon_ori) const
Computes the stretch given deformation tensor C, into a pair.
Definition: gsMaterialMatrixBaseDim.hpp:1331
gsMatrix< T > _getgcon_def(index_t k, T z) const
Returns the contravariant basis vector g on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:710
std::enable_if< _dim==2, gsMatrix< T > >::type _getGcov_def_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:837
gsMatrix< T > _getBcov_def(index_t k, T z) const
Returns the covariant b tensor on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:665
virtual gsMatrix< T > eval3D_pstretch(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:200
gsMatrix< T > _getAcon_ori(index_t k, T z) const
Returns the contravariant a tensor on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:732
virtual gsMatrix< T > eval3D_pstrain(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:244
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
gsMatrix< T > _getacon_def(index_t k, T z) const
Returns the contravariant basis vector a on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:697
gsMatrix< T > _getncov_def(index_t k, T z) const
Returns the covariant n tensor on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:671
virtual gsMatrix< T > eval3D_con2cart(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:137
gsMatrix< T > _getGcon_def(index_t k, T z) const
Returns the contravariant metric tensor on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:683
std::enable_if< _dim==2, gsMatrix< T > >::type _getGcon_ori_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
virtual gsMatrix< T > eval3D_spec2cov(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:72
gsMatrix< T > _getacon_ori(index_t k, T z) const
Returns the contravariant basis vector a on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:771
std::pair< gsVector< T >, gsMatrix< T > > _evalPStress(const gsMatrix< T > &S) const
Computes the principal stress given stress tensor S, into a pair.
Definition: gsMaterialMatrixBaseDim.hpp:1384
gsMatrix< T > _getGcov_ori(index_t k, T z) const
Returns the covariant metric tensor on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:751
std::enable_if< _dim==2, gsMatrix< T > >::type _getBcov_def_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:803
virtual void density_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:44
virtual gsMatrix< T > eval3D_cov2cart(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:116
#define index_t
Definition: gsConfig.h:32
std::enable_if< _dim==2, void >::type _computeMetricUndeformed_impl(const index_t patch, const gsMatrix< T > &u) const
Implementation of _getMetric for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:606
virtual void parameters_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:157
void _computePStrain(const gsMatrix< T > &C) const
Computes the stretch given deformation tensor C, into class members m_stretches and m_stretchDirs...
Definition: gsMaterialMatrixBaseDim.hpp:1492
gsMatrix< T > _getacov_def(index_t k, T z) const
Returns the covariant basis vector a on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:690
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
std::enable_if< _dim==2, gsMatrix< T > >::type _getGcon_def_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
This class defines the base class for material matrices.
Definition: gsMaterialMatrixBase.h:32
gsMatrix< T > _getgcov_def(index_t k, T z) const
Returns the covariant basis vector g on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:704
virtual short_t targetDim() const
Dimension of the target space.
Definition: gsFunctionSet.h:560
std::pair< gsVector< T >, gsMatrix< T > > _evalPStrain(const gsMatrix< T > &C) const
Computes the principal strain given deformation tensor C, into a pair.
Definition: gsMaterialMatrixBaseDim.hpp:1428
virtual void thickness_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:61
void _getMetricDeformed(const index_t k, const T z) const
Gets metric quantities on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:1073
std::enable_if< _dim==2, void >::type _computeMetricDeformed_impl(const index_t patch, const gsMatrix< T > &u) const
Implementation of _computeMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:488
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
gsMatrix< T > _getGcon_ori(index_t k, T z) const
Returns the contravariant metric tensor on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:757
void _getMetricUndeformed(const index_t k, const T z) const
Gets metric quantities on the undeformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:1202
void _computeMetricUndeformed(const index_t patch, const gsMatrix< T > &u) const
Computes metric quantities on the undeformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:535
std::enable_if< _dim==2, void >::type _getMetricDeformed_impl(const index_t k, const T z) const
Implementation of _getMetricDeformed for surface geometries.
Definition: gsMaterialMatrixBaseDim.hpp:1141
Wrapper for thread-local data members.
std::enable_if< _dim==2, gsMatrix< T > >::type _getBcov_ori_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:901
std::enable_if< _dim==2, gsMatrix< T > >::type _getncov_def_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:820
std::enable_if< _dim==2, gsMatrix< T > >::type _getgcov_def_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:871
gsMatrix< T > _getAcov_ori(index_t k, T z) const
Returns the covariant a tensor on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:725
void _computePStress(const gsMatrix< T > &C) const
Computes the principal stresses of a given stress tensor S, into class members m_pstress and m_pstres...
Definition: gsMaterialMatrixBaseDim.hpp:1484
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
This class defines the base class for material matrices.
Definition: gsMaterialMatrixBaseDim.h:35
gsMatrix< T > _transformation(const gsMatrix< T > &basis1, const gsMatrix< T > &basis2) const
Computes the stretch given deformation tensor C, into class members m_stretches and m_stretchDirs...
Definition: gsMaterialMatrixBaseDim.hpp:1502
void _computeStretch(const gsMatrix< T > &C, const gsMatrix< T > &gcon_ori) const
Computes the stretch given deformation tensor C, into class members m_stretches and m_stretchDirs...
Definition: gsMaterialMatrixBaseDim.hpp:1476
gsMatrix< T > _getgcov_ori(index_t k, T z) const
Returns the covariant basis vector g on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:778
gsMatrix< T > _getGcov_def(index_t k, T z) const
Returns the covariant metric tensor on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:677
virtual gsMatrix< T > eval3D_spec2con(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:94
std::enable_if< _dim==2, gsMatrix< T > >::type _getncov_ori_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:918
gsMatrix< T > _getacov_ori(index_t k, T z) const
Returns the covariant basis vector a on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:764
std::enable_if< _dim==2, void >::type _getMetricUndeformed_impl(const index_t k, const T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:1272
gsMatrix< T > _getAcov_def(index_t k, T z) const
Returns the covariant a tensor on the deformed geometry.
Definition: gsMaterialMatrixBaseDim.hpp:651
This object is a cache for computed values from an evaluator.
virtual ~gsMaterialMatrixBaseDim()
Destructor.
Definition: gsMaterialMatrixBaseDim.h:101
std::enable_if< _dim==2, gsMatrix< T > >::type _getGcov_ori_impl(index_t k, T z) const
Implementation of _getMetricUndeformed for planar geometries.
Definition: gsMaterialMatrixBaseDim.hpp:935
virtual gsMatrix< T > eval3D_deformation(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBaseDim.hpp:176
std::enable_if< _dim==2, void >::type _getMetric_impl(const index_t k, const T z) const
Implementation of _getMetricDeformed for planar geometries.
gsMatrix< T > _getgcon_ori(index_t k, T z) const
Returns the contravariant basis vector g on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:784
gsMatrix< T > _getncov_ori(index_t k, T z) const
Returns the covariant n tensor on the original geometry.
Definition: gsMaterialMatrixBaseDim.hpp:745
void _getMetric(const index_t k, const T z) const
Gets metric quantities on the deformed and undeformed geometries.
Definition: gsMaterialMatrixBaseDim.hpp:1021