Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Data Fields
bamg::Edge Class Reference

#include <Edge.h>

Public Member Functions

BamgVertexoperator[] (int i)
 
BamgVertexoperator() (int i)
 
R2 operator() (double t) const
 
const BamgVertexoperator[] (int i) const
 
void Renumbering (BamgVertex *vb, BamgVertex *ve, long *renu)
 
int Intersection (const Edge &e)
 
void Set (const Mesh &, long, Mesh &)
 
void Echo (void)
 

Data Fields

BamgVertexv [2]
 
long ReferenceNumber
 
GeomEdgeGeomEdgeHook
 
Edgeadj [2]
 

Detailed Description

Definition at line 12 of file Edge.h.

Member Function Documentation

◆ operator[]() [1/2]

BamgVertex& bamg::Edge::operator[] ( int  i)
inline

Definition at line 21 of file Edge.h.

21 {return *v[i]; };

◆ operator()() [1/2]

BamgVertex* bamg::Edge::operator() ( int  i)
inline

Definition at line 22 of file Edge.h.

22 {return v[i];};

◆ operator()() [2/2]

R2 bamg::Edge::operator() ( double  t) const

◆ operator[]() [2/2]

const BamgVertex& bamg::Edge::operator[] ( int  i) const
inline

Definition at line 24 of file Edge.h.

24 {return *v[i];};

◆ Renumbering()

void bamg::Edge::Renumbering ( BamgVertex vb,
BamgVertex ve,
long *  renu 
)

Definition at line 34 of file Edge.cpp.

34  {/*{{{*/
35 
36  if (v[0] >=vb && v[0] <ve) v[0] = vb + renu[v[0]-vb];
37  if (v[1] >=vb && v[1] <ve) v[1] = vb + renu[v[1]-vb];
38 
39  }

◆ Intersection()

int bamg::Edge::Intersection ( const Edge e)

Definition at line 41 of file Edge.cpp.

41  { /*{{{*/
42 
43  /*some shecks*/
44  if (!(adj[0]==&e || adj[1]==&e)){ _error_("Intersection bug"); }
45  _assert_(adj[0]==&e || adj[1]==&e);
46 
47  return adj[0]==&e?0:1;
48  }

◆ Set()

void bamg::Edge::Set ( const Mesh Th,
long  i,
Mesh ThNew 
)

Definition at line 16 of file Edge.cpp.

16  { /*{{{*/
17  *this = Th.edges[i];
18  v[0] = ThNew.vertices + Th.GetId(v[0]);
19  v[1] = ThNew.vertices + Th.GetId(v[1]);
20  if (GeomEdgeHook)
21  GeomEdgeHook = ThNew.Gh.edges+Th.Gh.GetId(GeomEdgeHook);
22  if (adj[0]) adj[0] = ThNew.edges + Th.GetId(adj[0]);
23  if (adj[1]) adj[1] = ThNew.edges + Th.GetId(adj[1]);
24  }

◆ Echo()

void bamg::Edge::Echo ( void  )

Definition at line 26 of file Edge.cpp.

26  { /*{{{*/
27  _printf_("Edge:\n");
28  _printf_(" pointers towards two vertices: " << v[0] << " " << v[1] << "\n");
29  _printf_(" ReferenceNumber = " << ReferenceNumber << "\n");
30  _printf_(" GeomEdgeHook = " << GeomEdgeHook << "\n");
31  _printf_(" two adjacent edges on the same curve: " << adj[0] << " " << adj[1] << "\n");
32  }

Field Documentation

◆ v

BamgVertex* bamg::Edge::v[2]

Definition at line 15 of file Edge.h.

◆ ReferenceNumber

long bamg::Edge::ReferenceNumber

Definition at line 16 of file Edge.h.

◆ GeomEdgeHook

GeomEdge* bamg::Edge::GeomEdgeHook

Definition at line 17 of file Edge.h.

◆ adj

Edge* bamg::Edge::adj[2]

Definition at line 18 of file Edge.h.


The documentation for this class was generated from the following files:
_assert_
#define _assert_(ignore)
Definition: exceptions.h:37
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
bamg::Edge::adj
Edge * adj[2]
Definition: Edge.h:18
bamg::Edge::v
BamgVertex * v[2]
Definition: Edge.h:15
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
bamg::Edge::ReferenceNumber
long ReferenceNumber
Definition: Edge.h:16
bamg::Edge::GeomEdgeHook
GeomEdge * GeomEdgeHook
Definition: Edge.h:17