diff --git a/cosserat-continuum.cc b/cosserat-continuum.cc index e03b1c59f03c2ccee47a462214efde3cf41f166b..cff9b6c8bf9b78d301b9ee872db5c91caebf9f63 100644 --- a/cosserat-continuum.cc +++ b/cosserat-continuum.cc @@ -163,7 +163,7 @@ int main (int argc, char *argv[]) try for (; vIt!=vEndIt; ++vIt) { -#if 1 // Boundary conditions for the cantilever example +#if 0 // 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++) @@ -178,6 +178,15 @@ int main (int argc, char *argv[]) try for (int j=0; j<3; j++) dirichletNodes[grid->leafIndexSet().index(*vIt)][j] = true; } +#endif +#if 1 // Boundary conditions for the cantilever example + if (vIt->geometry().corner(0)[0] < 1.0) { + // 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] < -239 ) + neumannNodes[grid->leafIndexSet().index(*vIt)][0] = true; #endif }