Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lineordering.hpp
Go to the documentation of this file.
1 /* -*- mode: c++; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; show-trailing-whitespace: t -*-
2 
3  This file is part of the Feel library
4 
5  Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
6  Date: 2010-11-28
7 
8  Copyright (C) 2010 Université Joseph Fourier (Grenoble I)
9 
10  This library is free software; you can redistribute it and/or
11  modify it under the terms of the GNU Lesser General Public
12  License as published by the Free Software Foundation; either
13  version 2.1 of the License, or (at your option) any later version.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */
29 #ifndef __LineOrdering_H
30 #define __LineOrdering_H 1
31 
32 namespace Feel
33 {
35 namespace details
36 {
37 struct vertex
38 {
39  static uint16_type f2p( uint16_type /*f*/, uint16_type /*p*/ )
40  {
42  }
43  static uint16_type f2e( uint16_type /*f*/, uint16_type /*e*/ )
44  {
45  throw std::logic_error( "invalid call to line::f2e" );
47  }
48  static uint16_type e2p( uint16_type /*e*/, uint16_type /*p*/ )
49  {
51  }
52 
53  std::vector<uint16_type> entity( uint16_type /*topo_dim*/, uint16_type /*id*/ ) const
54  {
55  std::vector<uint16_type> __entity( 1 );
56  __entity[0] = 0;
57  return __entity;
58  }
59 };
60 
64 template<uint16_type Order>
65 struct line
66 {
67  //static uint16_type f2p( uint16_type /*f*/, uint16_type /*p*/ ) { throw std::logic_error( "invalid call to line::f2p" ); return uint16_type(-1); }
68  static uint16_type f2p( uint16_type f, uint16_type /*p*/ )
69  {
70  return f;
71  }
72  static uint16_type f2e( uint16_type /*f*/, uint16_type /*e*/ )
73  {
74  throw std::logic_error( "invalid call to line::f2e" );
75  return uint16_type( -1 );
76  }
77 
78  static uint16_type e2p( uint16_type /*e*/, uint16_type p )
79  {
80  return __e2p[p];
81  }
82 
83  static const uint16_type __e2p[11];
84 
85  std::vector<uint16_type> entity( uint16_type /*topo_dim*/, uint16_type /*id*/ ) const
86  {
87  std::vector<uint16_type> __entity( 2 );
88  __entity[0] = 0;
89  __entity[1] = 1;
90  return __entity;
91  }
92 };
93 template<uint16_type Order> const uint16_type line<Order>::__e2p[11] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
94 }
96 }
97 #endif /* __LineOrdering_H */
const uint16_type invalid_uint16_type_value
Definition: feelcore/feel.hpp:338

Generated on Sun Dec 22 2013 13:11:06 for Feel++ by doxygen 1.8.5