Flow123d  last_with_con_2.0.0-4-g42e6930
element_impls.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 element_impls.hh
15  * @brief
16  */
17 
18 #ifndef ELEMENT_IMPLS_HH_
19 #define ELEMENT_IMPLS_HH_
20 
21 #include "elements.h"
22 #include "sides.h"
23 #include "mesh/mesh.h"
24 #include "side_impl.hh"
25 
26 inline unsigned int Element::dim() const {
27  return dim_;
28 }
29 
30 
31 inline unsigned int Element::index() const {
32  return mesh_->element.index( this );
33 }
34 
35 
36 inline unsigned int Element::n_nodes() const {
37  return dim()+1;
38 }
39 
40 
41 
42 inline unsigned int Element::n_sides() const {
43  return dim()+1;
44 }
45 
46 
47 
48 inline SideIter Element::side(const unsigned int loc_index) {
49  return SideIter( Side(this, loc_index) );
50 }
51 
52 inline const SideIter Element::side(const unsigned int loc_index) const {
53  return SideIter( Side(this, loc_index) );
54 }
55 #endif /* ELEMENT_IMPLS_HH_ */
Definition: sides.h:31
unsigned int n_nodes() const
unsigned int index() const
unsigned int dim() const
unsigned int n_sides() const
unsigned int index(const T *pointer) const
Definition: sys_vector.hh:373
SideIter side(const unsigned int loc_index)
unsigned int dim_
Definition: elements.h:175
Mesh * mesh_
Definition: elements.h:169
ElementVector element
Vector of elements of the mesh.
Definition: mesh.h:221