From 862487c220c8c63854b00c72e7ac23acdfee7c64 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Tue, 13 Dec 2011 20:40:49 +0100
Subject: [PATCH] TODOs / comments

---
 dune/tectonic/localnonlinearity.hh | 3 +++
 dune/tectonic/myblockproblem.hh    | 2 ++
 src/TODO.org                       | 4 ++++
 src/one-body-sample.cc             | 4 ++--
 src/one-body-sample.parset         | 2 +-
 5 files changed, 12 insertions(+), 3 deletions(-)
 create mode 100644 src/TODO.org

diff --git a/dune/tectonic/localnonlinearity.hh b/dune/tectonic/localnonlinearity.hh
index 97f61a11..a6ce8e3b 100644
--- a/dune/tectonic/localnonlinearity.hh
+++ b/dune/tectonic/localnonlinearity.hh
@@ -81,6 +81,7 @@ template <int dimension> class LocalNonlinearity {
       A[k][k] += (h2 - h1ox) * x[k] * x[k] / normX2 + h1ox;
   }
 
+  // TODO: do not evaluate at zero
   void addGradient(VectorType const &x, VectorType &y) const {
     if (x == VectorType(0))
       return;
@@ -90,11 +91,13 @@ template <int dimension> class LocalNonlinearity {
     y += tmp;
   }
 
+  // TODO: do not evaluate at zero
   void upperGradient(VectorType const &x, VectorType &ret) const {
     ret = x;
     ret *= func_->rightDifferential(x.two_norm()) / x.two_norm();
   }
 
+  // TODO: do not evaluate at zero
   void lowerGradient(VectorType const &x, VectorType &ret) const {
     ret = x;
     ret *= func_->leftDifferential(x.two_norm()) / x.two_norm();
diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh
index ecd7b7b9..f79ee7b2 100644
--- a/dune/tectonic/myblockproblem.hh
+++ b/dune/tectonic/myblockproblem.hh
@@ -86,6 +86,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
     Interval<double> ab;
     for (int i = 0; i < u.size(); ++i) {
       for (int j = 0; j < block_size; ++j) {
+        // TODO: handle smooth domain
         // problem.phi.smoothDomain(i, u[i][j], regularity_tol, ab, j);
 
         // // if (phi is not regular at u) or (u is not in smooth domain) or
@@ -102,6 +103,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
     // construct sparsity pattern for linearization
     Dune::MatrixIndexSet indices(problem.A.N(), problem.A.M());
     indices.import(problem.A);
+    // TODO: handle smooth domain
     // problem.phi.addHessianIndices(indices);
 
     // construct matrix from pattern and initialize it
diff --git a/src/TODO.org b/src/TODO.org
new file mode 100644
index 00000000..012f29b2
--- /dev/null
+++ b/src/TODO.org
@@ -0,0 +1,4 @@
+* compute damping parameter
+* investigate why laursen fails
+* handle smooth domain properly
+* fix up octave bindings (low-pri)
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 478d2258..564b7f5d 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -244,13 +244,13 @@ int main(int argc, char *argv[]) {
     nonlinearGSStep.ignoreNodes_ = &ignoreNodes;
 
     VectorType u1(grid.size(grid.maxLevel(), dim));
-    u1 = 0;
+    u1 = 0.0; // Has to be zero!
     VectorType u2 = u1;
     VectorType u3 = u1;
     VectorType u4 = u1;
 
     VectorType u1_diff_new(grid.size(grid.maxLevel(), dim));
-    u1_diff_new = 0;
+    u1_diff_new = 0.0; // Has to be zero!
     VectorType u2_diff_new = u1_diff_new;
     VectorType u3_diff_new = u1_diff_new;
     VectorType u4_diff_new = u1_diff_new;
diff --git a/src/one-body-sample.parset b/src/one-body-sample.parset
index d49f051d..1a1c3370 100644
--- a/src/one-body-sample.parset
+++ b/src/one-body-sample.parset
@@ -39,7 +39,7 @@ normalstress = 0.1 # laursen depends a lot more on this
 #    http://earthquake.usgs.gov/research/physics/lab/prediction.pdf
 mu = 0.5
 eta = 1
-model = Ruina
+model = Ruina # TODO: Laursen doesn't work with TNNMG
 
 [boundary.friction.ruina]
 # "For rocks, typical values of A and B range from 0.005 to 0.015"
-- 
GitLab