From d4fe3dea971a8e3bbc22864951fd47a3e91e717f Mon Sep 17 00:00:00 2001
From: Klaus <klaus.boehnlein@tu-dresden.de>
Date: Wed, 11 Aug 2021 14:12:40 +0200
Subject: [PATCH] remove boost dependency

---
 inputs/cellsolver.parset   | 17 +++++++++++------
 src/dune-microstructure.cc | 33 +++++++++++++++++++++++++--------
 2 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/inputs/cellsolver.parset b/inputs/cellsolver.parset
index 45881378..1e700a15 100644
--- a/inputs/cellsolver.parset
+++ b/inputs/cellsolver.parset
@@ -14,14 +14,18 @@ cellDomain = 1
 #  Grid parameters
 #############################################
 
-#levels = 2
 
 #######################################################################
 ## numLevels : Number of Levels on which solution is computed. starting with a 2x2x2 cube mesh.
 ## {start,finish} computes on all grid from 2^(start) to 2^finish refinement
 ########################################################################
 
-numLevels = 1 2     # computes all levels from first to second entry
+numLevels = 1 4     # computes all levels from first to second entry
+#numLevels = 3 3     # computes all levels from first to second entry
+
+
+
+
 
 
 #Elements_Cell = 20 20 20	               # number elements in each direction (y1 y2 x3) 
@@ -42,8 +46,8 @@ numLevels = 1 2     # computes all levels from first to second entry
 width = 1.0 	    
 
 
-gamma = 50.0
-#gamma = 1.0
+#gamma = 50.0
+gamma = 1.0
 
 #############################################
 #  Material parameters
@@ -53,7 +57,7 @@ beta = 2.0    # ratio between material parameters mu1 & mu2 .... beta = 1.0 corr
 
 mu1 = 10.0
 lambda1 = 0.0 
-
+#lambda1 = 5.0 
 
 #############################################
 #  Prestrain parameters
@@ -61,6 +65,7 @@ lambda1 = 0.0
 
 #theta = 0.3    # volume fraction
 theta = 0.25   # volume fraction
+#theta = 0.75   # volume fraction
 
 prestrainType = 2
 
@@ -135,7 +140,7 @@ write_IntegralMean = true
 #  Define Analytic Solutions
 #############################################
 
-b1 = (-(theta/4.0)*mu1*mu2)/(theta*mu1+(1.0-theta)*mu2)
+#b1 = (-(theta/4.0)*mu1*mu2)/(theta*mu1+(1.0-theta)*mu2)
 
 
 
diff --git a/src/dune-microstructure.cc b/src/dune-microstructure.cc
index de77f882..71bb0538 100644
--- a/src/dune-microstructure.cc
+++ b/src/dune-microstructure.cc
@@ -49,7 +49,7 @@
 #include <dune/functions/functionspacebases/hierarchicvectorwrapper.hh>
 
 // #include <dune/fufem/discretizationerror.hh>
-#include <boost/multiprecision/cpp_dec_float.hpp>
+// #include <boost/multiprecision/cpp_dec_float.hpp>
 // #include <boost/any.hpp>
 #include <any>
 #include <variant>
@@ -2146,6 +2146,7 @@ int main(int argc, char *argv[])
   log << "prestrain imp: " <<  prestraintype << "\nrho1 = " << rho1 << "\nrho2 = " << rho2  << std::endl;
   log << "alpha: " << alpha << std::endl;
   log << "gamma: " << gamma << std::endl;
+  log << "theta: " << theta << std::endl;
 
 
   ///////////////////////////////////
@@ -2872,8 +2873,8 @@ int main(int argc, char *argv[])
     std::cout << "b2_eff : " << b2_eff << std::endl;
     std::cout << "b3_eff : " << b3_eff << std::endl;
     
-    std::cout << "q1 : " << q1 << std::endl;
-    std::cout << "q2 : " << q2 << std::endl;
+    std::cout << "q1 : "     << q1 << std::endl;
+    std::cout << "q2 : "     << q2 << std::endl;
     std::cout << "q3 should be between q1 and q2"  << std::endl;
     log << " --- analytic solutions: --- " << std::endl;
     log << "b1_hat : " << b1_hat << std::endl;
@@ -2882,8 +2883,8 @@ int main(int argc, char *argv[])
     log << "b1_eff : " << b1_eff << std::endl;
     log << "b2_eff : " << b2_eff << std::endl;
     log << "b3_eff : " << b3_eff << std::endl;
-    log << "q1 : " << q1 << std::endl;
-    log << "q2 : " << q2 << std::endl;
+    log << "q1 : "     << q1 << std::endl;
+    log << "q2 : "     << q2 << std::endl;
     log << "q3 should be between q1 and q2"  << std::endl;
     
     Storage_Quantities.push_back(std::abs(q1 - q1_c));
@@ -2987,9 +2988,25 @@ int main(int argc, char *argv[])
   // Write Data to Matlab / Optimization
   //////////////////////////////////////////////////////////////////////////////////////////////
 
-
-  writeMatrixToMatlab(Q, "matlab.txt");
-
+  
+//   writeMatrixToMatlab(Q, "matlab.txt");
+  writeMatrixToMatlab(Q, "../../Matlab-Programs/QMatrix.txt");
+  
+  
+  // write effective Prestrain in Matrix for Output
+  
+  FieldMatrix<double,1,3> BeffMat;
+  
+  BeffMat[0] = Beff;
+writeMatrixToMatlab(BeffMat, "../../Matlab-Programs/BMatrix.txt");
+  
+  
+  
+  
+  
+  
+  
+  
   //////////////////////////////////////////////////////////////////////////////////////////////
   // Write result to VTK file
   //////////////////////////////////////////////////////////////////////////////////////////////
-- 
GitLab