Ice Sheet System Model  4.18
Code documentation
ListofIntersectionTriangles.h
Go to the documentation of this file.
1 #ifndef _LISTOFINTERSECTIONTRIANGLES_H_
2 #define _LISTOFINTERSECTIONTRIANGLES_H_
3 
4 #include "./include.h"
5 
6 namespace bamg {
7 
8  class Triangle;
9 
11 
13 
14  public:
16  double bary[3]; // use if t != 0
17  R2 x;
19  double s; // curvilinear coordinate
20  double sp; // length of the previous segment in m
21  double sn; // length of the next segment in m
22  };
23 
25 
26  public:
28  double sBegin ,sEnd; // abscisse of the seg on edge parameter
29  double lBegin ,lEnd; // length abscisse set in ListofIntersectionTriangles::Length
30  int last; // last index in ListofIntersectionTriangles for this Sub seg of edge
31 
32  //Methods
33  R2 F(double s){
34  double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
35  if (lBegin>s || s>lEnd){
36  _error_("lBegin>s || s>lEnd");
37  }
38  return e->F(sBegin*c0+sEnd*c1);
39  }
40  };
41 
42  public:
43 
44  int MaxSize;
45  int Size;
46  double len;
47  int state;
49  int NbSeg;
50  int MaxNbSeg;
52 
53  //Constructors/Destructors
54  ListofIntersectionTriangles(int n=256,int m=16);
56 
57  //Operators
59  operator int&() {return Size;}
60 
61  //Methods
62  void Init();
63  int NewItem(Triangle *tt,double d0,double d1,double d2);
64  int NewItem(R2 ,const Metric &);
65  void SplitEdge(Mesh &,const R2 &,const R2 &,int nbegin=0);
66  double Length();
67  long NewPoints(BamgVertex *,long &nbv,long maxnbv);
68  void ReShape();
69  };
70 
71 }
72 #endif
bamg::BamgVertex
Definition: BamgVertex.h:15
bamg::ListofIntersectionTriangles::operator[]
IntersectionTriangles & operator[](int i)
Definition: ListofIntersectionTriangles.h:58
bamg
Definition: AdjacentTriangle.cpp:9
bamg::GeomEdge
Definition: GeomEdge.h:11
bamg::Triangle
Definition: Triangle.h:13
bamg::ListofIntersectionTriangles::IntersectionTriangles::bary
double bary[3]
Definition: ListofIntersectionTriangles.h:16
bamg::ListofIntersectionTriangles
Definition: ListofIntersectionTriangles.h:10
bamg::ListofIntersectionTriangles::IntersectionTriangles::x
R2 x
Definition: ListofIntersectionTriangles.h:17
bamg::ListofIntersectionTriangles::IntersectionTriangles::s
double s
Definition: ListofIntersectionTriangles.h:19
bamg::GeomEdge::F
R2 F(double theta) const
Definition: GeomEdge.cpp:20
bamg::ListofIntersectionTriangles::SegInterpolation::sBegin
double sBegin
Definition: ListofIntersectionTriangles.h:28
bamg::ListofIntersectionTriangles::lIntTria
IntersectionTriangles * lIntTria
Definition: ListofIntersectionTriangles.h:48
bamg::ListofIntersectionTriangles::NewItem
int NewItem(Triangle *tt, double d0, double d1, double d2)
Definition: ListofIntersectionTriangles.cpp:77
bamg::ListofIntersectionTriangles::SegInterpolation::lEnd
double lEnd
Definition: ListofIntersectionTriangles.h:29
bamg::ListofIntersectionTriangles::IntersectionTriangles
Definition: ListofIntersectionTriangles.h:12
bamg::ListofIntersectionTriangles::Init
void Init()
Definition: ListofIntersectionTriangles.cpp:25
bamg::ListofIntersectionTriangles::IntersectionTriangles::t
Triangle * t
Definition: ListofIntersectionTriangles.h:15
bamg::ListofIntersectionTriangles::NewPoints
long NewPoints(BamgVertex *, long &nbv, long maxnbv)
Definition: ListofIntersectionTriangles.cpp:119
bamg::Metric
Definition: Metric.h:17
bamg::ListofIntersectionTriangles::IntersectionTriangles::sn
double sn
Definition: ListofIntersectionTriangles.h:21
bamg::ListofIntersectionTriangles::Size
int Size
Definition: ListofIntersectionTriangles.h:45
bamg::ListofIntersectionTriangles::~ListofIntersectionTriangles
~ListofIntersectionTriangles()
Definition: ListofIntersectionTriangles.cpp:18
bamg::ListofIntersectionTriangles::ListofIntersectionTriangles
ListofIntersectionTriangles(int n=256, int m=16)
Definition: ListofIntersectionTriangles.cpp:13
bamg::ListofIntersectionTriangles::MaxNbSeg
int MaxNbSeg
Definition: ListofIntersectionTriangles.h:50
bamg::ListofIntersectionTriangles::state
int state
Definition: ListofIntersectionTriangles.h:47
bamg::ListofIntersectionTriangles::SegInterpolation
Definition: ListofIntersectionTriangles.h:24
bamg::Mesh
Definition: Mesh.h:21
bamg::ListofIntersectionTriangles::IntersectionTriangles::m
Metric m
Definition: ListofIntersectionTriangles.h:18
bamg::ListofIntersectionTriangles::lSegsI
SegInterpolation * lSegsI
Definition: ListofIntersectionTriangles.h:51
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
include.h
prototypes for include.h
bamg::ListofIntersectionTriangles::len
double len
Definition: ListofIntersectionTriangles.h:46
bamg::ListofIntersectionTriangles::Length
double Length()
Definition: ListofIntersectionTriangles.cpp:31
bamg::ListofIntersectionTriangles::SegInterpolation::lBegin
double lBegin
Definition: ListofIntersectionTriangles.h:29
bamg::ListofIntersectionTriangles::IntersectionTriangles::sp
double sp
Definition: ListofIntersectionTriangles.h:20
bamg::ListofIntersectionTriangles::SplitEdge
void SplitEdge(Mesh &, const R2 &, const R2 &, int nbegin=0)
Definition: ListofIntersectionTriangles.cpp:190
bamg::P2< double, double >
bamg::ListofIntersectionTriangles::MaxSize
int MaxSize
Definition: ListofIntersectionTriangles.h:44
bamg::ListofIntersectionTriangles::SegInterpolation::F
R2 F(double s)
Definition: ListofIntersectionTriangles.h:33
bamg::ListofIntersectionTriangles::NbSeg
int NbSeg
Definition: ListofIntersectionTriangles.h:49
bamg::ListofIntersectionTriangles::SegInterpolation::last
int last
Definition: ListofIntersectionTriangles.h:30
bamg::ListofIntersectionTriangles::ReShape
void ReShape()
Definition: ListofIntersectionTriangles.cpp:175
bamg::ListofIntersectionTriangles::SegInterpolation::sEnd
double sEnd
Definition: ListofIntersectionTriangles.h:28
bamg::ListofIntersectionTriangles::SegInterpolation::e
GeomEdge * e
Definition: ListofIntersectionTriangles.h:27