diff --git a/examples/init/ellipt.json.2d b/examples/init/ellipt.json.2d deleted file mode 100644 index ecf9442d43cd560fe5e7a171c7d4e1ab5b140fed..0000000000000000000000000000000000000000 --- a/examples/init/ellipt.json.2d +++ /dev/null @@ -1,27 +0,0 @@ -{ - "dimension of world": 2, - - "elliptMesh": { - "macro file name": "./macro/macro.stand.2d", - "global refinements": 5 - }, - - "ellipt": { - "mesh": "elliptMesh", - "names": "u", - - "solver" : { - "name": "cg", - "max iteration": 1000, - "absolute tolerance": 1e-6, - "info": 1, - "left precon": "diag" - }, - - "output[0]": { - "filename": "ellipt.2d", - "name": "u", - "output directory": "output" - } - } -} diff --git a/examples/init/ellipt.json.3d b/examples/init/ellipt.json.3d deleted file mode 100644 index 91e5e948f455befca3a621fa94d4bff12190400e..0000000000000000000000000000000000000000 --- a/examples/init/ellipt.json.3d +++ /dev/null @@ -1,31 +0,0 @@ -{ - "dimension of world": 3, - - "elliptMesh": { - "macro file name": "./macro/BG1_withBoundary.3d", - "global refinements": 0, - "min corner": "0,0,0", - "max corner": "1,1,1", - "num cells": "2,2,2", - - "dimension": "1,1,1" - }, - - "ellipt": { - "mesh": "elliptMesh", - "names": "u", - - "solver" : { - "name": "cg", - "max iteration": 1000, - "absolute tolerance": 1e-6, - "info": 1, - "left precon": "diag" - }, - - "output": { - "filename": "ellipt.3d", - "output directory": "output" - } - } -} diff --git a/examples/init/heat.json.2d b/examples/init/heat.json.2d deleted file mode 100644 index 9af040264b2c831cc7422797ff536d17fe85d0fa..0000000000000000000000000000000000000000 --- a/examples/init/heat.json.2d +++ /dev/null @@ -1,40 +0,0 @@ -{ - "dimension of world": 2, - - "heatMesh": { - "macro file name": "./macro/macro.stand.2d", - "global refinements": 4, - "min corner": "0,0", - "max corner": "1,1", - "num cells": "2,2", - - "dimension": "2,2" - }, - - "heat": { - "mesh": "heatMesh", - "names": "u", - - "solver" : { - "name": "cg", - "max iteration": 1000, - "absolute tolerance": 1e-6, - "break if tolerance not reached": 1, - "info": 1, - "left precon": "diag" - }, - - "output": { - "filename": "heat.2d", - "output directory": "output", - "ParaView format": 1, - "ParaView mode": 1 - } - }, - - "adapt": { - "timestep": 0.1, - "start time": 0.0, - "end time": 1.0 - } -} diff --git a/examples/init/heat.json.3d b/examples/init/heat.json.3d deleted file mode 100644 index ce850d8674fa74e1000027fd3c676612b52bedbb..0000000000000000000000000000000000000000 --- a/examples/init/heat.json.3d +++ /dev/null @@ -1,32 +0,0 @@ -{ - "dimension of world": 3, - - "heatMesh": { - "macro file name": "./macro/macro.stand.3d", - "global refinements": 2 - }, - - "heat": { - "mesh": "heatMesh", - "names": "u", - - "solver" : { - "name": "cg", - "max iteration": 1000, - "absolute tolerance": 1e-6, - "info": 1, - "left precon": "diag" - }, - - "output": { - "filename": "heat.3d", - "output directory": "output" - } - }, - - "adapt": { - "timestep": 0.1, - "start time": 0.0, - "end time": 0.2 - } -} diff --git a/examples/init/navier_stokes.json.2d b/examples/init/navier_stokes.json.2d deleted file mode 100644 index b8fd9bbf736688003b2df084582ccdc32c19dac7..0000000000000000000000000000000000000000 --- a/examples/init/navier_stokes.json.2d +++ /dev/null @@ -1,40 +0,0 @@ -{ - "dimension of world": 2, - - "stokesMesh": { - "macro file name": "./macro/macro.small2.2d", - "global refinements": 4, - "min corner": "0,0", - "max corner": "1,1", - "num cells": "2,2" - }, - - "stokes": { - "mesh": "stokesMesh", - "names": ["u0", "u1", "p"], - - "solver" : { - "name": "direct", - "ell": 3, - "max iteration": 5000, - "relative tolerance": 1e-6, - "info": 1 - }, - - "output": { - "filename": "navier_stokes.2d", - "output directory": "output", - "ParaView format": 1 - }, - - "viscosity": 0.1, - "density": 1.0, - "boundary velocity": 1.0 - }, - - "adapt": { - "timestep": 1.0e-3, - "start time": 0.0, - "end time": 1.0 - } -} diff --git a/examples/init/pfc.json.2d b/examples/init/pfc.json.2d deleted file mode 100644 index 9b9ced39fdefe225ad19623ad3a348f4e7717c97..0000000000000000000000000000000000000000 --- a/examples/init/pfc.json.2d +++ /dev/null @@ -1,62 +0,0 @@ -{ - "dimension of world": 2, - - "pfcMesh": { - "macro file name": "./macro/macro.square.2d", - "global refinements": 8, - "min corner": "0,0", - "max corner": "1,1", - "num cells": "2,2", - - "dimension": "50,50" - }, - - "pfc": { - "mesh": "pfcMesh", - - "solver" : { - "name": "fgmres", - "max iteration": 1000, - "relative tolerance": 1e-6, - "info": 10, - "ell": 3, - "print cycle": 10, - "right precon": "pfc" - }, - - "output": { - "filename": "pfc.2d", - "output directory": "output" - } - }, - - "precon_pfc": { - "M": { - "solver": "cg", - "max iteration": 1000, - "relative tolerance": 1e-3, - "left precon": "diag", - "info": 0 - }, - "MpL": { - "solver": "cg", - "max iteration": 1000, - "relative tolerance": 1e-3, - "left precon": "diag", - "info": 0 - }, - "MpL2": { - "solver": "cg", - "max iteration": 1000, - "relative tolerance": 1e-3, - "left precon": "diag", - "info": 0 - } - }, - - "adapt": { - "timestep": 0.1, - "start time": 0.0, - "end time": 10.0 - } -} diff --git a/examples/init/stokes.dat.2d b/examples/init/stokes.dat.2d index 5ec83a051cdf892e33f3965ba0d231dc8bb36ab1..54542825dba336eba2af96e3b3371f548ff8bad6 100644 --- a/examples/init/stokes.dat.2d +++ b/examples/init/stokes.dat.2d @@ -1,16 +1,15 @@ -dimension of world: 2 - stokesMesh->global refinements: 0 stokesMesh->dimension: 1.0 1.0 stokesMesh->num cells: 4 4 stokes->mesh: stokesMesh -stokes->solver->name: direct +stokes->solver->name: bicgstag stokes->solver->ell: 3 stokes->solver->max iteration: 1000 stokes->solver->relative tolerance: 1e-8 stokes->solver->restart: 50 +stokes->solver->precon->name: ilu stokes->solver->info: 2 stokes->output[0]->filename: stokes_u.2d diff --git a/examples/init/stokes.json.2d b/examples/init/stokes.json.2d deleted file mode 100644 index cef9335d1c0c249ac9182d1244e46e749f4452de..0000000000000000000000000000000000000000 --- a/examples/init/stokes.json.2d +++ /dev/null @@ -1,37 +0,0 @@ -{ - "dimension of world": 2, - - "stokesMesh": { - "macro file name": "./macro/macro.stand.2d", - "global refinements": 2 - }, - - "stokes": { - "mesh": "stokesMesh", - - "solver" : { - "name": "minres", - "max iteration": 2000, - "reduction": 1e-8, - "restart": 50, - "info": 2 - }, - - "output[0]": { - "filename": "stokes_u.2d", - "name": "u", - "subsampling": 1, - "output directory": "output", - "ParaView format": 1, - "ParaView mode": 1 - }, - - "output[1]": { - "filename": "stokes_p.2d", - "name": "p", - "output directory": "output", - "ParaView format": 1, - "ParaView mode": 1 - } - } -} diff --git a/examples/init/test.json.2d b/examples/init/test.json.2d deleted file mode 100644 index 8eb8d951d424d189f04b2b3b42dca2356a46acb0..0000000000000000000000000000000000000000 --- a/examples/init/test.json.2d +++ /dev/null @@ -1,29 +0,0 @@ -{ - "dimension of world": 2, - - "testMesh": { - "macro file name": "macro/macro.stand.2d", - "global refinements": 10 - }, - - "test": { - "mesh": "testMesh", - "dim": 2, - "components": 1, - "polynomial degree[0]": 1, - - "solver": "cg", - "solver" : { - "max iteration": 1000, - "tolerance": 1e-8, - "info": 10, - "left precon": "diag" - }, - - "output": { - "filename": "output/test.2d", - "ParaView format": 1, - "ParaView mode": 1 - } - } -} diff --git a/examples/init/vecellipt.json.2d b/examples/init/vecellipt.json.2d deleted file mode 100644 index bddc77ccb54719e65e969296efdeae231ea12a18..0000000000000000000000000000000000000000 --- a/examples/init/vecellipt.json.2d +++ /dev/null @@ -1,32 +0,0 @@ -{ - "dimension of world": 2, - - "elliptMesh": { - "macro file name": "./macro/macro.stand.2d", - "global refinements": 5 - }, - - "ellipt": { - "mesh": "elliptMesh", - "names": "u", - - "solver" : { - "name": "direct", - "max iteration": 1000, - "absolute tolerance": 1e-6, - "info": 1, - "left precon": "diag" - }, - - "output[0]": { - "filename": "vecellipt0.2d", - "name": "u0", - "output directory": "output" - }, - "output[1]": { - "filename": "vecellipt1.2d", - "name": "u1", - "output directory": "output" - } - } -} diff --git a/examples/navier_stokes.cc b/examples/navier_stokes.cc index 623a411c75565fc49e0cb0c7e0d7436c4a81512d..ebb8fef72bb06a49cc2088cc5a595b92a90f5625 100644 --- a/examples/navier_stokes.cc +++ b/examples/navier_stokes.cc @@ -1,13 +1,4 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <iostream> -#include <ctime> -#include <cmath> - #include <amdis/AMDiS.hpp> -#include <amdis/common/FieldMatVec.hpp> #include <amdis/AdaptInstationary.hpp> #include <amdis/LocalOperators.hpp> #include <amdis/ProblemStat.hpp> @@ -16,23 +7,17 @@ using namespace AMDiS; -struct NavierStokesBasis -{ - using Grid = Dune::YaspGrid<GRIDDIM>; - using GlobalBasis = typename TaylorHoodBasis<Grid::LeafGridView>::GlobalBasis; -}; - -using StokesProblem = ProblemStat<NavierStokesBasis>; -using StokesProblemInstat = ProblemInstat<NavierStokesBasis>; +using Grid = Dune::YaspGrid<2>; +using Basis = TaylorHoodBasis<Grid::LeafGridView>; int main(int argc, char** argv) { AMDiS::init(argc, argv); - StokesProblem prob("stokes"); + ProblemStat<Basis> prob("stokes"); prob.initialize(INIT_ALL); - StokesProblemInstat probInstat("stokes", prob); + ProblemInstat<Basis> probInstat("stokes", prob); probInstat.initialize(INIT_UH_OLD); double viscosity = 1.0; @@ -82,31 +67,21 @@ int main(int argc, char** argv) trans(gradientAtQP(prob.solution(_v))) * prob.solution(_v)); prob.addVectorOperator(opNonlin3, _v); - // define boundary regions - auto left = [](auto const& x) { return x[0] < 1.e-8; }; - auto not_left = [](auto const& x) { return x[0] > 1.0 - 1.e-8 || x[1] < 1.e-8 || x[1] > 1.0 - 1.e-8; }; - // define boundary values - auto parabolic_y = [](auto const& x) -> Dune::FieldVector<double,2> + auto parabolic_y = [](auto const& x) { - return {0.0, x[1]*(1.0 - x[1])}; + return FieldVector<double,2>{0.0, x[1]*(1.0 - x[1])}; }; - auto zero = [](auto const& x) -> Dune::FieldVector<double,2> - { - return {0.0, 0.0}; - }; + FieldVector<double,2> zero(0); // set boundary conditions for velocity - prob.addDirichletBC(left, _v, _v, parabolic_y); - prob.addDirichletBC(not_left, _v, _v, zero); - - // set point constraint for pressure - prob.addDirichletBC([](auto const& x) { return x[0] < 1.e-8 && x[1] < 1.e-8; }, _p, _p, 0.0); + prob.boundaryManager()->setBoxBoundary({1,2,2,2}); + prob.addDirichletBC(1, _v, _v, parabolic_y); + prob.addDirichletBC(2, _v, _v, zero); // set initial conditions prob.solution(_v).interpolate(parabolic_y); - prob.solution(_p).interpolate(0.0); AdaptInstationary adapt("adapt", prob, adaptInfo, probInstat, adaptInfo); adapt.adapt(); diff --git a/examples/stokes0.cc b/examples/stokes0.cc index c418b5f6e2e00c2b8b5ab7b2de512c764dbb1def..6cb7168d2d3c0481843a1f8e831b410789b51ce2 100644 --- a/examples/stokes0.cc +++ b/examples/stokes0.cc @@ -1,26 +1,11 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <iostream> -#include <ctime> -#include <cmath> - #include <amdis/AMDiS.hpp> #include <amdis/LocalOperators.hpp> #include <amdis/ProblemStat.hpp> -#ifdef DOW -#undef DOW -#endif -#define DOW WORLDDIM - using namespace AMDiS; -// 3 components: velocity with polynomial degree 2 and pressure with polynomial degree 1 - -using Grid = Dune::YaspGrid<GRIDDIM>; -using StokesParam = TaylorHoodBasis<Grid::LeafGridView>; +using Grid = Dune::YaspGrid<2>; +using StokesParam = TaylorHoodBasis<Grid::LeafGridView>; using StokesProblem = ProblemStat<StokesParam>; int main(int argc, char** argv) @@ -37,8 +22,8 @@ int main(int argc, char** argv) auto _v = Dune::Indices::_0; auto _p = Dune::Indices::_1; - // <viscosity*grad(u_i), grad(v_i)> - for (std::size_t i = 0; i < DOW; ++i) { + for (std::size_t i = 0; i < WORLDDIM; ++i) { + // <viscosity*grad(u_i), grad(v_i)> auto opL = makeOperator(tag::gradtest_gradtrial{}, viscosity); prob.addMatrixOperator(opL, treepath(_v,i), treepath(_v,i)); @@ -51,42 +36,23 @@ int main(int argc, char** argv) prob.addMatrixOperator(opDiv, _p, treepath(_v,i)); } - auto opZero = makeOperator(tag::test_trial{}, 0.0); - prob.addMatrixOperator(opZero, _p, _p); - - // define boundary regions - auto left = [](auto const& x) { return x[0] < 1.e-8; }; - auto not_left = [](auto const& x) { return x[0] > 1.0 - 1.e-8 || x[1] < 1.e-8 || x[1] > 1.0 - 1.e-8; }; - // define boundary values - auto parabolic_y = [](auto const& x) -> Dune::FieldVector<double,DOW> + auto parabolic_y = [](auto const& x) { - return {0.0, x[1]*(1.0 - x[1])}; + return FieldVector<double,2>{0.0, x[1]*(1.0 - x[1])}; }; - auto zero = [](auto const& x) -> Dune::FieldVector<double,DOW> - { - return {0.0, 0.0}; - }; + FieldVector<double,2> zero(0); // set boundary conditions for velocity - prob.addDirichletBC(left, _v, _v, parabolic_y); - prob.addDirichletBC(not_left, _v, _v, zero); - - prob.addDirichletBC([](auto const& x) { return x[0] < 1.e-8 && x[1] < 1.e-8; }, _p, _p, 0.0); + prob.boundaryManager()->setBoxBoundary({1,2,2,2}); + prob.addDirichletBC(1, _v, _v, parabolic_y); + prob.addDirichletBC(2, _v, _v, zero); AdaptInfo adaptInfo("adapt"); // assemble and solve system prob.assemble(adaptInfo); - -#ifdef DEBUG_MTL - // write matrix to file - mtl::io::matrix_market_ostream out("matrix_stokes0.mtx"); - out << prob.systemMatrix().matrix(); - std::cout << prob.systemMatrix().matrix() << '\n'; -#endif - prob.solve(adaptInfo); // output solution diff --git a/examples/stokes1.cc b/examples/stokes1.cc index 0ad0ba6340bc519762850f3427f3af1885c76f24..2755a9f571d3754eb555800dbc558baa169fca5f 100644 --- a/examples/stokes1.cc +++ b/examples/stokes1.cc @@ -1,26 +1,11 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <iostream> -#include <ctime> -#include <cmath> - #include <amdis/AMDiS.hpp> #include <amdis/LocalOperators.hpp> #include <amdis/ProblemStat.hpp> -#ifdef DOW -#undef DOW -#endif -#define DOW WORLDDIM - using namespace AMDiS; -// 3 components: velocity with polynomial degree 2 and pressure with polynomial degree 1 - -using Grid = Dune::YaspGrid<GRIDDIM>; -using StokesParam = TaylorHoodBasis<Grid::LeafGridView>; +using Grid = Dune::YaspGrid<2>; +using StokesParam = TaylorHoodBasis<Grid::LeafGridView>; using StokesProblem = ProblemStat<StokesParam>; int main(int argc, char** argv) @@ -37,8 +22,8 @@ int main(int argc, char** argv) auto _v = Dune::Indices::_0; auto _p = Dune::Indices::_1; - // <viscosity*grad(u_i), grad(v_i)> - for (std::size_t i = 0; i < DOW; ++i) { + for (std::size_t i = 0; i < WORLDDIM; ++i) { + // <viscosity*grad(u_i), grad(v_i)> auto opL = makeOperator(tag::gradtest_gradtrial{}, viscosity); prob.addMatrixOperator(opL, treepath(_v,i), treepath(_v,i)); } @@ -51,43 +36,23 @@ int main(int argc, char** argv) auto opDiv = makeOperator(tag::test_divtrialvec{}, 1.0); prob.addMatrixOperator(opDiv, _p, _v); - auto opZero = makeOperator(tag::test_trial{}, 0.0); - prob.addMatrixOperator(opZero, _p, _p); - - - // define boundary regions - auto left = [](auto const& x) { return x[0] < 1.e-8; }; - auto not_left = [](auto const& x) { return x[0] > 1.0 - 1.e-8 || x[1] < 1.e-8 || x[1] > 1.0 - 1.e-8; }; - // define boundary values - auto parabolic_y = [](auto const& x) -> Dune::FieldVector<double,DOW> + auto parabolic_y = [](auto const& x) { - return {0.0, x[1]*(1.0 - x[1])}; + return FieldVector<double,2>{0.0, x[1]*(1.0 - x[1])}; }; - auto zero = [](auto const& x) -> Dune::FieldVector<double,DOW> - { - return {0.0, 0.0}; - }; + FieldVector<double,2> zero(0); // set boundary conditions for velocity - prob.addDirichletBC(left, _v, _v, parabolic_y); - prob.addDirichletBC(not_left, _v, _v, zero); - - prob.addDirichletBC([](auto const& x) { return x[0] < 1.e-8 && x[1] < 1.e-8; }, _p, _p, 0.0); + prob.boundaryManager()->setBoxBoundary({1,2,2,2}); + prob.addDirichletBC(1, _v, _v, parabolic_y); + prob.addDirichletBC(2, _v, _v, zero); AdaptInfo adaptInfo("adapt"); // assemble and solve system prob.assemble(adaptInfo); - -#ifdef DEBUG_MTL - // write matrix to file - mtl::io::matrix_market_ostream out("matrix_stokes1.mtx"); - out << prob.systemMatrix().matrix(); - std::cout << prob.systemMatrix().matrix() << '\n'; -#endif - prob.solve(adaptInfo); // output solution diff --git a/examples/stokes3.cc b/examples/stokes3.cc index f6ae5779b9f037a7fb1d855865779b9234aeb821..393a0b25235a49e3c5773c05551ca871c2e5979d 100644 --- a/examples/stokes3.cc +++ b/examples/stokes3.cc @@ -1,11 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <iostream> -#include <ctime> -#include <cmath> - #include <amdis/AMDiS.hpp> #include <amdis/LocalOperators.hpp> #include <amdis/ProblemStat.hpp> @@ -13,8 +5,8 @@ using namespace AMDiS; -using Grid = Dune::YaspGrid<GRIDDIM>; -using StokesParam = TaylorHoodBasis<Grid::LeafGridView>; +using Grid = Dune::YaspGrid<2>; +using StokesParam = TaylorHoodBasis<Grid::LeafGridView>; using StokesProblem = ProblemStat<StokesParam>; int main(int argc, char** argv) @@ -34,30 +26,18 @@ int main(int argc, char** argv) auto opStokes = makeOperator(tag::stokes{}, viscosity); prob.addMatrixOperator(opStokes); - auto opZero = makeOperator(tag::test_trial{}, 0.0); - prob.addMatrixOperator(opZero, _p, _p); - - // define boundary regions - auto left = [](auto const& x) { return x[0] < 1.e-8; }; - auto not_left = [](auto const& x) { return x[0] > 1.0 - 1.e-8 || x[1] < 1.e-8 || x[1] > 1.0 - 1.e-8; }; - // define boundary values - auto parabolic_y = [](auto const& x) -> FieldVector<double,2> + auto parabolic_y = [](auto const& x) { - return {0.0, x[1]*(1.0 - x[1])}; + return FieldVector<double,2>{0.0, x[1]*(1.0 - x[1])}; }; - auto zero = [](auto const& x) -> FieldVector<double,2> - { - return {0.0, 0.0}; - }; + FieldVector<double,2> zero(0); // set boundary conditions for velocity - prob.addDirichletBC(left, _v, _v, parabolic_y); - prob.addDirichletBC(not_left, _v, _v, zero); - - // set point constraint for pressure - prob.addDirichletBC([](auto const& x) { return x[0] < 1.e-8 && x[1] < 1.e-8; }, _p, _p, 0.0); + prob.boundaryManager()->setBoxBoundary({1,2,2,2}); + prob.addDirichletBC(1, _v, _v, parabolic_y); + prob.addDirichletBC(2, _v, _v, zero); AdaptInfo adaptInfo("adapt"); diff --git a/examples/traversal.cc b/examples/traversal.cc new file mode 100644 index 0000000000000000000000000000000000000000..69a2beaa8aad595df9ae7b1e39f69b45584cde57 --- /dev/null +++ b/examples/traversal.cc @@ -0,0 +1,29 @@ +#include <amdis/AMDiS.hpp> +#include <amdis/typetree/Traversal.hpp> + +#include <dune/grid/yaspgrid.hh> +#include <dune/functions/functionspacebases/compositebasis.hh> +#include <dune/functions/functionspacebases/powerbasis.hh> +#include <dune/functions/functionspacebases/lagrangebasis.hh> + +using namespace AMDiS; +int main() +{ + // create grid + Dune::YaspGrid<2> grid({1.0,1.0}, {1,1}); + auto gridView = grid.leafGridView(); + + // create basis + using namespace Dune::Functions::BasisFactory; + auto basis1 = makeBasis(gridView, + composite(power<2>(lagrange<2>(), flatInterleaved()), lagrange<1>(), flatLexicographic())); + auto basis2 = makeBasis(gridView, + power<2>(power<2>(lagrange<2>(), flatInterleaved()), flatLexicographic())); + + auto localView = basis1.localView(); + + for_each_leaf_node(localView.tree(), [](auto const& node, auto const& tp) + { + std::cout << node.tp() << std::endl; + }); +} \ No newline at end of file diff --git a/examples/treecontainer.cc b/examples/treecontainer.cc new file mode 100644 index 0000000000000000000000000000000000000000..e5e4d6b909b66aa25003f6340ce76854808a7d04 --- /dev/null +++ b/examples/treecontainer.cc @@ -0,0 +1,28 @@ +#include <amdis/AMDiS.hpp> +#include <amdis/typetree/TreeContainer.hpp> + +#include <dune/grid/yaspgrid.hh> +#include <dune/functions/functionspacebases/compositebasis.hh> +#include <dune/functions/functionspacebases/powerbasis.hh> +#include <dune/functions/functionspacebases/lagrangebasis.hh> + +using namespace AMDiS; +int main() +{ + // create grid + Dune::YaspGrid<2> grid({1.0,1.0}, {1,1}); + auto gridView = grid.leafGridView(); + + // create basis + using namespace Dune::Functions::BasisFactory; + auto basis1 = makeBasis(gridView, + composite(power<2>(lagrange<2>(), flatInterleaved()), lagrange<1>(), flatLexicographic())); + auto basis2 = makeBasis(gridView, + power<2>(power<2>(lagrange<2>(), flatInterleaved()), flatLexicographic())); + + auto localView = basis1.localView(); + + auto container = makeTreeContainer<double>(localView.tree()); + auto container2 = makeTreeContainer(localView.tree(), + [&](auto const& node) { return makeTreeContainer<double>(localView.tree()); }); +} \ No newline at end of file