Commit 298fab97 authored by Andreas Dedner's avatar Andreas Dedner

adapt to recent changes in gridtype

[[Imported from SVN: r270]]
parent 2eae3968
......@@ -115,24 +115,28 @@ int main (int argc , char ** argv)
try {
using namespace Dune;
// the GridSelector :: GridType is defined in gridtype.hh and is
// set during compilation
typedef GridSelector :: GridType Grid;
// use unitcube from grids
std::stringstream dgfFileName;
dgfFileName << "grids/unitcube" << GridType :: dimension << ".dgf";
dgfFileName << "grids/unitcube" << Grid :: dimension << ".dgf";
// create grid pointer, GridType is defined by gridtype.hh
GridPtr<GridType> gridPtr( dgfFileName.str() );
// create grid pointer
GridPtr<Grid> gridPtr( dgfFileName.str() );
// grid reference
GridType& grid = *gridPtr;
Grid& grid = *gridPtr;
// minimal allowed level during refinement
int minLevel = 2 * DGFGridInfo<GridType>::refineStepsForHalf();
int minLevel = 2 * DGFGridInfo<Grid>::refineStepsForHalf();
// refine grid until upper limit of level
grid.globalRefine(minLevel);
// maximal allowed level during refinement
int maxLevel = minLevel + 3 * DGFGridInfo<GridType>::refineStepsForHalf();
int maxLevel = minLevel + 3 * DGFGridInfo<Grid>::refineStepsForHalf();
// do time loop until end time 0.5
timeloop(grid, 0.5, minLevel, maxLevel);
......
......@@ -130,12 +130,16 @@ int main(int argc, char **argv)
try {
using namespace Dune;
// the GridSelector :: GridType is defined in gridtype.hh and is
// set during compilation
typedef GridSelector :: GridType Grid;
// use unitcube from grids
std::stringstream dgfFileName;
dgfFileName << "grids/unitcube" << GridType :: dimension << ".dgf";
dgfFileName << "grids/unitcube" << Grid :: dimension << ".dgf";
// create grid pointer, GridType is defined by gridtype.hh
GridPtr<GridType> gridPtr( dgfFileName.str() );
// create grid pointer
GridPtr<Grid> gridPtr( dgfFileName.str() );
// do the adaptive integration
// NOTE: for structured grids global refinement will be used
......
......@@ -96,18 +96,22 @@ int main (int argc , char ** argv)
try {
using namespace Dune;
// the GridSelector :: GridType is defined in gridtype.hh and is
// set during compilation
typedef GridSelector :: GridType Grid;
// use unitcube from dgf grids
std::stringstream dgfFileName;
dgfFileName << "grids/unitcube" << GridType :: dimension << ".dgf";
dgfFileName << "grids/unitcube" << Grid :: dimension << ".dgf";
// create grid pointer, GridType is defined by gridtype.hh
GridPtr<GridType> gridPtr( dgfFileName.str() );
// create grid pointer
GridPtr<Grid> gridPtr( dgfFileName.str() );
// grid reference
GridType& grid = *gridPtr;
Grid& grid = *gridPtr;
// half grid width 4 times
int level = 4 * DGFGridInfo<GridType>::refineStepsForHalf();
int level = 4 * DGFGridInfo<Grid>::refineStepsForHalf();
// refine grid until upper limit of level
grid.globalRefine(level);
......
......@@ -66,12 +66,16 @@ int main(int argc, char **argv)
try {
using namespace Dune;
// the GridSelector :: GridType is defined in gridtype.hh and is
// set during compilation
typedef GridSelector :: GridType Grid;
// use unitcube from grids
std::stringstream dgfFileName;
dgfFileName << "grids/unitcube" << GridType :: dimension << ".dgf";
dgfFileName << "grids/unitcube" << Grid :: dimension << ".dgf";
// create grid pointer, GridType is defined by gridtype.hh
GridPtr<GridType> gridPtr( dgfFileName.str() );
// create grid pointer
GridPtr<Grid> gridPtr( dgfFileName.str() );
// integrate and compute error with extrapolation
uniformintegration( *gridPtr );
......
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