From 49d0f16aef6ec11a492de3acd2a0189a7009f347 Mon Sep 17 00:00:00 2001
From: Klaus <klaus.boehnlein@tu-dresden.de>
Date: Tue, 30 Aug 2022 02:38:00 +0200
Subject: [PATCH] Update

---
 .../EffectiveQuantitiesComputer.hh            |  4 ++--
 inputs/cellsolver.parset                      | 12 +++-------
 install-commands.sh                           | 24 +++++++++++++++++++
 src/CMakeLists.txt                            |  3 +--
 4 files changed, 30 insertions(+), 13 deletions(-)
 create mode 100644 install-commands.sh

diff --git a/dune/microstructure/EffectiveQuantitiesComputer.hh b/dune/microstructure/EffectiveQuantitiesComputer.hh
index d9f597b4..d704637f 100644
--- a/dune/microstructure/EffectiveQuantitiesComputer.hh
+++ b/dune/microstructure/EffectiveQuantitiesComputer.hh
@@ -177,7 +177,7 @@ public:
                     if (b==0)
                     {
                         auto prestrainPhaseValue = prestrain_(localIndicatorFunction(quadPos));
-                        elementPrestrain += scalarProduct(material_.ElasticityTensor(X1,localIndicatorFunction(quadPos)),sym(prestrainPhaseValue));
+                        elementPrestrain += scalarProduct(material_.ElasticityTensor(X1,localIndicatorFunction(quadPos)),sym(prestrainPhaseValue)) * quadPoint.weight() * integrationElement;
                         // elementPrestrain += linearizedStVenantKirchhoffDensity(mu(quadPos), lambda(quadPos), X1, prestrainFunctional(quadPos)) * quadPoint.weight() * integrationElement;
                     }
                 }
@@ -226,7 +226,7 @@ public:
   // --- write Data to Matlab / Optimization-Code
     void writeToMatlab(std::string outputPath)
     {
-        std::cout << "write effective quantities to Matlab folder..." << std::endl;
+        std::cout << "write effective quantities as .txt files to output folder..." << std::endl;
         //writeMatrixToMatlab(Q, "../../Matlab-Programs/QMatrix.txt");
         writeMatrixToMatlab(Qeff_, outputPath + "/QMatrix.txt");
         // write effective Prestrain in Matrix for Output
diff --git a/inputs/cellsolver.parset b/inputs/cellsolver.parset
index 7db3997e..163ae6c4 100644
--- a/inputs/cellsolver.parset
+++ b/inputs/cellsolver.parset
@@ -13,7 +13,7 @@ outputPath=/home/klaus/Desktop/Dune-Testing/dune-microstructure/outputs
 
 
 # --- DEBUG (Output) Option:
-print_debug = true  #(default=false)
+#print_debug = true  #(default=false)
 
 
 #############################################
@@ -24,7 +24,7 @@ print_debug = true  #(default=false)
 ## {start,finish} computes on all grid from 2^(start) to 2^finish refinement
 #----------------------------------------------------
 
-numLevels= 2 2      # computes all levels from first to second entry
+numLevels= 2 3      # computes all levels from first to second entry
 
 
 #############################################
@@ -44,12 +44,6 @@ gamma=1.0
 
 
 
-#--- choose composite-Implementation:
-#geometryFunctionPath = /home/stefan/DUNE/dune-microstructure/geometries
-geometryFunctionPath = /home/klaus/Desktop/Dune-Testing/dune-microstructure/geometries
-
-
-
 
 #############################################
 #  Assembly options
@@ -93,4 +87,4 @@ write_checkOrthogonality = true
 #write_corrector_phi3 = true
 
 # --- write effective quantities to Matlab-folder for symbolic minimization:
-write_toMATLAB = false  
+write_toMATLAB = true  # writes effective quantities to .txt-files QMatrix.txt and BMatrix.txt
diff --git a/install-commands.sh b/install-commands.sh
new file mode 100644
index 00000000..4838b4a5
--- /dev/null
+++ b/install-commands.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+
+
+
+git clone https://gitlab.dune-project.org/core/dune-common
+git clone https://gitlab.dune-project.org/core/dune-geometry
+git clone https://gitlab.dune-project.org/core/dune-grid
+git clone https://gitlab.dune-project.org/core/dune-istl
+git clone https://gitlab.dune-project.org/core/dune-localfunctions.git
+git clone https://gitlab.dune-project.org/staging/dune-functions
+git clone https://gitlab.dune-project.org/staging/dune-uggrid
+git clone https://gitlab.dune-project.org/staging/dune-typetree
+git clone git@gitlab.mn.tu-dresden.de:s7603593/dune-microstructure.git
+
+git clone https://git.imp.fu-berlin.de/agnumpde/dune-matrix-vector.git
+git clone https://git.imp.fu-berlin.de/agnumpde/dune-fufem.git
+git clone https://git.imp.fu-berlin.de/agnumpde/dune-solvers.git
+
+
+
+dunecontrol all
+
+./dune-microstructure/build-cmake/src/Cell-Problem ./dune-microstructure/inputs/cellsolver.parset
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 42b95a4c..f3f3b05f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,8 +3,7 @@
 #set(CMAKE_BUILD_TYPE Debug)#
 
 
-set(programs Cell-Problem
-             Cell-Problem-New)
+set(programs Cell-Problem)
 
 
 foreach(_program ${programs})
-- 
GitLab