G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsMaterialMatrixComposite.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 
36 template < short_t dim,
37  class T
38  >
40 {
41 public:
42 
43  GISMO_OVERRIDE_CLONE_FUNCTION(gsMaterialMatrixComposite)
44 
46 
47  typedef typename Base::function_ptr function_ptr;
48 
57 
59  const gsFunctionSet<T> & mp,
60  const std::vector< gsFunctionSet<T> *> & thickness,
61  const std::vector< gsFunctionSet<T> *> & G,
62  const std::vector< gsFunctionSet<T> *> & alpha,
63  const std::vector< gsFunctionSet<T> *> & rho );
64 
66  const gsFunctionSet<T> & mp,
67  const std::vector< gsFunctionSet<T> *> & thickness,
68  const std::vector< gsFunctionSet<T> *> & G,
69  const std::vector< gsFunctionSet<T> *> & alpha );
70 
71  enum MatIntegration isMatIntegrated() const override {return MatIntegration::Integrated; }
72  enum MatIntegration isVecIntegrated() const override {return MatIntegration::Integrated; }
73 
75  gsOptionList & options() override {return m_options;}
76  void setOptions(gsOptionList opt) override {m_options.update(opt,gsOptionList::addIfUnknown); }
77 
78  // template COM
79  void density_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override;
80  // template COM
81  void pstretch_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override
83  void pstretchDir_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override
85  void pstress_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override
87  void pstressDir_into(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const override
89 
90  void thickness_into(const index_t patch, const gsMatrix<T> & u, gsMatrix<T>& result) const override;
91 
93  void parameters_into(const index_t patch, const gsMatrix<T> & u, gsMatrix<T>& result) const override
95 
97  void transform_into(const index_t patch, const gsMatrix<T> & u, gsMatrix<T>& result) const override
99 
101  void covtransform_into(const index_t patch, const gsMatrix<T> & u, gsMatrix<T>& result) const
103 
105  void pstressTransform_into(const index_t patch, const gsMatrix<T> & u, gsMatrix<T>& result) const
107 
108  gsMatrix<T> eval3D_matrix(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
109  gsMatrix<T> eval3D_vector(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
110 
111  std::ostream &print(std::ostream &os) const override;
112 
113  bool initialized() const override
114  {
115  return m_patches!=nullptr;
116  }
117 
118 public:
120  typedef memory::shared_ptr< gsMaterialMatrixComposite > Ptr;
121 
123  typedef memory::unique_ptr< gsMaterialMatrixComposite > uPtr;
124 
125 protected:
126  void _initialize(const index_t nLayers);
127  void _defaultOptions();
128 
129  gsMatrix<T> _transformationMatrix(const gsMatrix<T> & phi, const gsMatrix<T> & u) const;
130  // NOTE: it could be that these matrices should be transposed!!
131  gsMatrix<T> _cart2cov(const gsVector<T> & a1, const gsVector<T> & a2, const gsVector<T> & e1, const gsVector<T> & e2) const;
132  gsMatrix<T> _con2cart(const gsVector<T> & ac1, const gsVector<T> & ac2, const gsVector<T> & e1, const gsVector<T> & e2) const;
133 
134 protected:
135 
136  // template MAT
137  void _computePoints(const index_t patch, const gsMatrix<T> & u, bool basis = true) const;
138 
139 protected:
140 
141  // constructor
142  using Base::m_patches;
143  using Base::m_defpatches;
144 
145  // Composite
146  index_t m_nLayers;
147 
148  // Geometric data
149  using Base::m_data;
150 
151 
152  gsOptionList m_options;
153 
154  std::vector< function_ptr > m_Ts;
155  std::vector< function_ptr > m_Gs;
156  std::vector< function_ptr > m_As;
157  std::vector< function_ptr > m_Rs;
158  mutable util::gsThreaded<std::vector< gsMatrix<T> >> m_Gcontainer, m_Tcontainer, m_Acontainer, m_Rcontainer;
159 };
160 
161 } // namespace
162 
163 
164 #ifndef GISMO_BUILD_LIB
165 #include GISMO_HPP_HEADER(gsMaterialMatrixComposite.hpp)
166 #endif
MaterialOutput
This class describes the output type.
Definition: gsMaterialMatrixUtils.h:98
void pstressTransform_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixComposite.h:105
enum MatIntegration isVecIntegrated() const override
Specifies how the vector is integrated.
Definition: gsMaterialMatrixComposite.h:72
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
void covtransform_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixComposite.h:101
#define short_t
Definition: gsConfig.h:35
void setOptions(gsOptionList opt) override
Sets the options.
Definition: gsMaterialMatrixComposite.h:76
#define index_t
Definition: gsConfig.h:32
void pstretchDir_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
Evaluates the directions of the stretches in the shell (3x1 vector per direction) ...
Definition: gsMaterialMatrixComposite.h:83
Base class with dimension in template; used for metric computations.
memory::shared_ptr< gsMaterialMatrixComposite > Ptr
Shared pointer for gsMaterialMatrixComposite.
Definition: gsMaterialMatrixComposite.h:120
Provides a list of labeled parameters/options that can be set and accessed easily.
void transform_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixComposite.h:97
void thickness_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixComposite.hpp:171
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
Provides material matrix utilities.
void update(const gsOptionList &other, updateType type=ignoreIfUnknown)
Updates the object using the data from other.
Definition: gsOptionList.cpp:253
This class defines the base class for material matrices.
Definition: gsMaterialMatrixBaseDim.h:35
gsMaterialMatrixComposite()
Constructor of the assembler object.
Definition: gsMaterialMatrixComposite.h:56
void pstress_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
Evaluates the priciple stresses in the shell (3x1 vector)
Definition: gsMaterialMatrixComposite.h:85
memory::unique_ptr< gsMaterialMatrixComposite > uPtr
Unique pointer for gsMaterialMatrixComposite.
Definition: gsMaterialMatrixComposite.h:123
gsMatrix< T > eval3D_matrix(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
Evaluates the matrix on patch on in-plane points u with height z.
Definition: gsMaterialMatrixComposite.hpp:191
void density_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixComposite.hpp:141
void parameters_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixComposite.h:93
This class defines a linear material laminate.
Definition: gsMaterialMatrixComposite.h:39
void pstretch_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
Evaluates the stretches in the shell (3x1 vector)
Definition: gsMaterialMatrixComposite.h:81
enum MatIntegration isMatIntegrated() const override
Specifies how the matrix is integrated.
Definition: gsMaterialMatrixComposite.h:71
Provides a base class for material matrices.
std::ostream & print(std::ostream &os) const override
Prints the object as a string.
Definition: gsMaterialMatrixComposite.hpp:104
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
This object is a cache for computed values from an evaluator.
gsOptionList & options() override
Returns the list of default options for assembly.
Definition: gsMaterialMatrixComposite.h:75
MatIntegration
This class describes if an object is integrated through-thickness or not.
Definition: gsMaterialMatrixUtils.h:35
gsMatrix< T > eval3D_vector(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out=MaterialOutput::Generic) const override
Evaluates the vector on patch on in-plane points u with height z.
Definition: gsMaterialMatrixComposite.hpp:286
void pstressDir_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
Evaluates the directions of the priciple stresses in the shell (3x1 vector per direction) ...
Definition: gsMaterialMatrixComposite.h:87