Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/netgen/libsrc/geom2d/splinegeometry2.hpp
3206 views
1
2
3
OLD IMPLEMENTATION, NOT USED ANYMORE!
4
5
6
7
8
#ifndef FILE_SPLINEGEOMETRY2
9
#define FILE_SPLINEGEOMETRY2
10
11
/**************************************************************************/
12
/* File: splinegeometry2.hpp */
13
/* Author: Joachim Schoeberl */
14
/* Date: 24. Jul. 96 */
15
/**************************************************************************/
16
17
#include "splinegeometry.hpp"
18
19
#ifdef OLDSPLINEGEOMETRY
20
21
22
///
23
extern void LoadBoundarySplines (const char * filename,
24
ARRAY<GeomPoint2d> & geompoints,
25
ARRAY<SplineSegment*> & splines,
26
double & elto0);
27
///
28
extern void PartitionBoundary (const ARRAY<SplineSegment*> & splines,
29
double h, double elto0,
30
Mesh & mesh2d);
31
32
33
class CSGScanner;
34
35
class SplineGeometry2d
36
{
37
ARRAY<GeomPoint2d> geompoints;
38
ARRAY<SplineSegment*> splines;
39
double elto0;
40
41
42
private:
43
void AppendSegment(SplineSegment * spline, const int leftdomain, const int rightdomain,
44
const int bc,
45
const double reffac, const bool hprefleft, const bool hprefright,
46
const int copyfrom);
47
48
public:
49
~SplineGeometry2d();
50
51
void Load (const char * filename);
52
void CSGLoad (CSGScanner & scan);
53
void PartitionBoundary (double h, Mesh & mesh2d);
54
55
void CopyEdgeMesh (int from, int to, Mesh & mesh2d, Point3dTree & searchtree);
56
57
const ARRAY<SplineSegment*> & GetSplines () const
58
{ return splines; }
59
60
int GetNSplines (void) const { return splines.Size(); }
61
string GetSplineType (const int i) const { return splines[i]->GetType(); }
62
SplineSegment & GetSpline (const int i) {return *splines[i];}
63
const SplineSegment & GetSpline (const int i) const {return *splines[i];}
64
65
void GetBoundingBox (Box<2> & box) const;
66
67
int GetNP () const { return geompoints.Size(); }
68
const GeomPoint2d & GetPoint(int i) const { return geompoints[i]; }
69
70
void SetGrading (const double grading);
71
void AppendPoint (const double x, const double y, const double reffac = 1., const bool hpref = false);
72
73
void AppendLineSegment (const int n1, const int n2,
74
const int leftdomain, const int rightdomain, const int bc = -1,
75
const double reffac = 1.,
76
const bool hprefleft = false, const bool hprefright = false,
77
const int copyfrom = -1);
78
void AppendSplineSegment (const int n1, const int n2, const int n3,
79
const int leftdomain, const int rightdomain, const int bc = -1,
80
const double reffac = 1.,
81
const bool hprefleft = false, const bool hprefright = false,
82
const int copyfrom = -1);
83
void AppendCircleSegment (const int n1, const int n2, const int n3,
84
const int leftdomain, const int rightdomain, const int bc = -1,
85
const double reffac = 1.,
86
const bool hprefleft = false, const bool hprefright = false,
87
const int copyfrom = -1);
88
void AppendDiscretePointsSegment (const ARRAY< Point<2> > & points,
89
const int leftdomain, const int rightdomain, const int bc = -1,
90
const double reffac = 1.,
91
const bool hprefleft = false, const bool hprefright = false,
92
const int copyfrom = -1);
93
94
};
95
96
97
void MeshFromSpline2D (SplineGeometry2d & geometry,
98
Mesh *& mesh,
99
MeshingParameters & mp);
100
101
#endif
102
103
#endif
104
105