Ice Sheet System Model  4.18
Code documentation
Geometry.h
Go to the documentation of this file.
1 #ifndef _GEOMETRY_H_
2 #define _GEOMETRY_H_
3 
4 #include "./include.h"
5 #include "./BamgGeom.h"
6 #include "./BamgOpts.h"
7 #include "./GeomVertex.h"
8 #include "./GeomEdge.h"
9 #include "./Curve.h"
10 
11 namespace bamg {
12 
13  class Triangle;
14  class BamgQuadtree;
15  class GeomSubDomain;
16  class Edge;
17 
18  class Geometry {
19 
20  public:
21 
22  long NbRef; // counter of ref on the this class if 0 we can delete
23  long nbv; // number of vertices
24  long nbe; // number of edges
26  long nbcurves;
32  R2 pmin,pmax; // domain extrema coordinates
33  double coefIcoor; // coef to integer coordinates;
34 
35  //Constructor/Destructors
36  ~Geometry();
37  Geometry();
38  Geometry(const Geometry & Gh);
39  Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts);
40 
41  //Operators
42  const GeomVertex &operator[](long i) const { return vertices[i]; };
43  GeomVertex &operator[](long i) { return vertices[i]; };
44  const GeomEdge &operator()(long i) const { return edges[i]; };
45  GeomEdge &operator()(long i) { return edges[i]; };
46 
47  //Methods
48  void Echo();
49  I2 R2ToI2(const R2 &P) const;
50  double MinimalHmin();
51  double MaximalHmax();
52  void ReadGeometry(BamgGeom *bamggeom, BamgOpts*bamgopts);
53  void Init(void);
54  void PostRead(bool checkcurve=false);
55  long GetId(const GeomVertex &t) const;
56  long GetId(const GeomVertex *t) const;
57  long GetId(const GeomEdge &t) const;
58  long GetId(const GeomEdge *t) const;
59  long GetId(const Curve *c) const;
60  void UnMarkEdges();
61  GeomEdge *ProjectOnCurve(const Edge &,double,BamgVertex &,VertexOnGeom &) const;
62  void WriteGeometry(BamgGeom *bamggeom, BamgOpts*bamgopts);
63  };
64 
65 }
66 #endif
GeomEdge.h
bamg::BamgVertex
Definition: BamgVertex.h:15
bamg::Geometry::MinimalHmin
double MinimalHmin()
Definition: Geometry.cpp:416
bamg::Geometry::pmin
R2 pmin
Definition: Geometry.h:32
bamg::Geometry::MaximalHmax
double MaximalHmax()
Definition: Geometry.cpp:422
bamg::Geometry
Definition: Geometry.h:18
bamg::Geometry::operator()
GeomEdge & operator()(long i)
Definition: Geometry.h:45
bamg::Geometry::nbsubdomains
long nbsubdomains
Definition: Geometry.h:25
BamgOpts.h
place holder for optimization function arguments
bamg
Definition: AdjacentTriangle.cpp:9
bamg::Geometry::edges
GeomEdge * edges
Definition: Geometry.h:28
BamgGeom.h
bamg::Geometry::pmax
R2 pmax
Definition: Geometry.h:32
bamg::Geometry::vertices
GeomVertex * vertices
Definition: Geometry.h:27
GeomVertex.h
bamg::Geometry::operator()
const GeomEdge & operator()(long i) const
Definition: Geometry.h:44
bamg::GeomEdge
Definition: GeomEdge.h:11
bamg::Geometry::Echo
void Echo()
Definition: Geometry.cpp:382
bamg::Geometry::subdomains
GeomSubDomain * subdomains
Definition: Geometry.h:30
bamg::Geometry::ProjectOnCurve
GeomEdge * ProjectOnCurve(const Edge &, double, BamgVertex &, VertexOnGeom &) const
Definition: Geometry.cpp:781
bamg::VertexOnGeom
Definition: VertexOnGeom.h:13
bamg::Geometry::PostRead
void PostRead(bool checkcurve=false)
Definition: Geometry.cpp:440
bamg::Geometry::ReadGeometry
void ReadGeometry(BamgGeom *bamggeom, BamgOpts *bamgopts)
Definition: Geometry.cpp:54
bamg::BamgQuadtree
Definition: BamgQuadtree.h:10
bamg::Geometry::quadtree
BamgQuadtree * quadtree
Definition: Geometry.h:29
bamg::Geometry::curves
Curve * curves
Definition: Geometry.h:31
bamg::Geometry::GetId
long GetId(const GeomVertex &t) const
Definition: Geometry.cpp:425
bamg::Geometry::operator[]
GeomVertex & operator[](long i)
Definition: Geometry.h:43
bamg::Geometry::UnMarkEdges
void UnMarkEdges()
Definition: Geometry.cpp:926
BamgOpts
Definition: BamgOpts.h:8
bamg::Edge
Definition: Edge.h:12
bamg::Geometry::R2ToI2
I2 R2ToI2(const R2 &P) const
Definition: Geometry.cpp:914
bamg::Geometry::operator[]
const GeomVertex & operator[](long i) const
Definition: Geometry.h:42
bamg::GeomVertex
Definition: GeomVertex.h:11
BamgGeom
Definition: BamgGeom.h:7
bamg::Geometry::WriteGeometry
void WriteGeometry(BamgGeom *bamggeom, BamgOpts *bamgopts)
Definition: Geometry.cpp:266
include.h
prototypes for include.h
bamg::Geometry::nbe
long nbe
Definition: Geometry.h:24
bamg::Geometry::nbcurves
long nbcurves
Definition: Geometry.h:26
bamg::GeomSubDomain
Definition: GeomSubDomain.h:11
Curve.h
bamg::Geometry::nbv
long nbv
Definition: Geometry.h:23
bamg::P2< double, double >
bamg::Geometry::Geometry
Geometry()
Definition: Geometry.cpp:12
bamg::Geometry::NbRef
long NbRef
Definition: Geometry.h:22
bamg::Geometry::Init
void Init(void)
Definition: Geometry.cpp:401
bamg::Geometry::coefIcoor
double coefIcoor
Definition: Geometry.h:33
bamg::Geometry::~Geometry
~Geometry()
Definition: Geometry.cpp:41
bamg::Curve
Definition: Curve.h:12