Flow123d  release_1.8.2-1603-g0109a2b
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 "side_impl.hh"
24 
25 inline unsigned int Element::dim() const {
26  return dim_;
27 }
28 
29 
30 inline unsigned int Element::index() const {
31  return mesh_->element.index( this );
32 }
33 
34 
35 inline unsigned int Element::n_nodes() const {
36  return dim()+1;
37 }
38 
39 
40 
41 inline unsigned int Element::n_sides() const {
42  return dim()+1;
43 }
44 
45 
46 
47 inline SideIter Element::side(const unsigned int loc_index) {
48  return SideIter( Side(this, loc_index) );
49 }
50 
51 inline const SideIter Element::side(const unsigned int loc_index) const {
52  return SideIter( Side(this, loc_index) );
53 }
54 #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:126
Mesh * mesh_
Definition: elements.h:120
ElementVector element
Vector of elements of the mesh.
Definition: mesh.h:225