diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 8fdb7c815c33b1a435222b4289c3aed9e7427a7c..87916e1514b29c06e5ad8d926d935308f2a34e49 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -43,7 +43,7 @@ #include <dune/tectonic/myconvexproblem.hh> #include <dune/tectonic/myblockproblem.hh> -int const dim = 3; +int const dim = 2; template <class GridView> void setup_boundary(GridView const &gridView, @@ -65,19 +65,19 @@ void setup_boundary(GridView const &gridView, Dune::GeometryType const gt = it->type(); assert(it->geometry().corners() == 1); Dune::FieldVector<double, dim> const coordinates = it->geometry().corner(0); - if (coordinates[0] == end_points[0]) { + if (coordinates[1] == end_points[0]) { ++dirichlet_nodes; size_t const id = myVertexMapper.map(*it); ignoreNodes[id] = true; } else if (coordinates[1] == 0) { - ++neumann_nodes; - size_t const id = myVertexMapper.map(*it); - neumannNodes[id] = true; - } else if (coordinates[0] == 0) { ++frictional_nodes; size_t const id = myVertexMapper.map(*it); frictionalNodes[id] = true; ignoreNodes[id][1] = true; // Zero displacement in direction y + } else if (coordinates[0] == 0) { + ++neumann_nodes; + size_t const id = myVertexMapper.map(*it); + neumannNodes[id] = true; } } std::cout << "Number of Neumann nodes: " << neumann_nodes << std::endl; @@ -135,7 +135,7 @@ int main() { // FIXME: Random values size_t const runs = 1000; - double const E = 1e4; + double const E = 5e3; double const nu = 0.3; int const refinements = 3; size_t const solver_maxIterations = 10000; @@ -207,7 +207,7 @@ int main() { // TODO: Random value std::vector<double> normalStress; normalStress.resize(grid.size(grid.maxLevel(), dim)); - std::fill(normalStress.begin(), normalStress.end(), 0.0); + std::fill(normalStress.begin(), normalStress.end(), 2.0); // TODO: Random value std::vector<double> coefficientOfFriction;