G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
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
24namespace gismo
25{
26
36template < short_t dim,
37 class T
38 >
40{
41public:
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;
110 gsMatrix<T> eval3D_vector(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T>& z, enum MaterialOutput out = MaterialOutput::Generic) const override;
112
113 std::ostream &print(std::ostream &os) const override;
114
115 bool initialized() const override
116 {
117 return m_patches!=nullptr;
118 }
119
120public:
122 typedef memory::shared_ptr< gsMaterialMatrixComposite > Ptr;
123
125 typedef memory::unique_ptr< gsMaterialMatrixComposite > uPtr;
126
127protected:
128 void _initialize(const index_t nLayers);
129 void _defaultOptions();
130
131 gsMatrix<T> _transformationMatrix(const gsMatrix<T> & phi, const gsMatrix<T> & u) const;
132 // NOTE: it could be that these matrices should be transposed!!
133 gsMatrix<T> _cart2cov(const gsVector<T> & a1, const gsVector<T> & a2, const gsVector<T> & e1, const gsVector<T> & e2) const;
134 gsMatrix<T> _con2cart(const gsVector<T> & ac1, const gsVector<T> & ac2, const gsVector<T> & e1, const gsVector<T> & e2) const;
135
136protected:
137
138 // template MAT
139 void _computePoints(const index_t patch, const gsMatrix<T> & u, bool basis = true) const;
140
141protected:
142
143 // constructor
144 using Base::m_patches;
145 using Base::m_defpatches;
146
147 // Composite
148 index_t m_nLayers;
149
150 // Geometric data
151 using Base::m_data;
152
153
154 gsOptionList m_options;
155
156 std::vector< function_ptr > m_Ts;
157 std::vector< function_ptr > m_Gs;
158 std::vector< function_ptr > m_As;
159 std::vector< function_ptr > m_Rs;
160 mutable util::gsThreaded<std::vector< gsMatrix<T> >> m_Gcontainer, m_Tcontainer, m_Acontainer, m_Rcontainer;
161};
162
163} // namespace
164
165
166#ifndef GISMO_BUILD_LIB
167#include GISMO_HPP_HEADER(gsMaterialMatrixComposite.hpp)
168#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
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 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 laminate.
Definition gsMaterialMatrixComposite.h:40
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 pstress_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const override
Evaluates the priciple stresses in the shell (3x1 vector)
Definition gsMaterialMatrixComposite.h:85
enum MatIntegration isMatIntegrated() const override
Specifies how the matrix is integrated.
Definition gsMaterialMatrixComposite.h:71
gsOptionList & options() override
Returns the list of default options for assembly.
Definition gsMaterialMatrixComposite.h:75
void density_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixComposite.hpp:141
memory::shared_ptr< gsMaterialMatrixComposite > Ptr
Shared pointer for gsMaterialMatrixComposite.
Definition gsMaterialMatrixComposite.h:122
enum MatIntegration isVecIntegrated() const override
Specifies how the vector is integrated.
Definition gsMaterialMatrixComposite.h:72
gsMaterialMatrixComposite()
Constructor of the assembler object.
Definition gsMaterialMatrixComposite.h:56
void covtransform_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixComposite.h:101
std::ostream & print(std::ostream &os) const override
Prints the object as a string.
Definition gsMaterialMatrixComposite.hpp:104
void pstressTransform_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixComposite.h:105
void setOptions(gsOptionList opt) override
Sets the options.
Definition gsMaterialMatrixComposite.h:76
void thickness_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixComposite.hpp:171
void pstretchDir_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const override
Evaluates the directions of the stretches in the shell (3x1 vector per direction)
Definition gsMaterialMatrixComposite.h:83
memory::unique_ptr< gsMaterialMatrixComposite > uPtr
Unique pointer for gsMaterialMatrixComposite.
Definition gsMaterialMatrixComposite.h:125
void pstretch_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const override
Evaluates the stretches in the shell (3x1 vector)
Definition gsMaterialMatrixComposite.h:81
void pstressDir_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const override
Evaluates the directions of the priciple stresses in the shell (3x1 vector per direction)
Definition gsMaterialMatrixComposite.h:87
void parameters_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixComposite.h:93
void transform_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const override
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixComposite.h:97
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
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
void update(const gsOptionList &other, updateType type=ignoreIfUnknown)
Updates the object using the data from other.
Definition gsOptionList.cpp:253
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
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
This object is a cache for computed values from an evaluator.
Base class with dimension in template; used for metric computations.
Provides a base class for material matrices.
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.