Skip to content
Snippets Groups Projects
Commit 2bc67e46 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Handle extremal nodes

parent 52056891
Branches
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ int main() {
double const nu = 0.3;
int const refinements = 5;
size_t const solver_maxIterations = 10000;
double const solver_tolerance = 1e-5;
double const solver_tolerance = 1e-4;
typedef Dune::YaspGrid<dim> GridType;
......@@ -98,26 +98,41 @@ int main() {
VertexMapper myVertexMapper(leafView);
size_t bounding_nodes = 0;
size_t extremal_nodes = 0;
for (VertexLeafIterator it = leafView.begin<dim>();
it != leafView.end<dim>(); ++it) {
Dune::GeometryType gt = it->type();
assert(it->geometry().corners() == 1);
SmallVector coordinates = it->geometry().corner(0);
bool bounding(false);
bool extremal(true);
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 (bounding) {
++bounding_nodes;
size_t id = myVertexMapper.map(*it);
std::cout << "Ignoring id #" << id << std::endl;
ignoreNodes[id] = true;
}
if (extremal) {
++extremal_nodes;
size_t id = myVertexMapper.map(*it);
// std::cout << "Ignoring id #" << id << std::endl;
// ignoreNodes[id] = true;
}
}
std::cout << "Number of bounding nodes: " << bounding_nodes << std::endl;
std::cout << "Number of extremal nodes: " << extremal_nodes << std::endl;
}
blockGSStep.ignoreNodes_ = &ignoreNodes;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment