From ea37c243d63ae323a8881be3976154b6b65a1d35 Mon Sep 17 00:00:00 2001
From: Lars von Wolff <lars.von-wolff@ians.uni-stuttgart.de>
Date: Wed, 27 Jan 2021 23:18:52 +0100
Subject: [PATCH] added fast functionality to set channel width

---
 src/paper_thinstrip_full/chns.ini              | 10 +++++-----
 src/paper_thinstrip_full/thinstrip_equation.cc | 16 +++++++++++++++-
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/paper_thinstrip_full/chns.ini b/src/paper_thinstrip_full/chns.ini
index 5369b0e..83b6485 100644
--- a/src/paper_thinstrip_full/chns.ini
+++ b/src/paper_thinstrip_full/chns.ini
@@ -12,26 +12,26 @@ CurvatureAlpha=0.001
 
 [domain]
 level = 0
-filename = grids/tper8.msh
+filename = grids/tper1.msh
 len = 1
 periodic = 01
 #YScalingFactor = 0.5
-YScaling = 0.125 #0.125
+YScaling = 1 #0.125
 
 [output]
-filename = output4
+filename = output1
 
 [Phasefield]
 eps=0.03   #0.03
 delta=0.03 #0.03
 DoubleWellDelta=0.05 #0.05
-Mobility=0.02
+Mobility=0.04
 Sigma1=1
 Sigma2=1
 Sigma3=1
 
 [Time]
-tMax = 300
+tMax = 10
 dt = 0.0015
 dtMax = 0.01
 dtMin = 0.00015
diff --git a/src/paper_thinstrip_full/thinstrip_equation.cc b/src/paper_thinstrip_full/thinstrip_equation.cc
index 0b751ff..8699ea8 100644
--- a/src/paper_thinstrip_full/thinstrip_equation.cc
+++ b/src/paper_thinstrip_full/thinstrip_equation.cc
@@ -106,7 +106,21 @@ int main(int argc, char** argv)
     ptreeparser.readINITree("chns.ini",ptree);
     ptreeparser.readOptions(argc,argv,ptree);
 
-    // read ini file
+    if(argc > 1)
+    {
+      std::cout << argv[1] << std::endl;
+      int factorsize = std::stoi( argv[1] );
+      ptree["output.filename"] = "output" + std::to_string(factorsize);
+      ptree["domain.filename"] = "grids/tper"  + std::to_string(factorsize) + ".msh";
+      ptree["domain.YScaling"] = std::to_string(1./float(factorsize));
+
+      ptree["Time.dt"] = std::to_string(1./float(factorsize) * ptree.get("Time.dt",0.1));
+      ptree["Time.dtMax"] = std::to_string(1./float(factorsize) * ptree.get("Time.dtMax",0.1));
+      ptree["Time.dtMin"] = std::to_string(1./float(factorsize) * ptree.get("Time.dtMin",0.1));
+    }
+
+    ptree["output.filename"] = "teststest";
+
 //    const int dim = ptree.get<int>("grid.dim");
     const int refinement = ptree.get<int>("domain.level");
 
-- 
GitLab