G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsGenericGeometry.h
Go to the documentation of this file.
1
14#pragma once
15
26#include <gsCore/gsGeometry.h>
27
28namespace gismo
29{
30
31template<short_t d, class T>
32class gsGenericGeometry : public gsGeoTraits<d,T>::GeometryBase
33{
34public:
35 typedef gsBasis<T> Basis;
36
37 typedef typename gsGeoTraits<d,T>::GeometryBase Base;
38
40 typedef memory::shared_ptr< gsGenericGeometry > Ptr;
41
43 typedef memory::unique_ptr< gsGenericGeometry > uPtr;
44
45public:
46 gsGenericGeometry(const gsBasis<T> & basis,
47 gsMatrix<T> coefs)
48 : Base (basis, give(coefs))
49 {
50 GISMO_ASSERT( this->m_basis->dim() == static_cast<int>(d),
51 "Incoherent basis dimension in gsGenericGeometry");
52 }
53
54 GISMO_CLONE_FUNCTION(gsGenericGeometry)
55
56 GISMO_BASIS_ACCESSORS
57
58};
59
60} // namespace gismo
61
gsMatrix< T > & coefs()
Definition gsGeometry.h:340
virtual const gsBasis< T > & basis() const =0
Returns a const reference to the basis of the geometry.
gsBasis< T > * m_basis
Pointer to the basis of this geometry.
Definition gsGeometry.h:632
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
Provides declaration of Geometry abstract interface.
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266