G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsVolume.h
Go to the documentation of this file.
1 
14 #pragma once
15 
16 namespace gismo
17 {
18 
27 template<class T>
28 class gsVolume : public gsGeometry<T>
29 {
30 
31 public:
33  typedef memory::shared_ptr< gsVolume > Ptr;
34 
36  typedef memory::unique_ptr< gsVolume > uPtr;
37 
38  typedef T Scalar_t;
39 public:
40 
43 
45  gsVolume() : gsGeometry<T>() { }
46 
50  gsGeometry<T>(basis, give(coefs) )
51  {
52  GISMO_ASSERT( this->m_coefs.size() >= 1,
53  "Coefficient matrix cannot be empty.\n");
54  // GISMO_ASSERT( coefs.cols() >= 2,
55  // "Surface must be embedded in dimension at least two.\n");
56  }
57 
59 
60 // GISMO_UPTR_FUNCTION_PURE(gsVolume, clone)
61 private: virtual gsVolume * clone_impl() const = 0;
62 public: inline uPtr clone() const { return uPtr(clone_impl()); }
63 
64  short_t domainDim() const { return 3; }
65 
66 }; // class gsVolume
67 
68 } // namespace gismo
69 
70 
71 #ifndef GISMO_BUILD_LIB
72 #include GISMO_HPP_HEADER(gsVolume.hpp)
73 #endif
74 
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
gsMatrix< T > m_coefs
Coefficient matrix of size coefsSize() x geoDim()
Definition: gsGeometry.h:624
#define short_t
Definition: gsConfig.h:35
gsVolume(const gsBasis< T > &basis, gsMatrix< T > coefs)
Definition: gsVolume.h:49
gsVolume()
Default empty constructor.
Definition: gsVolume.h:45
S give(S &x)
Definition: gsMemory.h:266
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
short_t domainDim() const
Dimension d of the parameter domain (overriding gsFunction::domainDim()).
Definition: gsVolume.h:64
memory::shared_ptr< gsVolume > Ptr
Shared pointer for gsVolume.
Definition: gsVolume.h:33
Provides declaration of Volume abstract interface.
Definition: gsVolume.h:28
virtual const gsBasis< T > & basis() const =0
Returns a const reference to the basis of the geometry.
memory::unique_ptr< gsVolume > uPtr
Unique pointer for gsVolume.
Definition: gsVolume.h:36
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
gsMatrix< T > & coefs()
Definition: gsGeometry.h:340