From d6e682b04d0697a4fb73994c85731d29ac91f722 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Thu, 3 Nov 2011 14:47:20 +0100 Subject: [PATCH] Quit counting nodes unnecessarily --- src/one-body-sample.cc | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 4a5809fb..b8a6f359 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -57,29 +57,11 @@ void setup_boundary(GridType const &grid, size_t dirichlet_nodes = 0; size_t neumann_nodes = 0; size_t frictional_nodes = 0; - size_t bounding_nodes = 0; - size_t extremal_nodes = 0; - size_t overall_nodes = 0; for (VertexLeafIterator it = leafView.template begin<dim>(); it != leafView.template end<dim>(); ++it) { Dune::GeometryType const gt = it->type(); assert(it->geometry().corners() == 1); Dune::FieldVector<double, dim> const coordinates = it->geometry().corner(0); - bool bounding(false); - bool extremal(true); - ++overall_nodes; - for (int i = 0; i < dim; ++i) { - if (coordinates[i] == end_points[i] || coordinates[i] == 0) { - bounding = true; - break; - } - } - for (int i = 0; i < dim; ++i) { - if (coordinates[i] != end_points[i] && coordinates[i] != 0) { - extremal = false; - break; - } - } if (coordinates[0] == end_points[0]) { ++dirichlet_nodes; size_t const id = myVertexMapper.map(*it); @@ -93,21 +75,10 @@ void setup_boundary(GridType const &grid, size_t const id = myVertexMapper.map(*it); frictionalNodes[id] = true; } - if (bounding) { - ++bounding_nodes; - size_t const id = myVertexMapper.map(*it); - } - if (extremal) { - ++extremal_nodes; - size_t const id = myVertexMapper.map(*it); - } } std::cout << "Number of Neumann nodes: " << neumann_nodes << std::endl; std::cout << "Number of Dirichlet nodes: " << dirichlet_nodes << std::endl; std::cout << "Number of frictional nodes: " << dirichlet_nodes << std::endl; - std::cout << "Number of bounding nodes: " << bounding_nodes << std::endl; - std::cout << "Number of extremal nodes: " << extremal_nodes << std::endl; - std::cout << "Number of nodes: " << overall_nodes << std::endl; } // Assembles Neumann boundary term in f -- GitLab