From d6360a048f730bcc542b5fe8e1dd35b074de2038 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 26 Aug 2014 20:29:33 +0000
Subject: [PATCH] Work without numpy

For some reason, when numpy is used, I can't use ctrl-c to stop
the program.  But numpy is not really used anyway, so let's get
rid of it.

[[Imported from SVN: r9861]]
---
 cosserat-continuum.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/cosserat-continuum.cc b/cosserat-continuum.cc
index ebe5b41f..06db70ed 100644
--- a/cosserat-continuum.cc
+++ b/cosserat-continuum.cc
@@ -97,7 +97,7 @@ public:
   {
     Python::runStream()
         << std::endl << "def orientationDirichletValues(x):"
-        << std::endl << "    rotation = numpy.array([[1,0,0], [0, 1, 0], [0, 0, 1]])"
+        << std::endl << "    rotation = [[1,0,0], [0, 1, 0], [0, 0, 1]]"
         << std::endl << "    return rotation";
   }
 
@@ -130,7 +130,7 @@ public:
         << std::endl << "    center = [0, 0, 0]"
         << std::endl << "    center[1] = upper[1]/2.0"
 
-        << std::endl << "    rotation = numpy.array([[1,0,0], [0, math.cos(angle), -math.sin(angle)], [0, math.sin(angle), math.cos(angle)]])"
+        << std::endl << "    rotation = [[1,0,0], [0, math.cos(angle), -math.sin(angle)], [0, math.sin(angle), math.cos(angle)]]"
 
         << std::endl << "    inEmbedded = [x[0]-center[0], x[1]-center[1], 0-center[2]]"
 
@@ -149,7 +149,7 @@ public:
         << std::endl << "    angle = " << totalAngle_ << " * x[0]/upper[0];"
         << std::endl << "    angle *= " << homotopy_
 
-        << std::endl << "    rotation = numpy.array([[1,0,0], [0, math.cos(angle), -math.sin(angle)], [0, math.sin(angle), math.cos(angle)]])"
+        << std::endl << "    rotation = [[1,0,0], [0, math.cos(angle), -math.sin(angle)], [0, math.sin(angle), math.cos(angle)]]"
         << std::endl << "    return rotation";
   }
 
@@ -185,7 +185,6 @@ int main (int argc, char *argv[]) try
     Python::start();
     Python::Reference main = Python::import("__main__");
     Python::run("import math");
-    Python::run("import numpy");
 
     //feenableexcept(FE_INVALID);
 
-- 
GitLab