G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsMaterialMatrixContainer.h
Go to the documentation of this file.
1
16#pragma once
17
19
20namespace gismo
21{
22
23
32template <class T>
33class gsMaterialMatrixContainer // change name to PtrContainer
34{
35public:
36 typedef typename std::vector<typename gsMaterialMatrixBase<T>::Ptr> Container;
37
38 typedef typename Container::iterator iterator;
39 typedef typename Container::const_iterator const_iterator;
40
42 typedef memory::shared_ptr< gsMaterialMatrixContainer > Ptr;
43
45 typedef memory::unique_ptr< gsMaterialMatrixContainer > uPtr;
46public:
47
50
52
54 void add(const gsMaterialMatrixBase<T> & mat);
55
57 void add(const gsMaterialMatrixBase<T> * mat);
58
60 void set(const index_t i, const gsMaterialMatrixBase<T> & mat);
61
63 void set(const index_t i, const gsMaterialMatrixBase<T> * mat);
64
66 void set(const index_t i, const typename gsMaterialMatrixBase<T>::Ptr mat);
67
68 gsMaterialMatrixBase<T> * piece(const index_t k) const;
69
70 index_t size() const {return m_container.size();}
71
72 std::ostream &print(std::ostream &os) const;
73
74 friend std::ostream & operator<<(std::ostream & os, const gsMaterialMatrixContainer & mc)
75 {
76 return mc.print(os);
77 }
78
80 void clear();
81
82protected:
83 Container m_container;
84
85};
86
87
88} // namespace gismo
89
90
91#ifndef GISMO_BUILD_LIB
92#include GISMO_HPP_HEADER(gsMaterialMatrixContainer.hpp)
93#endif
This class defines the base class for material matrices.
Definition gsMaterialMatrixBase.h:33
memory::shared_ptr< gsMaterialMatrixBase > Ptr
Shared pointer for gsGeometry.
Definition gsMaterialMatrixBase.h:41
This class serves as the evaluator of material matrices, based on gsMaterialMatrixBase.
Definition gsMaterialMatrixContainer.h:34
memory::unique_ptr< gsMaterialMatrixContainer > uPtr
Unique pointer for gsMaterialMatrixContainer.
Definition gsMaterialMatrixContainer.h:45
memory::shared_ptr< gsMaterialMatrixContainer > Ptr
Shared pointer for gsMaterialMatrixContainer.
Definition gsMaterialMatrixContainer.h:42
void set(const index_t i, const gsMaterialMatrixBase< T > &mat)
Set a material matrix by copying argument.
Definition gsMaterialMatrixContainer.hpp:58
void add(const gsMaterialMatrixBase< T > &mat)
Add a material matrix by copying argument.
Definition gsMaterialMatrixContainer.hpp:46
void clear()
Clear all function pointers.
Definition gsMaterialMatrixContainer.hpp:89
#define index_t
Definition gsConfig.h:32
Provides a base class for material matrices.
The G+Smo namespace, containing all definitions for the library.