Flow123d  release_3.0.0-1106-ga3b2e4c
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/side_impl.hh"
21 #include "mesh/mesh.h"
22 #include "mesh/boundaries.h"
23 #include "mesh/accessors.hh"
24 
25 
27 
28 
30 : edge_idx_(Mesh::undef_idx), bc_ele_idx_(Mesh::undef_idx),
31  mesh_(NULL)
32 {}
33 
34 
36  return element_accessor().region();
37 }
38 
39 
41  return &( mesh_->element_vec_[bc_ele_idx_] );
42 }
43 
45  return &( mesh_->edges[edge_idx_] );
46 }
47 
49 {
51 }
52 
53 //-----------------------------------------------------------------------------
54 // vim: set cindent:
55 
vector< Element > element_vec_
Definition: mesh.h:508
Definition: mesh.h:76
Definition: edges.h:26
Region region()
Definition: boundaries.cc:35
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
Definition: mesh.cc:726
Edge * edge()
Definition: boundaries.cc:44
Element * element()
Definition: boundaries.cc:40
unsigned int edge_idx_
Definition: boundaries.h:78
Region region() const
Definition: accessors.hh:95
unsigned int bc_ele_idx_
Definition: boundaries.h:79
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
Definition: mesh.h:252
Mesh * mesh_
Definition: boundaries.h:80
ElementAccessor< 3 > element_accessor()
Definition: boundaries.cc:48
static flow::VectorId< unsigned int > id_to_bcd
Definition: boundaries.h:56