FlatPreBasisTest.cpp 1.85 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <amdis/AMDiS.hpp>
#include <amdis/DOFVector.hpp>
#include <amdis/ProblemStat.hpp>
#include <amdis/functions/ParallelGlobalBasis.hpp>

#include <dune/grid/yaspgrid.hh>

int test()
{
  using namespace AMDiS;
  using namespace Dune::Functions::BasisFactory;

  // construct a grid
  Dune::YaspGrid<2> grid({1.0, 1.0}, {8,8});
  auto gridView = grid.leafGridView();

  // construct a basis
  ParallelGlobalBasis basis1(gridView, power<2>(lagrange<1>(), blockedInterleaved()));
  ParallelGlobalBasis basis2(gridView, power<2>(lagrange<1>(), blockedLexicographic()));
  ParallelGlobalBasis basis3(gridView, power<2>(lagrange<1>(), flatInterleaved()));
  ParallelGlobalBasis basis4(gridView, power<2>(lagrange<1>(), flatLexicographic()));
  ParallelGlobalBasis basis5(gridView, power<2>(lagrange<1>()));
  ParallelGlobalBasis basis6(gridView, composite(lagrange<1>()));

  // construct a ProblemStat
  ProblemStat prob1("prob1", grid, power<2>(lagrange<1>(), blockedInterleaved()));
  ProblemStat prob2("prob2", grid, power<2>(lagrange<1>(), blockedLexicographic()));
  ProblemStat prob3("prob3", grid, power<2>(lagrange<1>(), flatInterleaved()));
  ProblemStat prob4("prob4", grid, power<2>(lagrange<1>(), flatLexicographic()));
  ProblemStat prob5("prob5", grid, power<2>(lagrange<1>()));
  ProblemStat prob6("prob6", grid, composite(lagrange<1>()));

  // construct a DOFVector
  DOFVector vec1(gridView, power<2>(lagrange<1>(), blockedInterleaved()));
  DOFVector vec2(gridView, power<2>(lagrange<1>(), blockedLexicographic()));
  DOFVector vec3(gridView, power<2>(lagrange<1>(), flatInterleaved()));
  DOFVector vec4(gridView, power<2>(lagrange<1>(), flatLexicographic()));
  DOFVector vec5(gridView, power<2>(lagrange<1>()));
  DOFVector vec6(gridView, composite(lagrange<1>()));

  return 0;
}

int main(int argc, char** argv)
{
  AMDiS::Environment env(argc, argv);

  return test();
}