From 256e4ce657d9caa1c8e191702a98a4fd7d0654df Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 28 Aug 2007 09:07:27 +0000
Subject: [PATCH] bugfix: don't disregard initial rod configuration when
 computing errors

[[Imported from SVN: r1609]]
---
 dirneucoupling.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dirneucoupling.cc b/dirneucoupling.cc
index cb89749a..0e40b35f 100644
--- a/dirneucoupling.cc
+++ b/dirneucoupling.cc
@@ -138,10 +138,8 @@ int main (int argc, char *argv[]) try
 
     rodX.back().q = Quaternion<double>(axis, M_PI*angle/180);
 
-    std::cout << "Right boundary orientation:" << std::endl;
-    std::cout << "director 0:  " << rodX[rodX.size()-1].q.director(0) << std::endl;
-    std::cout << "director 1:  " << rodX[rodX.size()-1].q.director(1) << std::endl;
-    std::cout << "director 2:  " << rodX[rodX.size()-1].q.director(2) << std::endl;
+    // Backup initial rod iterate for later reference
+    RodSolutionType initialIterateRod = rodX;
 
     int toplevel = rodGrid.maxLevel();
 
@@ -467,7 +465,9 @@ int main (int argc, char *argv[]) try
     // from zero anyways
     oldError += computeEnergyNormSquared(exactSol3d, *hessian3d);
     
-    /** \todo Rod error still missing */
+    // Error of the initial rod iterate
+    RodDifferenceType rodDifference = computeRodDifference(initialIterateRod, exactSolRod);
+    oldError += computeEnergyNormSquared(rodDifference, hessianRod);
 
     oldError = std::sqrt(oldError);
 
-- 
GitLab