1
#ifndef _RHEO_NUMBERING_H
2
#define _RHEO_NUMBERING_H
4
/// This file is part of Rheolef.
6
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
8
/// Rheolef is free software; you can redistribute it and/or modify
9
/// it under the terms of the GNU General Public License as published by
10
/// the Free Software Foundation; either version 2 of the License, or
11
/// (at your option) any later version.
13
/// Rheolef is distributed in the hope that it will be useful,
14
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
/// GNU General Public License for more details.
18
/// You should have received a copy of the GNU General Public License
19
/// along with Rheolef; if not, write to the Free Software
20
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
/// =========================================================================
23
#include "rheolef/numbering_rep.h"
24
#include "rheolef/smart_pointer.h"
27
NAME: @code{numbering} - global degree of freedom numbering
28
@cindex numbering, global degree of freedom
29
@cindex polynomial basis
33
The @code{numbering} class defines methods that furnish global
34
numbering of degrees of freedom. This numbering depends upon
35
the degrees of polynoms on elements and upon the continuity
36
requirement at inter-element boundary. For instance the
37
"P1" continuous finite element approximation has one degree
38
of freedom per vertice of the mesh, while its discontinuous
39
counterpart has dim(basis) times the number of elements of the
40
mesh, where dim(basis) is the size of the local finite element basis.
43
LMC-IMAG, 38041 Grenoble cedex 9, France
44
| Pierre.Saramito@imag.fr
50
class numbering : public smart_pointer<numbering_rep> {
55
typedef size_t size_type;
59
numbering (std::string name = "");
60
numbering (numbering_rep* ptr);
62
virtual ~numbering() {}
66
std::string name() const;
69
size_type mesh_map_dimension,
70
const size_type* mesh_n_geo,
71
const size_type* mesh_n_element) const;
75
const size_type* mesh_n_geo,
76
const size_type* mesh_n_element,
78
size_type i_dof_local) const;
82
const size_type* mesh_n_geo,
83
const size_type* mesh_n_element,
85
std::vector<size_type>& i_dof) const;
89
void dump(std::ostream& out = std::cerr) const;
92
// -----------------------------------------------------------
94
// -----------------------------------------------------------
96
numbering::numbering(std::string name)
97
: smart_pointer<numbering_rep> (numbering_rep::make_ptr(name))
101
numbering::numbering (numbering_rep* ptr)
102
: smart_pointer<numbering_rep> (ptr)
107
numbering::name() const
109
return data().name();
113
numbering::dump(std::ostream& out) const
115
out << "numbering " << name() << std::endl;
120
size_type mesh_map_dimension,
121
const size_type* mesh_n_geo,
122
const size_type* mesh_n_element) const
124
return data().ndof (mesh_map_dimension, mesh_n_geo, mesh_n_element);
129
const size_type* mesh_n_geo,
130
const size_type* mesh_n_element,
131
const geo_element& K,
132
size_type i_dof_local) const
134
return data().idof (mesh_n_geo, mesh_n_element, K, i_dof_local);
139
const size_type* mesh_n_geo,
140
const size_type* mesh_n_element,
141
const geo_element& K,
142
std::vector<size_type>& i_dof) const
144
return data().idof (mesh_n_geo, mesh_n_element, K, i_dof);
146
#endif // _RHEO_NUMBERING_H