Flow123d  jenkins-Flow123d-linux-release-multijob-198
neighbours_impl.hh
Go to the documentation of this file.
1 /*
2  * neigbours_impl.hh
3  *
4  * Created on: Jun 28, 2012
5  * Author: jb
6  */
7 
8 #ifndef NEIGBOURS_IMPL_HH_
9 #define NEIGBOURS_IMPL_HH_
10 
11 #include "mesh/sides.h"
12 #include "mesh/edges.h"
13 
14 
15  // side of the edge in higher dim. mesh
17  ASSERT( edge()->n_sides == 1 , "VB neighbouring with %d sides.\n", edge()->n_sides);
18  //DBGMSG("VB neighbouring with %d sides.\n", edge_->n_sides);
19  return edge()->side(0);
20  }
21 
22  inline unsigned int Neighbour::edge_idx() {
23  return edge_idx_;
24  }
25 
26  // edge of lower dimensional mesh in VB neigh.
27  inline Edge *Neighbour::edge() {
28  return &( element_->mesh_->edges[ edge_idx_] );
29  }
30 
31  // element of higher dimension mesh in VB neigh.
33  return element_;
34  }
35 
36 #endif /* NEIGBOURS_IMPL_HH_ */
Edge * edge()
Definition: edges.h:38
unsigned int edge_idx_
Definition: neighbours.h:147
#define ASSERT(...)
Definition: global_defs.h:121
unsigned int edge_idx()
SideIter side()
ElementIter element()
Mesh * mesh_
Definition: elements.h:132
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
Definition: mesh.h:216
ElementIter element_
Definition: neighbours.h:148
SideIter side(const unsigned int i) const
Definition: edges.h:43