18
18
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
20
/// =========================================================================
21
#include "P1d_numbering.h"
26
numbering_P1d::name() const
30
numbering_P1d::size_type
32
const size_type* mesh_n_geo,
33
const size_type* mesh_n_element,
35
size_type i_dof_local) const
38
* WARNING: mixed mesh with t+q or T+P+H not supported too
39
* or mixtures or e+t, e+t+T etc...
40
* This requires ordered K_idx : all "e" and then all "t",
41
* and then all "q" ... => geo format version 3 ?
44
case reference_element::p: return K.index() + i_dof_local;
45
case reference_element::e: return 2*K.index() + i_dof_local;
46
case reference_element::t: return 3*K.index() + i_dof_local;
47
case reference_element::q: return 4*K.index() + i_dof_local;
48
case reference_element::T: return 4*K.index() + i_dof_local;
49
case reference_element::P: return 6*K.index() + i_dof_local;
50
case reference_element::H: return 8*K.index() + i_dof_local;
52
error_macro ("unexpected element type `" << K.type() << "'");
59
const size_type* mesh_n_geo,
60
const size_type* mesh_n_element,
62
vector<size_type>& i_dof) const
64
for (size_type i_dof_local = 0; i_dof_local < K.size(); i_dof_local++)
66
= numbering_P1d::idof (mesh_n_geo, mesh_n_element, K, i_dof_local);
68
numbering_P1d::size_type
70
size_type mesh_map_dimension,
71
const size_type* mesh_n_geo,
72
const size_type* mesh_n_element) const
74
switch (mesh_map_dimension) {
75
case 0: return mesh_n_element[reference_element::p];
76
case 1: return 2*mesh_n_element[reference_element::e];
77
case 2: return 3*mesh_n_element[reference_element::t]
78
+ 4*mesh_n_element[reference_element::q];
79
case 3: return 4*mesh_n_element[reference_element::T]
80
+ 6*mesh_n_element[reference_element::P]
81
+ 8*mesh_n_element[reference_element::H];
83
error_macro ("unexpected dimension" << mesh_map_dimension);
89
numbering_P1d::is_continuous () const
94
} // namespace rheolef
21
#include "rheolef/config.h"
23
#ifdef _RHEOLEF_USE_NEW_CODE
24
#include "P1d_numbering_v2.cc"
26
#include "P1d_numbering_v1.cc"