From daabb6054be1afe6c251f9828f6f9bcad2abf08d Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Fri, 28 Jun 2013 13:36:11 +0000
Subject: [PATCH] added the code for the twisted-strip boundary conditions

[[Imported from SVN: r9274]]
---
 cosserat-continuum.cc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/cosserat-continuum.cc b/cosserat-continuum.cc
index b208d185..f78975fd 100644
--- a/cosserat-continuum.cc
+++ b/cosserat-continuum.cc
@@ -162,15 +162,23 @@ int main (int argc, char *argv[]) try
     GridType::Codim<dim>::LeafIterator vEndIt = grid->leafend<dim>();
 
     for (; vIt!=vEndIt; ++vIt) {
+
+#if 1   // Boundary conditions for the cantilever example
         if (vIt->geometry().corner(0)[0] < 1.0+1e-3 /* or vIt->geometry().corner(0)[0] > upper[0]-1e-3*/ ) {
             // Only translation dofs are Dirichlet
             for (int j=0; j<3; j++)
                 dirichletNodes[grid->leafIndexSet().index(*vIt)][j] = true;
         }
-        if (vIt->geometry().corner(0)[0] > upper[0]-1e-3 ) {
+        if (vIt->geometry().corner(0)[0] > upper[0]-1e-3 )
             neumannNodes[grid->leafIndexSet().index(*vIt)][0] = true;
+#endif
+#if 0   // Boundary conditions for the twisted-strip example
+        if (vIt->geometry().corner(0)[0] < lower[0]+1e-3  or vIt->geometry().corner(0)[0] > upper[0]-1e-3 ) {
+            // Only translation dofs are Dirichlet
+            for (int j=0; j<3; j++)
+                dirichletNodes[grid->leafIndexSet().index(*vIt)][j] = true;
         }
-
+#endif
     }
 
     //////////////////////////////////////////////////////////////////////////////
-- 
GitLab