G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsDomain.h
Go to the documentation of this file.
1
15#pragma once
16
18
19namespace gismo
20{
21
30template<class T>
32{
33public:
34
35 virtual ~gsDomain() { }
36
37#if EIGEN_HAS_RVALUE_REFERENCES && EIGEN_GNUC_AT_MOST(4,7) && !EIGEN_COMP_PGI
38 // defaulted declaration required at least in Gcc 4.7.2
39 gsDomain() = default;
40 gsDomain(const gsDomain&) = default;
41 gsDomain(gsDomain&&) = default;
42 gsDomain & operator=(const gsDomain&) = default;
43 gsDomain & operator=(gsDomain&&) = default;
44#endif
45
46public:
47
49 virtual short_t dim() const
50 { gsWarn << "gsDomain: dimension() not defined at "<< *this << "\n"; return 0; }
51
56
60
64
65 virtual T minMeshSize()
67
69 virtual std::vector<T> breaks() const
71
73 virtual gsDomain* clone() const = 0;
74
76 virtual std::ostream &print(std::ostream &os) const = 0;
77
78 /*
79 Member functions that may be implemented or not in the derived class
80 */
81
82 virtual std::vector<T> unique() const
83 { gsWarn<<"gsDomain: unique() was not defined at"<< *this <<"\n"; return std::vector<T>() ;}
84
85 void merge(gsDomain<T> * other )
86 { gsWarn<<"gsDomain: merge(..) was not defined in "<< *this <<"\n"; return;}
87
88}; // class gsDomain
89
91template<class T>
92std::ostream &operator<<(std::ostream &os, const gsDomain<T>& b)
93{ return b.print(os); }
94
95
96} // namespace gismo
Class representing a domain. i.e. a collection of elements (triangles, rectangles,...
Definition gsDomain.h:32
virtual gsDomain * clone() const =0
Clone function. Used to make a copy of the (derived) geometry.
virtual std::ostream & print(std::ostream &os) const =0
Prints the object as a string.
virtual short_t dim() const
dimension of the domain
Definition gsDomain.h:49
virtual std::vector< T > breaks() const
Returns the breaks..
Definition gsDomain.h:69
virtual gsMatrix< T > elements()
Returns a list of elements.
Definition gsDomain.h:58
virtual gsMatrix< T > boundingBox()
Definition gsDomain.h:54
virtual gsMatrix< T > mesh()
Returns the mesh..
Definition gsDomain.h:62
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
#define short_t
Definition gsConfig.h:35
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
#define gsWarn
Definition gsDebug.h:50
This is the main header file that collects wrappers of Eigen for linear algebra.
The G+Smo namespace, containing all definitions for the library.