Commit 431531db authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

initial parameters for yasp-grid

parent 7fccb4cf
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <array> #include <array>
#include <memory> #include <memory>
#include <dune/common/array.hh>
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/grid/albertagrid.hh> #include <dune/grid/albertagrid.hh>
...@@ -146,13 +147,10 @@ namespace AMDiS ...@@ -146,13 +147,10 @@ namespace AMDiS
Dune::FieldVector<double, dim> L; L = 1.0; // extension of the domain Dune::FieldVector<double, dim> L; L = 1.0; // extension of the domain
Parameters::get(meshName + "->dimension", L); Parameters::get(meshName + "->dimension", L);
AMDIS_MSG("L = " << L); auto s = Dune::fill_array<dim>(int{2}); // number of cells on coarse mesh in each direction
std::array<int, dim> s; // number of cells on coarse mesh in each direction
Parameters::get(meshName + "->num cells", s); Parameters::get(meshName + "->num cells", s);
// TODO: add more parameters for yasp-grid (see constructor) // TODO: add more parameters for yasp-grid (see constructor)
return make_unique<Grid>(L, s); return make_unique<Grid>(L, s);
} }
}; };
...@@ -165,16 +163,15 @@ namespace AMDiS ...@@ -165,16 +163,15 @@ namespace AMDiS
static unique_ptr<Grid> create(std::string meshName) static unique_ptr<Grid> create(std::string meshName)
{ {
Dune::FieldVector<double, dim> lowerleft; // Lower left corner of the domain Dune::FieldVector<double, dim> lowerleft; lowerleft = 0.0; // Lower left corner of the domain
Dune::FieldVector<double, dim> upperright; // Upper right corner of the domain Dune::FieldVector<double, dim> upperright; upperright = 1.0; // Upper right corner of the domain
Parameters::get(meshName + "->min corner", lowerleft); Parameters::get(meshName + "->min corner", lowerleft);
Parameters::get(meshName + "->max corner", upperright); Parameters::get(meshName + "->max corner", upperright);
std::array<int, dim> s; // number of cells on coarse mesh in each direction auto s = Dune::fill_array<dim>(int{2}); // number of cells on coarse mesh in each direction
Parameters::get(meshName + "->num cells", s); Parameters::get(meshName + "->num cells", s);
// TODO: add more parameters for yasp-grid (see constructor) // TODO: add more parameters for yasp-grid (see constructor)
return make_unique<Grid>(lowerleft, upperright, s); return make_unique<Grid>(lowerleft, upperright, s);
} }
}; };
......
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
"elliptMesh": { "elliptMesh": {
"macro file name": "./macro/BG1_withBoundary.3d", "macro file name": "./macro/BG1_withBoundary.3d",
"global refinements": 0 "global refinements": 5,
"min corner": "0,0,0",
"max corner": "1,1,1",
"num cells": "2,2,2",
"dimension": "1,1,1"
}, },
"ellipt": { "ellipt": {
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment