From d9dd8faf803cfc056e514bf10d5ea70f9ca60940 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 13 Dec 2017 14:19:52 +0100 Subject: [PATCH] Make write_gnuplot_dof_support_point_info more robust by lexicographic indices with roundoff tolerance. --- source/dofs/dof_tools.cc | 17 +++---- ...e_gnuplot_dof_support_point_info_03.output | 2 +- .../renumber_cuthill_mckee_03.mpirun=2.output | 44 +++++++++---------- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index 7ad39de9c3..727a99eb4c 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -59,10 +59,10 @@ namespace DoFTools * "less" than the other one. This can be used to use Point as a key in * std::map. * - * Comparison is done by comparing values in each dimension in ascending - * order (first x, then y, etc.). Note that comparisons are done without an - * epsilon, so points need to have identical floating point components to be - * considered equal. + * Comparison is done through an artificial downstream direction that + * tells directions apart through a factor of 1e-5. The final comparison + * is done without an epsilon, so points need to have identical floating + * point components to be considered equal. */ template struct ComparisonHelper @@ -75,13 +75,14 @@ namespace DoFTools bool operator() (const Point &lhs, const Point &rhs) const { + double downstream_size = 0; + double weight = 1.; for (unsigned int d=0; d