Flow123d  release_2.1.0-87-gfbc1563
boundaries.cc
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 boundaries.cc
15  * @ingroup mesh
16  * @brief Boundary conditions
17  */
18 
19 #include "system/system.hh"
20 #include "mesh/mesh.h"
21 #include "mesh/boundaries.h"
22 #include "mesh/accessors.hh"
23 
24 
26 
27 
29 : edge_idx_(Mesh::undef_idx), bc_ele_idx_(Mesh::undef_idx),
30  mesh_(NULL)
31 {}
32 
33 
35  return element()->region();
36 }
37 
38 
40  return &( mesh_->bc_elements[bc_ele_idx_] );
41 }
42 
44  return &( mesh_->edges[edge_idx_] );
45 }
46 
48 {
49  return mesh_->element_accessor(bc_ele_idx_, true);
50 }
51 
52 //-----------------------------------------------------------------------------
53 // vim: set cindent:
54 
Definition: mesh.h:95
Definition: edges.h:26
ElementAccessor< 3 > element_accessor(unsigned int idx, bool boundary=false)
Definition: mesh.cc:703
Region region()
Definition: boundaries.cc:34
Edge * edge()
Definition: boundaries.cc:43
Region region() const
Definition: elements.cc:155
Element * element()
Definition: boundaries.cc:39
ElementVector bc_elements
Definition: mesh.h:224
unsigned int edge_idx_
Definition: boundaries.h:75
unsigned int bc_ele_idx_
Definition: boundaries.h:76
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
Definition: mesh.h:227
Mesh * mesh_
Definition: boundaries.h:77
ElementAccessor< 3 > element_accessor()
Definition: boundaries.cc:47
static flow::VectorId< unsigned int > id_to_bcd
Definition: boundaries.h:53