Ice Sheet System Model  4.18
Code documentation
AdjacentTriangle.cpp
Go to the documentation of this file.
1 #include <cstdio>
2 #include <cstring>
3 #include <cmath>
4 #include <ctime>
5 
6 #include "AdjacentTriangle.h"
7 #include "Mesh.h"
8 
9 namespace bamg {
10 
11  /*Constructors/Destructors*/
12  //See header file
13 
14  /*Methods*/
15  int AdjacentTriangle::Locked() const {/*{{{*/
16  return t->AdjEdgeIndex[a] & 4;
17  }
18  /*}}}*/
20  // take all flag except MarkUnSwap
21  return t->AdjEdgeIndex[a] & 1012;
22  }
23  /*}}}*/
25  t->SetLocked(a);
26  }
27  /*}}}*/
29  return t->Adj(a);
30  }
31  /*}}}*/
32  BamgVertex* AdjacentTriangle::EdgeVertex(const int & i) const {/*{{{*/
33  return t->vertices[VerticesOfTriangularEdge[a][i]];
34  }
35  /*}}}*/
36  long long & AdjacentTriangle::det() const {/*{{{*/
37  return t->det;
38  }
39  /*}}}*/
40  int AdjacentTriangle::swap(){/*{{{*/
41  return t->swap(a);
42  }
43  /*}}}*/
44  void AdjacentTriangle::SetAdj2(const AdjacentTriangle & ta, int l ){/*{{{*/
45  //set Adjacent Triangle of a triangle
46  if(t) {
47  t->adj[a]=ta.t;
48  t->AdjEdgeIndex[a]=ta.a|l;
49  }
50  if(ta.t) {
51  ta.t->adj[ta.a] = t ;
52  ta.t->AdjEdgeIndex[ta.a] = a| l ;
53  }
54  }
55  /*}}}*/
56 
57 }
bamg::AdjacentTriangle::det
long long & det() const
Definition: AdjacentTriangle.cpp:36
bamg::BamgVertex
Definition: BamgVertex.h:15
bamg::AdjacentTriangle::a
int a
Definition: AdjacentTriangle.h:16
bamg
Definition: AdjacentTriangle.cpp:9
bamg::AdjacentTriangle::Adj
AdjacentTriangle Adj() const
Definition: AdjacentTriangle.cpp:28
bamg::AdjacentTriangle::Locked
int Locked() const
Definition: AdjacentTriangle.cpp:15
bamg::AdjacentTriangle
Definition: AdjacentTriangle.h:12
bamg::AdjacentTriangle::SetLock
void SetLock()
Definition: AdjacentTriangle.cpp:24
bamg::Triangle::Adj
AdjacentTriangle Adj(int i) const
Definition: Triangle.cpp:48
bamg::Triangle::swap
int swap(short a1, int=0)
Definition: Triangle.cpp:226
bamg::Triangle::vertices
BamgVertex * vertices[3]
Definition: Triangle.h:18
bamg::Triangle::SetLocked
void SetLocked(int a)
Definition: Triangle.cpp:202
bamg::AdjacentTriangle::t
Triangle * t
Definition: AdjacentTriangle.h:15
bamg::Triangle::adj
Triangle * adj[3]
Definition: Triangle.h:19
Mesh.h
bamg::AdjacentTriangle::SetAdj2
void SetAdj2(const AdjacentTriangle &ta, int l=0)
Definition: AdjacentTriangle.cpp:44
bamg::Triangle::det
long long det
Definition: Triangle.h:23
bamg::VerticesOfTriangularEdge
static const short VerticesOfTriangularEdge[3][2]
Definition: macros.h:13
bamg::Triangle::AdjEdgeIndex
short AdjEdgeIndex[3]
Definition: Triangle.h:20
bamg::AdjacentTriangle::EdgeVertex
BamgVertex * EdgeVertex(const int &i) const
Definition: AdjacentTriangle.cpp:32
bamg::AdjacentTriangle::swap
int swap()
Definition: AdjacentTriangle.cpp:40
bamg::AdjacentTriangle::GetAllFlag_UnSwap
int GetAllFlag_UnSwap() const
Definition: AdjacentTriangle.cpp:19
AdjacentTriangle.h