Skip to content
Snippets Groups Projects
Commit 5b66f4a5 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Get levels from refinements

parent 3c1e221d
No related branches found
No related tags found
No related merge requests found
...@@ -152,6 +152,8 @@ int main(int argc, char *argv[]) { ...@@ -152,6 +152,8 @@ int main(int argc, char *argv[]) {
parset.get<size_t>("solver.maxiterations"); parset.get<size_t>("solver.maxiterations");
auto const solver_tolerance = parset.get<double>("solver.tolerance"); auto const solver_tolerance = parset.get<double>("solver.tolerance");
auto const levels = parset.get<int>("grid.refinements") + 1;
// {{{ Set up grid // {{{ Set up grid
typedef Dune::YaspGrid<dim> GridType; typedef Dune::YaspGrid<dim> GridType;
Dune::FieldVector<double, dim> const end_points( Dune::FieldVector<double, dim> const end_points(
...@@ -161,7 +163,7 @@ int main(int argc, char *argv[]) { ...@@ -161,7 +163,7 @@ int main(int argc, char *argv[]) {
Dune::FieldVector<int, dim>(2), // number of elements in each direction Dune::FieldVector<int, dim>(2), // number of elements in each direction
Dune::FieldVector<bool, dim>(false), // non-periodic in each direction Dune::FieldVector<bool, dim>(false), // non-periodic in each direction
0); // zero overlap (whatever that is) 0); // zero overlap (whatever that is)
grid.globalRefine(parset.get<int>("grid.refinements")); grid.globalRefine(levels - 1);
typedef GridType::LeafGridView GridView; typedef GridType::LeafGridView GridView;
GridView const leafView = grid.leafView(); GridView const leafView = grid.leafView();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment