41 typedef memory::shared_ptr< gsMaterialMatrixBase >
Ptr;
44 typedef memory::unique_ptr< gsMaterialMatrixBase >
uPtr;
49 m_defpatches(nullptr),
60 m_patches(memory::make_shared(mp.clone().release())),
61 m_defpatches(memory::make_shared(mp_def.clone().release())),
62 m_thickness(memory::make_shared(thickness.clone().release())),
63 m_density(memory::make_shared(Density.clone().release()))
67 gsMaterialMatrixBase(
const gsFunctionSet<T> * mp,
68 const gsFunctionSet<T> * mp_def,
69 const gsFunctionSet<T> * thickness,
70 const gsFunctionSet<T> * Density)
72 m_patches(memory::make_shared_not_owned(mp)),
73 m_defpatches(memory::make_shared_not_owned(mp_def)),
74 m_thickness(memory::make_shared_not_owned(thickness)),
75 m_density(memory::make_shared_not_owned(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 gsMatrix<T> eval3D_matrix_C(
const gsMatrix<T> & ,
const index_t ,
const gsVector<T>& ,
const T ,
enum MaterialOutput )
const
430 virtual gsMatrix<T> eval3D_vector_C(
const gsMatrix<T> & ,
const index_t ,
const gsVector<T>& ,
const T ,
enum MaterialOutput )
const
610 virtual gsMatrix<T> eval3D_theta(
const index_t ,
const gsMatrix<T>& ,
const gsMatrix<T>& ,
enum MaterialOutput )
const
612 virtual 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 gsMatrix<T> eval3D_gamma(
const index_t ,
const gsMatrix<T>& ,
const gsMatrix<T>& ,
enum MaterialOutput )
const
621 virtual 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> & )
630 virtual const function_ptr getYoungsModulus()
const
632 virtual void setPoissonsRatio(
const gsFunctionSet<T> & )
634 virtual const function_ptr getPoissonsRatio()
const
636 virtual void setRatio(
const gsFunctionSet<T> & )
638 virtual const function_ptr getRatio()
const
640 virtual void setMu(
const index_t & ,
const gsFunctionSet<T> & )
642 virtual const function_ptr getMu(
const index_t &)
const
644 virtual void setAlpha(
const index_t & ,
const gsFunctionSet<T> & )
646 virtual const function_ptr getAlpha(
const index_t & )
const
650 virtual void setThickness(
const function_ptr & thickness) { m_thickness = thickness; }
666 virtual void setDensity(function_ptr Density) { m_density = Density; }
674 virtual 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)
756 virtual std::ostream &
print(std::ostream &os)
const
758 os<<
"gsMaterialMatrixBase (type not understood).\n";
771 virtual gsMatrix<T> C(
const gsMatrix<T> & )
const
774 virtual void setUndeformed(
const gsFunctionSet<T> * undeformed)
779 virtual void setDeformed(
const gsFunctionSet<T> * deformed)
782 m_defpatches = f_ptr;
785 virtual void setUndeformed(
const function_ptr undeformed) {m_patches = undeformed; }
786 virtual void setDeformed(
const function_ptr deformed) {m_defpatches = deformed; }
788 const function_ptr getUndeformed()
const {
return m_patches; }
789 const function_ptr getDeformed()
const {
return m_defpatches; }
791 virtual bool hasUndeformed()
const
792 {
return m_defpatches!=
nullptr; }
793 virtual bool hasDeformed()
const {
return m_defpatches!=
nullptr; }
795 virtual bool initialized()
const
799 function_ptr m_patches;
800 function_ptr m_defpatches;
801 gsOptionList m_options;
803 std::vector< function_ptr > m_pars;
804 function_ptr m_thickness;
805 function_ptr m_density;
809std::ostream&
operator<<(std::ostream& os,
const gsMaterialMatrixBase<T>& mm)
814#ifdef GISMO_WITH_PYBIND11
819 void pybind11_init_gsMaterialMatrixBase(pybind11::module &m);
825#ifndef GISMO_BUILD_LIB
826#include GISMO_HPP_HEADER(gsMaterialMatrixBase.hpp)
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition gsFunctionSet.h:219
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
memory::shared_ptr< gsFunctionSet > Ptr
Shared pointer for gsFunctionSet.
Definition gsFunctionSet.h:223
This class defines the base class for material matrices.
Definition gsMaterialMatrixBase.h:33
virtual void pstress_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
Evaluates the priciple stresses in the shell (3x1 vector)
Definition gsMaterialMatrixBase.h:217
virtual gsMaterialMatrixBase< T > * material()
Returns this.
Definition gsMaterialMatrixBase.h:765
virtual gsMatrix< T > eval3D_CauchyStress(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
{ function_description }
Definition gsMaterialMatrixBase.h:581
virtual const gsMaterialMatrixBase< T > * material() const
Returns this.
Definition gsMaterialMatrixBase.h:763
virtual void info() const
Prints info.
Definition gsMaterialMatrixBase.h:752
virtual gsMatrix< T > eval3D_pstretchDir(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Evaluates the principal stretch directions on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:502
virtual gsMatrix< T > eval3D_cov2cart(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Provides the transformation from the covariant basis to the local cartesian basis.
Definition gsMaterialMatrixBase.h:299
virtual gsMatrix< T > eval3D_spec2cov(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Provides the transformation from the spectral basis to the covariant basis.
Definition gsMaterialMatrixBase.h:270
virtual void setOptions(gsOptionList opt)
Sets the options.
Definition gsMaterialMatrixBase.h:181
virtual void setDensity(function_ptr Density)
Sets the density.
Definition gsMaterialMatrixBase.h:666
virtual gsMatrix< T > eval3D_detF(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
{ function_description }
Definition gsMaterialMatrixBase.h:568
virtual enum MatIntegration isVecIntegrated() const
Specifies how the vector is integrated.
Definition gsMaterialMatrixBase.h:160
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
virtual void setThickness(const gsFunctionSet< T > &thickness)
Sets the thickness.
Definition gsMaterialMatrixBase.h:653
gsMaterialMatrixBase(const gsMaterialMatrixBase< T > &other)
Copy constructor (makes deep copy)
Definition gsMaterialMatrixBase.h:97
memory::unique_ptr< gsMaterialMatrixBase > uPtr
Unique pointer for gsGeometry.
Definition gsMaterialMatrixBase.h:44
virtual index_t numParameters() const
Gets the number of parameters.
Definition gsMaterialMatrixBase.h:740
virtual gsMatrix< T > eval3D_dmatrix(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
Evaluates the derivative of the matrix on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:398
virtual gsMatrix< T > eval3D_pstressDir(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
Evaluates the principal stress directions on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:475
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 void transform_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
Constructs a transformation matrix that transforms a quantity (IN VOIGHT NOTATION) in the spectral ba...
Definition gsMaterialMatrixBase.h:255
virtual bool hasDensity() const
Returns true if a density is assigned.
Definition gsMaterialMatrixBase.h:674
virtual gsMatrix< T > eval3D_CauchyVector(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
Evaluates the Cauchy Stress vector on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:445
virtual void pstretch_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
Evaluates the stretches in the shell (3x1 vector)
Definition gsMaterialMatrixBase.h:199
virtual void pstretchDir_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) 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 gsMatrix< T > eval3D_stress(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
{ function_description }
Definition gsMaterialMatrixBase.h:549
virtual const function_ptr getThickness() const
Gets the Density.
Definition gsMaterialMatrixBase.h:663
virtual void pstressDir_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
Evaluates the directions of the priciple stresses in the shell (3x1 vector per direction)
Definition gsMaterialMatrixBase.h:226
virtual bool hasThickness() const
Returns true if a thickness is assigned.
Definition gsMaterialMatrixBase.h:660
virtual std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition gsMaterialMatrixBase.h:756
virtual void resetParameters()
See gsMaterialMatrixBase for details.
Definition gsMaterialMatrixBase.h:743
gsMaterialMatrixBase(gsMaterialMatrixBase< T > &&other)
Move constructor.
Definition gsMaterialMatrixBase.h:103
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_spec2con(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Provides the transformation from the spectral basis to the contravariant basis.
Definition gsMaterialMatrixBase.h:284
virtual gsMatrix< T > eval3D_strain(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
{ function_description }
Definition gsMaterialMatrixBase.h:530
virtual gsMatrix< T > eval3D_pstretch(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Evaluates the principal stretch on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:489
virtual void setDensity(const gsFunctionSet< T > &Density)
Sets the density.
Definition gsMaterialMatrixBase.h:668
virtual void parameters_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
Evaluates the parameters of the shell.
Definition gsMaterialMatrixBase.h:245
virtual gsMatrix< T > eval3D_pstress(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
Evaluates the principal stress on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:460
virtual void density_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
Evaluates the density multiplied by the thickness of the shell (scalar)
Definition gsMaterialMatrixBase.h:190
virtual const function_ptr getParameter(const index_t i) const
Gets parameter i.
Definition gsMaterialMatrixBase.h:730
virtual void setParameters(const std::vector< gsFunctionSet< T > * > &pars)
Sets the material parameters.
Definition gsMaterialMatrixBase.h:704
memory::shared_ptr< gsMaterialMatrixBase > Ptr
Shared pointer for gsGeometry.
Definition gsMaterialMatrixBase.h:41
virtual void setThickness(const function_ptr &thickness)
Sets the thickness.
Definition gsMaterialMatrixBase.h:650
virtual gsOptionList & options()
Returns the options.
Definition gsMaterialMatrixBase.h:175
virtual void setParameter(const index_t i, const gsFunctionSet< T > &par)
Sets the material parameters.
Definition gsMaterialMatrixBase.h:716
virtual gsMatrix< T > eval3D_pstrain(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Evaluates the principal strain on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:517
virtual gsMatrix< T > eval3D_con2cart(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Provides the transformation from the contravariant basis to the local cartesian basis.
Definition gsMaterialMatrixBase.h:313
virtual gsMatrix< T > eval3D_deformation(const index_t, const gsMatrix< T > &, const gsMatrix< T > &) const
Evaluates deformation tensor on patch on in-plane points u with height z.
Definition gsMaterialMatrixBase.h:353
virtual void setParameter(const index_t i, const function_ptr &par)
Sets the material parameters.
Definition gsMaterialMatrixBase.h:694
virtual void defaultOptions()
Returns the options.
Definition gsMaterialMatrixBase.h:167
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
virtual void setParameters(const std::vector< function_ptr > &pars)
Sets the material parameters.
Definition gsMaterialMatrixBase.h:684
virtual void thickness_into(const index_t, const gsMatrix< T > &, gsMatrix< T > &) const
Evaluates the thickness of the shell (scalar)
Definition gsMaterialMatrixBase.h:235
virtual enum MatIntegration isMatIntegrated() const
Specifies how the matrix is integrated.
Definition gsMaterialMatrixBase.h:147
virtual gsMatrix< T > eval3D_tensionfield(const index_t, const gsMatrix< T > &, const gsMatrix< T > &, enum MaterialOutput) const
to do
Definition gsMaterialMatrixBase.h:601
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 index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
This is the interface of all objects that computes functions on points like gsBasis,...
Provides material matrix utilities.
std::ostream & operator<<(std::ostream &os, const _expr< E > &b)
Stream operator for expressions.
Definition gsExpressions.h:382
shared_ptr< T > make_shared_not_owned(const T *x)
Creates a shared pointer which does not eventually delete the underlying raw pointer....
Definition gsMemory.h:189
shared_ptr< T > make_shared(T *x)
Definition gsMemory.h:181
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266