Flow123d  release_2.2.0-41-g0958a8d
neighbours_impl.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file neighbours_impl.hh
15  * @brief
16  */
17 
18 #ifndef NEIGBOURS_IMPL_HH_
19 #define NEIGBOURS_IMPL_HH_
20 
21 #include "mesh/sides.h"
22 #include "mesh/edges.h"
23 
24 
25  // side of the edge in higher dim. mesh
27  OLD_ASSERT( edge()->n_sides == 1 , "VB neighbouring with %d sides.\n", edge()->n_sides);
28  //DebugOut().fmt("VB neighbouring with {} sides.\n", edge_->n_sides);
29  return edge()->side(0);
30  }
31 
32  inline unsigned int Neighbour::edge_idx() {
33  return edge_idx_;
34  }
35 
36  // edge of lower dimensional mesh in VB neigh.
37  inline Edge *Neighbour::edge() {
38  return &( element_->mesh_->edges[ edge_idx_] );
39  }
40 
41  // element of higher dimension mesh in VB neigh.
43  return element_;
44  }
45 
46 #endif /* NEIGBOURS_IMPL_HH_ */
Edge * edge()
Definition: edges.h:26
#define OLD_ASSERT(...)
Definition: global_defs.h:131
unsigned int edge_idx_
Definition: neighbours.h:135
unsigned int edge_idx()
SideIter side()
ElementIter element()
Mesh * mesh_
Definition: elements.h:169
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
Definition: mesh.h:239
ElementIter element_
Definition: neighbours.h:136
SideIter side(const unsigned int i) const
Definition: edges.h:31