2
/// This file is part of Rheolef.
4
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
6
/// Rheolef is free software; you can redistribute it and/or modify
7
/// it under the terms of the GNU General Public License as published by
8
/// the Free Software Foundation; either version 2 of the License, or
9
/// (at your option) any later version.
11
/// Rheolef is distributed in the hope that it will be useful,
12
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
/// GNU General Public License for more details.
16
/// You should have received a copy of the GNU General Public License
17
/// along with Rheolef; if not, write to the Free Software
18
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
/// =========================================================================
21
#include "rheolef/numbering.h"
22
using namespace rheolef;
26
main (int argc, char **argv)
28
environment distributed (argc, argv);
30
cerr << "usage: " << argv[0] << " <base>" << endl;
34
numbering<Float> num(argv[1]);
37
size_t size_by_dimension [4];
38
size_t size_by_variant [reference_element::max_variant];
39
size_by_dimension [0] = (n+1)*(n+1);
40
size_by_dimension [1] = 2*n*(n+1) + n*n;
41
size_by_dimension [2] = 2*n*n;
42
size_by_dimension [3] = 0;
43
size_by_variant [reference_element::p] = size_by_dimension [0];
44
size_by_variant [reference_element::e] = size_by_dimension [1];
45
size_by_variant [reference_element::t] = size_by_dimension [2];
46
size_by_variant [reference_element::q] = 0;
47
size_by_variant [reference_element::T] = 0;
48
size_by_variant [reference_element::P] = 0;
49
size_by_variant [reference_element::H] = 0;
51
for (size_t dim = 0; dim < 4; dim++) {
52
gs.ownership_by_dimension [dim] = distributor (distributor::decide, communicator(), size_by_dimension [dim]);
54
for (size_t variant = 0; variant < reference_element::max_variant; variant++) {
55
gs.ownership_by_variant [variant] = distributor (distributor::decide, communicator(), size_by_variant [variant]);
57
size_t dis_ndof = num.dis_ndof (gs, dim);
59
cout << "\tndof => " << dis_ndof << endl;