From 5f147502fccda37d28f0266c898001259b8674a7 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 14 Jun 2011 13:23:39 +0000
Subject: [PATCH] add support for 3d grids

[[Imported from SVN: r7434]]
---
 cosserat-continuum.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/cosserat-continuum.cc b/cosserat-continuum.cc
index 04bd5e79..74892caf 100644
--- a/cosserat-continuum.cc
+++ b/cosserat-continuum.cc
@@ -249,8 +249,13 @@ int main (int argc, char *argv[]) try
     
     DeformedGridType deformedGrid(grid, deformationFunction);
 
-    LeafAmiraMeshWriter<DeformedGridType>::writeSurfaceGrid(deformedGrid.leafView(), "cosseratGrid");
-
+    if (dim==2)
+        LeafAmiraMeshWriter<DeformedGridType>::writeSurfaceGrid(deformedGrid.leafView(), "cosseratGrid");
+    else {
+        LeafAmiraMeshWriter<DeformedGridType> amiramesh(deformedGrid);
+        amiramesh.write("cosseratGrid");
+    }
+    
     // Make three vector fields containing the directors
     // I don't think there is a simpler way to get the data into vanilla Amira
     
-- 
GitLab