From 1c3f1e847293e836a947d7b3fa4c1230b787f736 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Mon, 8 Nov 2010 15:25:18 +0000
Subject: [PATCH] take cube grid bounding box from the parset file

[[Imported from SVN: r6510]]
---
 harmonicmaps-eoc.cc     | 10 ++++++----
 harmonicmaps-eoc.parset |  4 ++++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/harmonicmaps-eoc.cc b/harmonicmaps-eoc.cc
index 269e8861..1db6c2c9 100644
--- a/harmonicmaps-eoc.cc
+++ b/harmonicmaps-eoc.cc
@@ -174,8 +174,10 @@ int main (int argc, char *argv[]) try
 
     array<unsigned int,dim> elements;
     elements.fill(numBaseElements);
-    shared_ptr<GridType> referenceGrid = StructuredGridFactory<GridType>::createSimplexGrid(FieldVector<double,dim>(0),
-                                                                                            FieldVector<double,dim>(1),
+    FieldVector<double,dim> lowerLeft  = parameterSet.get<FieldVector<double,dim> >("lowerLeft");
+    FieldVector<double,dim> upperRight = parameterSet.get<FieldVector<double,dim> >("upperRight");
+    shared_ptr<GridType> referenceGrid = StructuredGridFactory<GridType>::createSimplexGrid(lowerLeft,
+                                                                                            upperRight,
                                                                                             elements);
     referenceGrid->globalRefine(numLevels-1);
 
@@ -208,8 +210,8 @@ int main (int argc, char *argv[]) try
 
         array<unsigned int,dim> elements;
         elements.fill(numBaseElements);
-        shared_ptr<GridType> grid = StructuredGridFactory<GridType>::createSimplexGrid(FieldVector<double,dim>(0),
-                                                                                       FieldVector<double,dim>(1),
+        shared_ptr<GridType> grid = StructuredGridFactory<GridType>::createSimplexGrid(lowerLeft,
+                                                                                       upperRight,
                                                                                        elements);
 
         grid->globalRefine(i-1);
diff --git a/harmonicmaps-eoc.parset b/harmonicmaps-eoc.parset
index ce10259d..051081d7 100644
--- a/harmonicmaps-eoc.parset
+++ b/harmonicmaps-eoc.parset
@@ -29,3 +29,7 @@ baseTolerance = -1
 # Number of elements of the rod grid
 numBaseElements = 4
 
+# Bounding box
+lowerLeft = -2 -1
+upperRight = 2 1
+
-- 
GitLab