From 4da667b4296ab91f61d0527d8ce946ee5f75942f Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Mon, 8 Mar 2010 11:49:33 +0000 Subject: [PATCH] bugfix: honour the minLevel parameter [[Imported from SVN: r5682]] --- rodobstacle.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rodobstacle.cc b/rodobstacle.cc index 6d6f853a..c07ba497 100644 --- a/rodobstacle.cc +++ b/rodobstacle.cc @@ -97,8 +97,10 @@ int main (int argc, char *argv[]) try typedef OneDGrid GridType; GridType grid(numRodBaseElements, 0, numRodBaseElements); - std::vector<std::vector<BoxConstraint<double,3> > > trustRegionObstacles(1); - std::vector<BitSetVector<1> > hasObstacle(1); + grid.globalRefine(minLevel); + + std::vector<std::vector<BoxConstraint<double,3> > > trustRegionObstacles(minLevel+1); + std::vector<BitSetVector<1> > hasObstacle(minLevel+1); BitSetVector<blocksize> dirichletNodes; // //////////////////////////////// @@ -142,7 +144,7 @@ int main (int argc, char *argv[]) try double trustRegionRadius = 0.1; CorrectionType rhs; - SolutionType x(grid.size(0,1)); + SolutionType x(grid.size(1)); CorrectionType corr; // ////////////////////////// @@ -160,7 +162,7 @@ int main (int argc, char *argv[]) try // Refinement Loop // ///////////////////////////////////////////////////////////////////// - for (int toplevel=0; toplevel<=maxLevel; toplevel++) { + for (int toplevel=minLevel; toplevel<=maxLevel; toplevel++) { std::cout << "####################################################" << std::endl; std::cout << " Solving on level: " << toplevel << std::endl; -- GitLab