G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsSurface.h
Go to the documentation of this file.
1
14#pragma once
15
16#include <gsCore/gsGeometry.h>
17
18namespace gismo
19{
20
29template<class T>
30class gsSurface : public gsGeometry<T>
31{
32
33public:
35 typedef memory::shared_ptr< gsSurface > Ptr;
36
38 typedef memory::unique_ptr< gsSurface > uPtr;
39
40 typedef T Scalar_t;
41public:
42
45
47 gsSurface() : gsGeometry<T>() { }
48
53 {
54 GISMO_ASSERT( this->m_coefs.size() >= 1,
55 "Coefficient matrix cannot be empty.\n");
56 // GISMO_ASSERT( coefs.cols() >= 2,
57 // "Surface must be embedded in dimension at least two.\n");
58 }
59
61
62// GISMO_UPTR_FUNCTION_PURE(gsSurface, clone)
63private: virtual gsSurface * clone_impl() const = 0;
64public: inline uPtr clone() const { return uPtr(clone_impl()); }
65
66 short_t domainDim() const { return 2; }
67
68 void toMesh(gsMesh<T> & msh, int npoints = 625) const;
69
70}; // class gsSurface
71
72} // namespace gismo
73
74
75#ifndef GISMO_BUILD_LIB
76#include GISMO_HPP_HEADER(gsSurface.hpp)
77#endif
78
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Abstract base class representing a geometry map.
Definition gsGeometry.h:93
gsMatrix< T > & coefs()
Definition gsGeometry.h:340
virtual const gsBasis< T > & basis() const =0
Returns a const reference to the basis of the geometry.
gsMatrix< T > m_coefs
Coefficient matrix of size coefsSize() x geoDim()
Definition gsGeometry.h:629
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Class Representing a triangle mesh with 3D vertices.
Definition gsMesh.h:32
Abstract base class representing a surface.
Definition gsSurface.h:31
memory::shared_ptr< gsSurface > Ptr
Shared pointer for gsSurface.
Definition gsSurface.h:35
gsSurface(const gsBasis< T > &basis, gsMatrix< T > coefs)
Definition gsSurface.h:51
short_t domainDim() const
Dimension d of the parameter domain (overriding gsFunction::domainDim()).
Definition gsSurface.h:66
memory::unique_ptr< gsSurface > uPtr
Unique pointer for gsSurface.
Definition gsSurface.h:38
gsSurface()
Default empty constructor.
Definition gsSurface.h:47
#define short_t
Definition gsConfig.h:35
#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