41 typedef memory::shared_ptr< gsMaterialMatrixBase >
Ptr;
44 typedef memory::unique_ptr< gsMaterialMatrixBase >
uPtr;
49 m_defpatches(nullptr),
67 gsMaterialMatrixBase(
const gsFunctionSet<T> * mp,
68 const gsFunctionSet<T> * mp_def,
69 const gsFunctionSet<T> * thickness,
70 const gsFunctionSet<T> * Density)
79 gsMaterialMatrixBase(
const function_ptr & mp,
80 const function_ptr & mp_def,
81 const function_ptr & thickness,
82 const function_ptr & Density)
86 m_thickness(thickness),
91 GISMO_UPTR_FUNCTION_NO_IMPLEMENTATION(gsMaterialMatrixBase, clone)
105 operator=(
give(other));
112 m_patches = other.m_patches;
113 m_defpatches = other.m_defpatches;
114 m_options = other.m_options;
116 m_pars = other.m_pars;
117 m_thickness = other.m_thickness;
118 m_density = other.m_density;
123 gsMaterialMatrixBase<T> & operator= ( gsMaterialMatrixBase<T> && other )
125 m_patches =
give(other.m_patches);
126 m_defpatches =
give(other.m_defpatches);
127 m_options =
give(other.m_options);
130 m_pars =
give(other.m_pars);
131 m_thickness =
give(other.m_thickness);
132 m_density =
give(other.m_density);
377 virtual inline gsMatrix<T> eval3D_matrix_C(
const gsMatrix<T> & Cmat,
const index_t patch,
const gsVector<T>& u,
const T z,
enum MaterialOutput out)
const
430 virtual inline gsMatrix<T> eval3D_vector_C(
const gsMatrix<T> & C,
const index_t patch,
const gsVector<T>& u,
const T z,
enum MaterialOutput out)
const
610 virtual inline gsMatrix<T> eval3D_theta(
const index_t patch,
const gsMatrix<T>& u,
const gsMatrix<T>& z,
enum MaterialOutput out)
const
612 virtual inline gsMatrix<T> eval3D_theta(
const index_t patch,
const gsVector<T>& u,
const T & z,
enum MaterialOutput out)
const
614 gsMatrix<T> zmat(1,1);
616 return eval3D_theta(patch,u,zmat,out);
619 virtual inline gsMatrix<T> eval3D_gamma(
const index_t patch,
const gsMatrix<T>& u,
const gsMatrix<T>& z,
enum MaterialOutput out)
const
621 virtual inline gsMatrix<T> eval3D_gamma(
const index_t patch,
const gsVector<T>& u,
const T & z,
enum MaterialOutput out)
const
623 gsMatrix<T> zmat(1,1);
625 return eval3D_gamma(patch,u,zmat,out);
628 virtual void setYoungsModulus(
const gsFunctionSet<T> & YoungsModulus)
630 virtual const function_ptr getYoungsModulus()
const
632 virtual void setPoissonsRatio(
const gsFunctionSet<T> & PoissonsRatio)
634 virtual const function_ptr getPoissonsRatio()
const
636 virtual void setRatio(
const gsFunctionSet<T> & Ratio)
638 virtual const function_ptr getRatio()
const
640 virtual void setMu(
const index_t & i,
const gsFunctionSet<T> & Mu_i)
642 virtual const function_ptr getMu(
const index_t & i)
const
644 virtual void setAlpha(
const index_t & i,
const gsFunctionSet<T> & Alpha_i)
646 virtual const function_ptr getAlpha(
const index_t & i)
const
650 virtual inline void setThickness(
const function_ptr & thickness) { m_thickness = thickness; }
660 virtual inline bool hasThickness()
const {
return m_thickness!=
nullptr; }
666 virtual inline void setDensity(function_ptr Density) { m_density = Density; }
674 virtual inline bool hasDensity()
const {
return m_density!=
nullptr; }
677 virtual const function_ptr
getDensity()
const {
return m_density;}
706 m_pars.resize(pars.size());
707 for (
size_t k = 0; k!=pars.size(); k++)
718 if ((
index_t)m_pars.size() < i+1)
752 virtual inline void info()
const
756 virtual std::ostream &
print(std::ostream &os)
const
758 os<<
"gsMaterialMatrixBase (type not understood).\n";
770 virtual inline gsMatrix<T> C(
const gsMatrix<T> & strain)
const
773 virtual void setUndeformed(
const gsFunctionSet<T> * undeformed)
778 virtual void setDeformed(
const gsFunctionSet<T> * deformed)
781 m_defpatches = f_ptr;
784 virtual void setUndeformed(
const function_ptr undeformed) {m_patches = undeformed; }
785 virtual void setDeformed(
const function_ptr deformed) {m_defpatches = deformed; }
787 const function_ptr getUndeformed()
const {
return m_patches; }
788 const function_ptr getDeformed()
const {
return m_defpatches; }
790 virtual bool hasUndeformed()
const
791 {
return m_defpatches!=
nullptr; }
792 virtual bool hasDeformed()
const {
return m_defpatches!=
nullptr; }
794 virtual bool initialized()
const
798 function_ptr m_patches;
799 function_ptr m_defpatches;
800 gsOptionList m_options;
802 std::vector< function_ptr > m_pars;
803 function_ptr m_thickness;
804 function_ptr m_density;
808 std::ostream& operator<<(std::ostream& os, const gsMaterialMatrixBase<T>& mm)
813 #ifdef GISMO_WITH_PYBIND11
818 void pybind11_init_gsMaterialMatrixBase(pybind11::module &m);
820 #endif // GISMO_WITH_PYBIND11
824 #ifndef GISMO_BUILD_LIB
825 #include GISMO_HPP_HEADER(gsMaterialMatrixBase.hpp)
virtual gsMatrix< T > eval3D_matrix(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Evaluates the matrix on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:367
MaterialOutput
This class describes the output type.
Definition: gsMaterialMatrixUtils.h:98
virtual gsMatrix< T > eval3D_spec2con(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Provides the transformation from the spectral basis to the contravariant basis.
Definition: gsMaterialMatrixBase.h:284
virtual void pstress_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the priciple stresses in the shell (3x1 vector)
Definition: gsMaterialMatrixBase.h:217
virtual void defaultOptions()
Returns the options.
Definition: gsMaterialMatrixBase.h:167
virtual void setParameters(const std::vector< function_ptr > &pars)
Sets the material parameters.
Definition: gsMaterialMatrixBase.h:684
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
std::vector< T * > release(std::vector< unique_ptr< T > > &cont)
Takes a vector of smart pointers, releases them and returns the corresponding raw pointers...
Definition: gsMemory.h:228
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
virtual const function_ptr getThickness() const
Gets the Density.
Definition: gsMaterialMatrixBase.h:663
virtual void thickness_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the thickness of the shell (scalar)
Definition: gsMaterialMatrixBase.h:235
virtual gsOptionList & options()
Returns the options.
Definition: gsMaterialMatrixBase.h:175
virtual gsMatrix< T > eval3D_tensionfield(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
to do
Definition: gsMaterialMatrixBase.h:601
virtual void setDensity(function_ptr Density)
Sets the density.
Definition: gsMaterialMatrixBase.h:666
virtual gsMatrix< T > eval3D_detF(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
{ function_description }
Definition: gsMaterialMatrixBase.h:568
S give(S &x)
Definition: gsMemory.h:266
virtual void pstressDir_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the directions of the priciple stresses in the shell (3x1 vector per direction) ...
Definition: gsMaterialMatrixBase.h:226
#define index_t
Definition: gsConfig.h:32
virtual gsMatrix< T > eval3D_CauchyStress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
{ function_description }
Definition: gsMaterialMatrixBase.h:581
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
virtual gsMaterialMatrixBase< T > * material()
Returns this.
Definition: gsMaterialMatrixBase.h:765
virtual gsMatrix< T > eval3D_spec2cov(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Provides the transformation from the spectral basis to the covariant basis.
Definition: gsMaterialMatrixBase.h:270
virtual enum MatIntegration isVecIntegrated() const
Specifies how the vector is integrated.
Definition: gsMaterialMatrixBase.h:160
This class defines the base class for material matrices.
Definition: gsMaterialMatrixBase.h:32
virtual gsMatrix< T > eval3D_pstretch(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Evaluates the principal stretch on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:489
memory::shared_ptr< gsFunctionSet > Ptr
Shared pointer for gsFunctionSet.
Definition: gsFunctionSet.h:223
virtual void pstretchDir_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the directions of the stretches in the shell (3x1 vector per direction) ...
Definition: gsMaterialMatrixBase.h:208
virtual const function_ptr getDensity() const
Gets the Density.
Definition: gsMaterialMatrixBase.h:677
virtual void transform_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Constructs a transformation matrix that transforms a quantity (IN VOIGHT NOTATION) in the spectral ba...
Definition: gsMaterialMatrixBase.h:255
virtual index_t numParameters() const
Gets the number of parameters.
Definition: gsMaterialMatrixBase.h:740
virtual gsMatrix< T > eval3D_stress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
{ function_description }
Definition: gsMaterialMatrixBase.h:549
virtual void density_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the density multiplied by the thickness of the shell (scalar)
Definition: gsMaterialMatrixBase.h:190
virtual gsMatrix< T > eval3D_dmatrix(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Evaluates the derivative of the matrix on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:398
virtual void setParameter(const index_t i, const function_ptr &par)
Sets the material parameters.
Definition: gsMaterialMatrixBase.h:694
virtual gsMatrix< T > eval3D_pstressDir(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Evaluates the principal stress directions on patch on in-plane points u with height z...
Definition: gsMaterialMatrixBase.h:475
virtual gsMatrix< T > eval3D_deformation(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Evaluates deformation tensor on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:353
virtual enum MatIntegration isMatIntegrated() const
Specifies how the matrix is integrated.
Definition: gsMaterialMatrixBase.h:147
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
virtual void parameters_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the parameters of the shell.
Definition: gsMaterialMatrixBase.h:245
virtual void resetParameters()
See gsMaterialMatrixBase for details.
Definition: gsMaterialMatrixBase.h:743
virtual gsMatrix< T > eval3D_vector(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Evaluates the vector on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:422
Provides material matrix utilities.
virtual gsMatrix< T > eval3D_strain(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
{ function_description }
Definition: gsMaterialMatrixBase.h:530
void update(const gsOptionList &other, updateType type=ignoreIfUnknown)
Updates the object using the data from other.
Definition: gsOptionList.cpp:253
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
virtual void setDensity(const gsFunctionSet< T > &Density)
Sets the density.
Definition: gsMaterialMatrixBase.h:668
virtual const gsMaterialMatrixBase< T > * material() const
Returns this.
Definition: gsMaterialMatrixBase.h:763
virtual void setThickness(const gsFunctionSet< T > &thickness)
Sets the thickness.
Definition: gsMaterialMatrixBase.h:653
gsMaterialMatrixBase(gsMaterialMatrixBase< T > &&other)
Move constructor.
Definition: gsMaterialMatrixBase.h:103
virtual gsMatrix< T > eval3D_con2cart(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Provides the transformation from the contravariant basis to the local cartesian basis.
Definition: gsMaterialMatrixBase.h:313
virtual gsMatrix< T > eval3D_pstress(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Evaluates the principal stress on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:460
virtual gsMatrix< T > eval3D_CauchyVector(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z, enum MaterialOutput out) const
Evaluates the Cauchy Stress vector on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:445
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 gsFunctionSet< T > &par)
Sets the material parameters.
Definition: gsMaterialMatrixBase.h:716
virtual gsMatrix< T > eval3D_pstressTransform(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Provides the transformation of the principle stresses.
Definition: gsMaterialMatrixBase.h:339
memory::shared_ptr< gsMaterialMatrixBase > Ptr
Shared pointer for gsGeometry.
Definition: gsMaterialMatrixBase.h:41
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
virtual void setOptions(gsOptionList opt)
Sets the options.
Definition: gsMaterialMatrixBase.h:181
virtual std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsMaterialMatrixBase.h:756
This is the interface of all objects that computes functions on points like gsBasis, gsGeometry and gsFunctions.
memory::unique_ptr< gsMaterialMatrixBase > uPtr
Unique pointer for gsGeometry.
Definition: gsMaterialMatrixBase.h:44
virtual void setParameters(const std::vector< gsFunctionSet< T > * > &pars)
Sets the material parameters.
Definition: gsMaterialMatrixBase.h:704
virtual bool hasThickness() const
Returns true if a thickness is assigned.
Definition: gsMaterialMatrixBase.h:660
MatIntegration
This class describes if an object is integrated through-thickness or not.
Definition: gsMaterialMatrixUtils.h:35
virtual gsMatrix< T > eval3D_pstrain(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Evaluates the principal strain on patch on in-plane points u with height z.
Definition: gsMaterialMatrixBase.h:517
virtual gsMatrix< T > eval3D_cov2cart(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Provides the transformation from the covariant basis to the local cartesian basis.
Definition: gsMaterialMatrixBase.h:299
virtual void pstretch_into(const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the stretches in the shell (3x1 vector)
Definition: gsMaterialMatrixBase.h:199
virtual void info() const
Prints info.
Definition: gsMaterialMatrixBase.h:752
virtual gsMatrix< T > eval3D_pstretchTransform(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Provides the transformation of the principle stretches.
Definition: gsMaterialMatrixBase.h:326
virtual gsMatrix< T > eval3D_pstretchDir(const index_t patch, const gsMatrix< T > &u, const gsMatrix< T > &z) const
Evaluates the principal stretch directions on patch on in-plane points u with height z...
Definition: gsMaterialMatrixBase.h:502
virtual bool hasDensity() const
Returns true if a density is assigned.
Definition: gsMaterialMatrixBase.h:674
virtual void setThickness(const function_ptr &thickness)
Sets the thickness.
Definition: gsMaterialMatrixBase.h:650
gsMaterialMatrixBase(const gsMaterialMatrixBase< T > &other)
Copy constructor (makes deep copy)
Definition: gsMaterialMatrixBase.h:97
shared_ptr< T > make_shared(T *x)
Definition: gsMemory.h:181