diff options
Diffstat (limited to 'src/Coxeter_triangulation/include/gudhi/IO/build_mesh_from_cell_complex.h')
-rw-r--r-- | src/Coxeter_triangulation/include/gudhi/IO/build_mesh_from_cell_complex.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Coxeter_triangulation/include/gudhi/IO/build_mesh_from_cell_complex.h b/src/Coxeter_triangulation/include/gudhi/IO/build_mesh_from_cell_complex.h index 0dc98f95..c794cfa4 100644 --- a/src/Coxeter_triangulation/include/gudhi/IO/build_mesh_from_cell_complex.h +++ b/src/Coxeter_triangulation/include/gudhi/IO/build_mesh_from_cell_complex.h @@ -11,6 +11,7 @@ #ifndef IO_BUILD_MESH_FROM_CELL_COMPLEX_H_ #define IO_BUILD_MESH_FROM_CELL_COMPLEX_H_ +#include <gudhi/IO/output_debug_traces_to_html.h> // for DEBUG_TRACES #include <gudhi/IO/Mesh_medit.h> #include <Eigen/Dense> @@ -58,7 +59,7 @@ void populate_mesh(Mesh_medit& output, Simplex_cell_map& sc_map, Configuration c for (const std::size_t& v : vertex_indices) barycenter += output.vertex_points[v - 1]; ci_map.emplace(std::make_pair(cell, index++)); output.vertex_points.emplace_back((1. / vertex_indices.size()) * barycenter); -#ifdef GUDHI_COX_OUTPUT_TO_HTML +#ifdef DEBUG_TRACES std::string vlist = " (" + std::to_string(index - 1) + ")"; for (const std::size_t& v : vertex_indices) vlist += " " + std::to_string(v); cell_vlist_map.emplace(std::make_pair(to_string(cell), vlist)); @@ -66,12 +67,12 @@ void populate_mesh(Mesh_medit& output, Simplex_cell_map& sc_map, Configuration c } if (configuration.toggle_edges && sc_map.size() >= 2) - for (const auto& sc_map : sc_map[1]) { - Hasse_cell* edge_cell = sc_map.second; + for (const auto& sc_pair : sc_map[1]) { + Hasse_cell* edge_cell = sc_pair.second; Mesh_element_vertices edge; for (const auto& vi_pair : edge_cell->get_boundary()) edge.push_back(vi_map[vi_pair.first]); output.edges.emplace_back(std::make_pair(edge, configuration.ref_edges)); -#ifdef GUDHI_COX_OUTPUT_TO_HTML +#ifdef DEBUG_TRACES std::string vlist; for (const std::size_t& v : edge) vlist += " " + std::to_string(v); cell_vlist_map.emplace(std::make_pair(to_string(edge_cell), vlist)); @@ -97,7 +98,7 @@ void populate_mesh(Mesh_medit& output, Simplex_cell_map& sc_map, Configuration c for (const auto& vi_pair : ei_pair.first->get_boundary()) vertex_indices.emplace(vi_map[vi_pair.first]); for (const std::size_t& v : vertex_indices) barycenter += output.vertex_points[v - 1]; output.vertex_points.emplace_back((1. / vertex_indices.size()) * barycenter); -#ifdef GUDHI_COX_OUTPUT_TO_HTML +#ifdef DEBUG_TRACES std::string vlist = " (" + std::to_string(index) + ")"; for (const std::size_t& v : vertex_indices) vlist += " " + std::to_string(v); cell_vlist_map.emplace(std::make_pair(to_string(cell), vlist)); @@ -126,7 +127,7 @@ Mesh_medit build_mesh_from_cell_complex(const Cell_complex& cell_complex, std::size_t amb_d = std::min((int)cell_complex.cell_point_map().begin()->second.size(), 3); for (const auto& cp_pair : cell_complex.cell_point_map()) { -#ifdef GUDHI_COX_OUTPUT_TO_HTML +#ifdef DEBUG_TRACES std::string vlist; vlist += " " + std::to_string(index); cell_vlist_map.emplace(std::make_pair(to_string(cp_pair.first), vlist)); @@ -137,7 +138,7 @@ Mesh_medit build_mesh_from_cell_complex(const Cell_complex& cell_complex, } populate_mesh(output, cell_complex.interior_simplex_cell_maps(), i_configuration, amb_d, vi_map); -#ifdef GUDHI_COX_OUTPUT_TO_HTML +#ifdef DEBUG_TRACES for (const auto& sc_map : cell_complex.interior_simplex_cell_maps()) for (const auto& sc_pair : sc_map) { std::string simplex = "I" + to_string(sc_pair.first); @@ -147,7 +148,7 @@ Mesh_medit build_mesh_from_cell_complex(const Cell_complex& cell_complex, } #endif populate_mesh(output, cell_complex.boundary_simplex_cell_maps(), b_configuration, amb_d, vi_map); -#ifdef GUDHI_COX_OUTPUT_TO_HTML +#ifdef DEBUG_TRACES for (const auto& sc_map : cell_complex.boundary_simplex_cell_maps()) for (const auto& sc_pair : sc_map) { std::string simplex = "B" + to_string(sc_pair.first); |