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

initial parameters for yasp-grid

parent 7fccb4cf
Pipeline #200 skipped
......@@ -7,6 +7,7 @@
#include <array>
#include <memory>
#include <dune/common/array.hh>
#include <dune/common/fvector.hh>
#include <dune/grid/albertagrid.hh>
......@@ -146,13 +147,10 @@ namespace AMDiS
Dune::FieldVector<double, dim> L; L = 1.0; // extension of the domain
Parameters::get(meshName + "->dimension", L);
AMDIS_MSG("L = " << L);
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);
// TODO: add more parameters for yasp-grid (see constructor)
// TODO: add more parameters for yasp-grid (see constructor)
return make_unique<Grid>(L, s);
}
};
......@@ -165,16 +163,15 @@ namespace AMDiS
static unique_ptr<Grid> create(std::string meshName)
{
Dune::FieldVector<double, dim> lowerleft; // Lower left corner of the domain
Dune::FieldVector<double, dim> upperright; // Upper right corner of the domain
Dune::FieldVector<double, dim> lowerleft; lowerleft = 0.0; // Lower left 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 + "->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);
// 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);
}
};
......
......@@ -3,7 +3,12 @@
"elliptMesh": {
"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": {
......
This diff is collapsed.
Markdown is supported
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