G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsSolidElement.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <gsCore/gsExport.h>
18
19namespace gismo {
20
21template <class T > class gsSolidHeVertex;
22template <class T > class gsSolidHalfEdge;
23template <class T > class gsSolidHalfFace;
24template <class T > class gsVolumeBlock;
25
26template <class T >
27class GISMO_DEFAULT_VIS gsSolidElement
28{
29public:
30 typedef T scalar_t;
31 typedef gsSolidHeVertex<T> * gsSolidHeVertexHandle;
32 typedef gsSolidHalfEdge<T> * gsSolidHalfEdgeHandle;
33 typedef gsSolidHalfFace<T> * gsSolidHalfFaceHandle;
34 typedef gsVolumeBlock<T> * gsVolumeHandle;
35
36private:
37 int id;
38
39public:
40 explicit gsSolidElement(int i = 0) : id(i)
41 { }
42
43 virtual ~gsSolidElement() { }
44
45 int getId() const { return id; }
46 void setId(int i) { id=i; }
47
48public:
49
50 static gsSolidHeVertexHandle makeHeVertex( scalar_t x, scalar_t y, scalar_t z = 0)
51 { return new gsSolidHeVertex<T>(x,y,z); }
52// gsSolidHalfFaceHandle makeFace( std::vector<gsVertexHandle> const & vert)
53// { return new gsFace<T>(vert); }
54// gsSolidHalfFaceHandle makeFace(gsVertexHandle v0, gsVertexHandle v1, gsVertexHandle v2, gsVertexHandle v3)
55// { return new gsFace<T>(v0,v1,v2,v3); }
56// gsSolidHalfFaceHandle makeFace(gsVertexHandle v0, gsVertexHandle v1, gsVertexHandle v2)
57// { return new gsFace<T>(v0,v1,v2); }
58
59 static gsSolidHalfEdgeHandle makeSolidHalfEdge( gsSolidHeVertexHandle source, gsSolidHalfFaceHandle f)
60 { return new gsSolidHalfEdge<T>(source,f, 0, true); }
61// gsSolidHalfFaceHandle makeHalfFace( std::vector<gsSolidHalfEdgeHandle> const & hedges)
62// { return new gsHalfFace<T>(hedges); }
63 static gsVolumeHandle makeVolume( const std::vector<gsSolidHalfFaceHandle>& hfaces)
64 { return new gsVolumeBlock<T>(hfaces); }
65
67 virtual std::ostream &print(std::ostream &os) const { os<<"gsSolidElement\n"; return os; }
68
69 friend std::ostream& operator<<(std::ostream& os, const gsSolidElement& e) { return e.print(os); }
70};
71
72
73} // namespace gismo
Handles shared library creation and other class attributes.
EIGEN_STRONG_INLINE idMat_expr id(const index_t dim)
The identity matrix of dimension dim.
Definition gsExpressions.h:4470
std::ostream & operator<<(std::ostream &os, const _expr< E > &b)
Stream operator for expressions.
Definition gsExpressions.h:382
The G+Smo namespace, containing all definitions for the library.