FlatPreBasisTest.cpp 1.8 KB
Newer Older
1
2
3
#include <amdis/AMDiS.hpp>
#include <amdis/DOFVector.hpp>
#include <amdis/ProblemStat.hpp>
4
#include <amdis/functions/GlobalBasis.hpp>
5
6
7
8
9
10
11
12
13
14
15
16
17

#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
18
19
20
21
22
23
  GlobalBasis basis1{gridView, power<2>(lagrange<1>(), blockedInterleaved())};
  GlobalBasis basis2{gridView, power<2>(lagrange<1>(), blockedLexicographic())};
  GlobalBasis basis3{gridView, power<2>(lagrange<1>(), flatInterleaved())};
  GlobalBasis basis4{gridView, power<2>(lagrange<1>(), flatLexicographic())};
  GlobalBasis basis5{gridView, power<2>(lagrange<1>())};
  GlobalBasis basis6{gridView, composite(lagrange<1>())};
24
25

  // construct a ProblemStat
26
27
28
29
30
31
  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>())};
32
33

  // construct a DOFVector
34
35
36
37
38
39
  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>())};
40
41
42
43
44
45
46
47
48
49

  return 0;
}

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

  return test();
}