From: Daniel Arndt Date: Sun, 2 Jul 2023 04:06:11 +0000 (-0400) Subject: Remove deprecated functioins in GridReordering X-Git-Tag: relicensing~781^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15611%2Fhead;p=dealii.git Remove deprecated functioins in GridReordering --- diff --git a/doc/news/changes/incompatibilities/20230703DanielArndt b/doc/news/changes/incompatibilities/20230703DanielArndt new file mode 100644 index 0000000000..880dbf5661 --- /dev/null +++ b/doc/news/changes/incompatibilities/20230703DanielArndt @@ -0,0 +1,5 @@ +Removed: The deprecated functions GridReordering::reorder_cells() +and GridReordering::invert_all_cells_of_negative_grid() +have been removed. +
+(Daniel Arndt, 2023/07/03) diff --git a/include/deal.II/base/geometry_info.h b/include/deal.II/base/geometry_info.h index bc03da588f..02e0359a19 100644 --- a/include/deal.II/base/geometry_info.h +++ b/include/deal.II/base/geometry_info.h @@ -1633,9 +1633,10 @@ struct GeometryInfo<0> * Before a list of cells is passed to an object of the Triangulation class * for creation of a triangulation, you therefore have to make sure that cells * are oriented in a compatible fashion, so that edge directions are globally - * according to above convention. However, the GridReordering class can do - * this for you, by reorienting cells and edges of an arbitrary list of input - * cells that need not be already sorted. + * according to above convention. However, the + * GridTools::consistently_order_cells() function can do this for you, by + * reorienting cells and edges of an arbitrary list of input cells that need not + * be already sorted. * *

Faces

* diff --git a/include/deal.II/grid/grid_in.h b/include/deal.II/grid/grid_in.h index 3dd9db7fa8..b49c113775 100644 --- a/include/deal.II/grid/grid_in.h +++ b/include/deal.II/grid/grid_in.h @@ -278,11 +278,11 @@ struct CellData; * have orientations that need to be taken care of. * * For this reason, the read_* functions of this class that read in - * grids in various input formats call the GridReordering class to bring the - * order of vertices that define the cells into an ordering that satisfies the - * requirements of the Triangulation class. Be sure to read the documentation - * of that class if you experience unexpected problems when reading grids - * through this class. + * grids in various input formats call the GridTools::consistently_order_cells() + * function to bring the order of vertices that define the cells into an + * ordering that satisfies the requirements of the Triangulation class. Be sure + * to read the documentation of that class if you experience unexpected problems + * when reading grids through this class. * * *

Dealing with distorted mesh cells

diff --git a/include/deal.II/grid/grid_reordering.h b/include/deal.II/grid/grid_reordering.h deleted file mode 100644 index c5369798da..0000000000 --- a/include/deal.II/grid/grid_reordering.h +++ /dev/null @@ -1,120 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2000 - 2023 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#ifndef dealii_grid_reordering_h -#define dealii_grid_reordering_h - - -#include - -#include - -#include - -DEAL_II_NAMESPACE_OPEN - -/** - * A class implementing various grid reordering algorithms. For more information - * see the - * @ref reordering "reordering module". - * - * @deprecated Use GridTools::invert_all_negative_measure_cells() or - * GridTools::consistently_order_cells() instead of the functions provided by - * this class. Usage of the old-style numbering is deprecated. - */ -template -class GridReordering -{ -public: - /** - * This is the main function, doing what is announced in the general - * documentation of this class for dim=2 and 3 and doing nothing for dim=1. - * - * If a consistent reordering is not possible in dim=3, the original - * connectivity data is restored. - * - * @param original_cells An object that contains the data that describes the - * mesh. - * @param use_new_style_ordering If true, then use the standard ordering of - * vertices within a cell. If false (the default), then use the "old-style" - * ordering of vertices within cells used by deal.II before version 5.2 and - * as explained in the documentation of this class. - * - * @deprecated Use GridTools::consistently_order_cells() instead. - */ - DEAL_II_DEPRECATED - static void - reorder_cells(std::vector> &original_cells, - const bool use_new_style_ordering = false); - - /** - * Grids generated by grid generators may have an orientation of cells which - * is the inverse of the orientation required by deal.II. - * - * In 2d and 3d this function checks whether all cells have negative or - * positive measure/volume. In the former case, all cells are inverted. It - * does nothing in 1d. - * - * The inversion of cells might also work when only a subset of all cells - * have negative volume. However, grids consisting of a mixture of negative - * and positively oriented cells are very likely to be broken. Therefore, an - * exception is thrown, in case cells are not uniformly oriented. - * - * Note, that this function should be called before reorder_cells(). - * - * @param all_vertices The vertices of the mesh. - * @param original_cells An object that contains the data that describes the - * mesh. - * @param use_new_style_ordering If true, then use the standard ordering of - * vertices within a cell. If false (the default), then use the "old-style" - * ordering of vertices within cells used by deal.II before version 5.2 and - * as explained in the documentation of this class. - * - * @deprecated Use GridTools::invert_all_negative_measure_cells() instead. - */ - DEAL_II_DEPRECATED - static void - invert_all_cells_of_negative_grid( - const std::vector> &all_vertices, - std::vector> & original_cells, - const bool use_new_style_ordering = false); -}; - - -// declaration of explicit specializations -template <> -void -GridReordering<2>::invert_all_cells_of_negative_grid( - const std::vector> &all_vertices, - std::vector> & cells, - const bool use_new_style_ordering); - -template <> -void -GridReordering<2, 3>::invert_all_cells_of_negative_grid( - const std::vector> &all_vertices, - std::vector> & cells, - const bool use_new_style_ordering); - -template <> -void -GridReordering<3>::invert_all_cells_of_negative_grid( - const std::vector> &all_vertices, - std::vector> & cells, - const bool use_new_style_ordering); - -DEAL_II_NAMESPACE_CLOSE - -#endif diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index cbfa05a523..ffcab4bc16 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -3827,24 +3827,20 @@ namespace GridTools << "The given vertex with index " << arg1 << " is not used in the given triangulation."); + /** + * An exception that is thrown whenever the edges of a mesh are not + * orientable. + * + * @ingroup Exceptions + */ + DeclExceptionMsg(ExcMeshNotOrientable, + "The edges of the mesh are not consistently orientable."); + /** @} */ } /*namespace GridTools*/ -/** - * An exception that is thrown whenever the edges of a mesh are not - * orientable. - * - * @note for backwards compatibility with the old GridReordering class this - * exception is not in the GridTools namespace. - * - * @ingroup Exceptions - */ -DeclExceptionMsg(ExcMeshNotOrientable, - "The edges of the mesh are not consistently orientable."); - - /* ----------------- Template function --------------- */ diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index cd10daeed1..f3b01b3976 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -555,9 +555,9 @@ namespace internal * numbering within cells. They do not only hold for the data read from an UCD * or any other input file, but also for the data passed to * create_triangulation(). See the documentation for the GridIn class for more - * details on this, and above all to the GridReordering class that explains - * many of the problems and an algorithm to reorder cells such that they - * satisfy the conditions outlined above. + * details on this, and above all to the GridTools::consistently_order_cells() + * function that explains many of the problems and an algorithm to reorder cells + * such that they satisfy the conditions outlined above. * *
  • Copying a triangulation: when computing on time dependent meshes or * when using adaptive refinement, you will often want to create a new @@ -1838,7 +1838,8 @@ public: * constraints; see the general class documentation for this. * * For conditions when this function can generate a valid triangulation, see - * the documentation of this class, and the GridIn and GridReordering class. + * the documentation of this class, and the GridIn and + * GridTools::consistently_order_cells() function. * * If the check_for_distorted_cells flag was specified upon * creation of this object, at the very end of its operation, the current diff --git a/source/grid/CMakeLists.txt b/source/grid/CMakeLists.txt index d26cd13bb3..3d70ba8095 100644 --- a/source/grid/CMakeLists.txt +++ b/source/grid/CMakeLists.txt @@ -33,7 +33,6 @@ endif() set(_unity_include_src cell_id.cc grid_refinement.cc - grid_reordering.cc intergrid_map.cc manifold.cc manifold_lib.cc diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index e0a2ed8699..5b911d8088 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index 29b1c96569..92a068b609 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/source/grid/grid_reordering.cc b/source/grid/grid_reordering.cc deleted file mode 100644 index d8aa5983ab..0000000000 --- a/source/grid/grid_reordering.cc +++ /dev/null @@ -1,228 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2000 - 2023 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -#include -#include - -#include -#include - -#include -#include -#include -#include - -DEAL_II_NAMESPACE_OPEN - - -// anonymous namespace for internal helper functions -namespace -{ - /** - * This file uses a different ordering for the vertices in a hex - * cell than we usually do in deal.II. The different convention used - * here originates in what we believed the ordering to be in UCD - * format, until it was discovered in 2022 that UCD will interpret - * this ordering to correspond to inverted cells -- as a - * consequence, the UCD ordering was fixed, but the current file is - * stuck on the old ordering. - */ - constexpr std::array local_vertex_numbering{ - {0, 1, 5, 4, 2, 3, 7, 6}}; - - /** - * Following is a set of functions that reorder the data from the - * "current" to the "classic" format of vertex numbering of cells - * and faces. These functions do the reordering of their arguments - * in-place. - */ - void - reorder_new_to_old_style(std::vector> &) - {} - - - void - reorder_new_to_old_style(std::vector> &cells) - { - for (auto &cell : cells) - std::swap(cell.vertices[2], cell.vertices[3]); - } - - - void - reorder_new_to_old_style(std::vector> &cells) - { - unsigned int tmp[GeometryInfo<3>::vertices_per_cell]; - for (auto &cell : cells) - { - for (const unsigned int i : GeometryInfo<3>::vertex_indices()) - tmp[i] = cell.vertices[i]; - for (const unsigned int i : GeometryInfo<3>::vertex_indices()) - cell.vertices[i] = tmp[local_vertex_numbering[i]]; - } - } - - - /** - * And now also in the opposite direction. - */ - void - reorder_old_to_new_style(std::vector> &) - {} - - - void - reorder_old_to_new_style(std::vector> &cells) - { - // just invert the permutation: - reorder_new_to_old_style(cells); - } - - - void - reorder_old_to_new_style(std::vector> &cells) - { - // undo the ordering above - unsigned int tmp[GeometryInfo<3>::vertices_per_cell]; - for (auto &cell : cells) - { - for (const unsigned int i : GeometryInfo<3>::vertex_indices()) - tmp[i] = cell.vertices[i]; - for (const unsigned int i : GeometryInfo<3>::vertex_indices()) - cell.vertices[local_vertex_numbering[i]] = tmp[i]; - } - } -} // namespace - - - -template -void -GridReordering::reorder_cells(std::vector> &cells, - const bool use_new_style_ordering) -{ - Assert(cells.size() != 0, - ExcMessage("List of elements to orient must have at least one cell")); - - // there is nothing for us to do in 1d - if (dim == 1) - return; - - // if necessary, convert to new-style format - if (use_new_style_ordering == false) - reorder_old_to_new_style(cells); - - GridTools::consistently_order_cells(cells); - - // and convert back if necessary - if (use_new_style_ordering == false) - reorder_new_to_old_style(cells); -} - - - -template <> -void -GridReordering<1>::invert_all_cells_of_negative_grid( - const std::vector> &, - std::vector> &, - const bool) -{ - // nothing to be done in 1d -} - - - -template <> -void -GridReordering<1, 2>::invert_all_cells_of_negative_grid( - const std::vector> &, - std::vector> &, - const bool) -{ - // nothing to be done in 1d -} - - - -template <> -void -GridReordering<1, 3>::invert_all_cells_of_negative_grid( - const std::vector> &, - std::vector> &, - const bool) -{ - // nothing to be done in 1d -} - - -template <> -void -GridReordering<2>::invert_all_cells_of_negative_grid( - const std::vector> &all_vertices, - std::vector> & cells, - const bool use_new_style_ordering) -{ - if (!use_new_style_ordering) - reorder_old_to_new_style(cells); - - GridTools::invert_all_negative_measure_cells(all_vertices, cells); - - if (!use_new_style_ordering) - reorder_new_to_old_style(cells); -} - - - -template <> -void -GridReordering<2, 3>::invert_all_cells_of_negative_grid( - const std::vector> &, - std::vector> &, - const bool) -{ - Assert(false, ExcNotImplemented()); -} - - - -template <> -void -GridReordering<3>::invert_all_cells_of_negative_grid( - const std::vector> &all_vertices, - std::vector> & cells, - const bool use_new_style_ordering) -{ - if (!use_new_style_ordering) - reorder_old_to_new_style(cells); - - GridTools::invert_all_negative_measure_cells(all_vertices, cells); - - if (!use_new_style_ordering) - reorder_new_to_old_style(cells); -} - - - -/* ------------------------ explicit instantiations ------------------- */ -template class GridReordering<1, 1>; -template class GridReordering<1, 2>; -template class GridReordering<1, 3>; -template class GridReordering<2, 2>; -template class GridReordering<2, 3>; -template class GridReordering<3, 3>; - -DEAL_II_NAMESPACE_CLOSE diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index b8680497ea..d0cde0410d 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -41,7 +41,6 @@ #include #include -#include #include #include #include diff --git a/tests/aniso/mesh_3d_21.cc b/tests/aniso/mesh_3d_21.cc index a3332cc8ba..af5c1f33a5 100644 --- a/tests/aniso/mesh_3d_21.cc +++ b/tests/aniso/mesh_3d_21.cc @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/bits/coarsening_3d.cc b/tests/bits/coarsening_3d.cc index ac7b6742e4..738aa9bb08 100644 --- a/tests/bits/coarsening_3d.cc +++ b/tests/bits/coarsening_3d.cc @@ -19,7 +19,7 @@ // functions #include -#include +#include #include #include #include diff --git a/tests/bits/cylinder.cc b/tests/bits/cylinder.cc index 527a492e48..e043db7952 100644 --- a/tests/bits/cylinder.cc +++ b/tests/bits/cylinder.cc @@ -17,7 +17,8 @@ // similar to the hyper_ball_3d test, but for the cylinder grid. here, // the cause for the failure was different, though: the description of // the cells was wrong, and they were not sent through the -// GridReordering class which would have cured the problem. +// GridTools::consistently_order_cells() function which would have cured the +// problem. #include diff --git a/tests/bits/distorted_cells_01.cc b/tests/bits/distorted_cells_01.cc index e7b9298b82..284e573680 100644 --- a/tests/bits/distorted_cells_01.cc +++ b/tests/bits/distorted_cells_01.cc @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/bits/distorted_cells_02.cc b/tests/bits/distorted_cells_02.cc index 6b1cdf0f81..3de85fbdf0 100644 --- a/tests/bits/distorted_cells_02.cc +++ b/tests/bits/distorted_cells_02.cc @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/bits/distorted_cells_06.cc b/tests/bits/distorted_cells_06.cc index 6255781a0a..8acb90ffec 100644 --- a/tests/bits/distorted_cells_06.cc +++ b/tests/bits/distorted_cells_06.cc @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/tests/bits/distorted_cells_07.cc b/tests/bits/distorted_cells_07.cc index 079a2ac326..f9edac2f15 100644 --- a/tests/bits/distorted_cells_07.cc +++ b/tests/bits/distorted_cells_07.cc @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/bits/neighboring_cells_at_two_faces.cc b/tests/bits/neighboring_cells_at_two_faces.cc index 7644d105a9..4ad6151b44 100644 --- a/tests/bits/neighboring_cells_at_two_faces.cc +++ b/tests/bits/neighboring_cells_at_two_faces.cc @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -69,7 +69,7 @@ create_grid(Triangulation<2> &tria) // generate a triangulation // out of this - GridReordering<2>::reorder_cells(cells); + GridTools::consistently_order_cells(cells); try { tria.create_triangulation_compatibility(vertices, cells, SubCellData()); diff --git a/tests/bits/q_points.cc b/tests/bits/q_points.cc index 9c5f3c75ea..d5b04dd97a 100644 --- a/tests/bits/q_points.cc +++ b/tests/bits/q_points.cc @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include @@ -69,7 +69,7 @@ create_two_cubes(Triangulation<3> &coarse_grid) // finally generate a triangulation // out of this - GridReordering<3>::reorder_cells(cells); + GridTools::consistently_order_cells(cells); coarse_grid.create_triangulation_compatibility(vertices, cells, SubCellData()); diff --git a/tests/data_out/data_out_curved_cells.cc b/tests/data_out/data_out_curved_cells.cc index 35a4245915..cea603b299 100644 --- a/tests/data_out/data_out_curved_cells.cc +++ b/tests/data_out/data_out_curved_cells.cc @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/tests/grid/grid_generator_10.cc b/tests/grid/grid_generator_10.cc index f403567903..e6fa88d3e8 100644 --- a/tests/grid/grid_generator_10.cc +++ b/tests/grid/grid_generator_10.cc @@ -15,10 +15,10 @@ -// Test GridReordering<3>::reorder_cells +// Test GridTools::consistently_order_cells #include -#include +#include #include #include @@ -76,7 +76,7 @@ my_cylinder(Triangulation<3> &tria, cells[i].material_id = 0; }; - GridReordering<3>::reorder_cells(cells); + GridTools::consistently_order_cells(cells); tria.create_triangulation(std::vector>(&vertices[0], &vertices[16]), cells, SubCellData()); // no boundary information diff --git a/tests/grid/grid_generator_subdivided_cylinder.cc b/tests/grid/grid_generator_subdivided_cylinder.cc index 41c29fcedb..79d59f7826 100644 --- a/tests/grid/grid_generator_subdivided_cylinder.cc +++ b/tests/grid/grid_generator_subdivided_cylinder.cc @@ -15,7 +15,7 @@ -// Test GridReordering<3>::reorder_cells +// Test GridTools::consistently_order_cells #include #include diff --git a/tests/grid/grid_invert.cc b/tests/grid/grid_invert.cc index 2572c9a36a..d55dfb56d4 100644 --- a/tests/grid/grid_invert.cc +++ b/tests/grid/grid_invert.cc @@ -18,12 +18,55 @@ #include #include -#include +#include #include #include "../tests.h" +namespace +{ + /** + * This file uses a different ordering for the vertices in a hex + * cell than we usually do in deal.II. The different convention used + * here originates in what we believed the ordering to be in UCD + * format, until it was discovered in 2022 that UCD will interpret + * this ordering to correspond to inverted cells -- as a + * consequence, the UCD ordering was fixed, but the current file is + * stuck on the old ordering. + */ + constexpr std::array local_vertex_numbering{ + {0, 1, 5, 4, 2, 3, 7, 6}}; + + /** + * Following is a set of functions that reorder the data from the + * "current" to the "classic" format of vertex numbering of cells + * and faces. These functions do the reordering of their arguments + * in-place. + */ + void + reorder_old_to_new_style(std::vector> &cells) + { + for (auto &cell : cells) + std::swap(cell.vertices[2], cell.vertices[3]); + } + + + void + reorder_old_to_new_style(std::vector> &cells) + { + // undo the ordering above + unsigned int tmp[GeometryInfo<3>::vertices_per_cell]; + for (auto &cell : cells) + { + for (const unsigned int i : GeometryInfo<3>::vertex_indices()) + tmp[i] = cell.vertices[i]; + for (const unsigned int i : GeometryInfo<3>::vertex_indices()) + cell.vertices[local_vertex_numbering[i]] = tmp[i]; + } + } +} // namespace + template void test(bool second_case = false) @@ -55,10 +98,12 @@ test(bool second_case = false) } SubCellData subcelldata; - GridReordering::invert_all_cells_of_negative_grid(vertices, cells); + + reorder_old_to_new_style(cells); + GridTools::invert_all_negative_measure_cells(vertices, cells); Triangulation tria; - tria.create_triangulation_compatibility(vertices, cells, subcelldata); + tria.create_triangulation(vertices, cells, subcelldata); std::ostream &logfile = deallog.get_file_stream(); logfile << "---------------------------------------------" << std::endl diff --git a/tests/grid/mesh_3d.h b/tests/grid/mesh_3d.h index 8ffd7d2c37..a7d5d3b317 100644 --- a/tests/grid/mesh_3d.h +++ b/tests/grid/mesh_3d.h @@ -13,7 +13,7 @@ // // --------------------------------------------------------------------- -#include +#include #include #include #include @@ -26,6 +26,38 @@ // match up for the standard orientation of the normals. we thus have // to store the face orientation in each cell +namespace +{ + /** + * This file uses a different ordering for the vertices in a hex + * cell than we usually do in deal.II. The different convention used + * here originates in what we believed the ordering to be in UCD + * format, until it was discovered in 2022 that UCD will interpret + * this ordering to correspond to inverted cells -- as a + * consequence, the UCD ordering was fixed, but the current file is + * stuck on the old ordering. + */ + constexpr std::array local_vertex_numbering{ + {0, 1, 5, 4, 2, 3, 7, 6}}; + + /** + * And now also in the opposite direction. + */ + void + reorder_old_to_new_style(std::vector> &cells) + { + // undo the ordering above + unsigned int tmp[GeometryInfo<3>::vertices_per_cell]; + for (auto &cell : cells) + { + for (const unsigned int i : GeometryInfo<3>::vertex_indices()) + tmp[i] = cell.vertices[i]; + for (const unsigned int i : GeometryInfo<3>::vertex_indices()) + cell.vertices[local_vertex_numbering[i]] = tmp[i]; + } + } +} // namespace + void create_two_cubes(Triangulation<3> &coarse_grid) { @@ -57,10 +89,10 @@ create_two_cubes(Triangulation<3> &coarse_grid) // finally generate a triangulation // out of this - GridReordering<3>::reorder_cells(cells); - coarse_grid.create_triangulation_compatibility(vertices, - cells, - SubCellData()); + // if necessary, convert to new-style format + reorder_old_to_new_style(cells); + GridTools::consistently_order_cells(cells); + coarse_grid.create_triangulation(vertices, cells, SubCellData()); } @@ -159,10 +191,9 @@ create_L_shape(Triangulation<3> &coarse_grid) // finally generate a triangulation // out of this - GridReordering<3>::reorder_cells(cells); - coarse_grid.create_triangulation_compatibility(vertices, - cells, - SubCellData()); + reorder_old_to_new_style(cells); + GridTools::consistently_order_cells(cells); + coarse_grid.create_triangulation(vertices, cells, SubCellData()); } diff --git a/tests/grid/mesh_3d_1.cc b/tests/grid/mesh_3d_1.cc index 1d78f2275b..47ee87531e 100644 --- a/tests/grid/mesh_3d_1.cc +++ b/tests/grid/mesh_3d_1.cc @@ -22,7 +22,7 @@ // coarsening_3d), but we can check this fact much earlier already (done // here) -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_10.cc b/tests/grid/mesh_3d_10.cc index e58fa89798..cb12fbce89 100644 --- a/tests/grid/mesh_3d_10.cc +++ b/tests/grid/mesh_3d_10.cc @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_11.cc b/tests/grid/mesh_3d_11.cc index ae0e59c7c7..36335a844f 100644 --- a/tests/grid/mesh_3d_11.cc +++ b/tests/grid/mesh_3d_11.cc @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_12.cc b/tests/grid/mesh_3d_12.cc index 210dbfeed4..427f799d6b 100644 --- a/tests/grid/mesh_3d_12.cc +++ b/tests/grid/mesh_3d_12.cc @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_13.cc b/tests/grid/mesh_3d_13.cc index ab52e7bff7..e11e636997 100644 --- a/tests/grid/mesh_3d_13.cc +++ b/tests/grid/mesh_3d_13.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_14.cc b/tests/grid/mesh_3d_14.cc index aa761c0811..2cc5b9c9e4 100644 --- a/tests/grid/mesh_3d_14.cc +++ b/tests/grid/mesh_3d_14.cc @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_15.cc b/tests/grid/mesh_3d_15.cc index 6f89d0bb70..86f6316838 100644 --- a/tests/grid/mesh_3d_15.cc +++ b/tests/grid/mesh_3d_15.cc @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_16.cc b/tests/grid/mesh_3d_16.cc index 4ab961ef8c..c238dde5e7 100644 --- a/tests/grid/mesh_3d_16.cc +++ b/tests/grid/mesh_3d_16.cc @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_17.cc b/tests/grid/mesh_3d_17.cc index 2a54cf8051..6dbbb8afd0 100644 --- a/tests/grid/mesh_3d_17.cc +++ b/tests/grid/mesh_3d_17.cc @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_2.cc b/tests/grid/mesh_3d_2.cc index 6dd1feec9f..d9a5eee45e 100644 --- a/tests/grid/mesh_3d_2.cc +++ b/tests/grid/mesh_3d_2.cc @@ -23,7 +23,7 @@ // this test just checks that such a mesh can be created. further // tests check that we are still producing consistent states with this -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_20.cc b/tests/grid/mesh_3d_20.cc index c95487e02f..c148938c4c 100644 --- a/tests/grid/mesh_3d_20.cc +++ b/tests/grid/mesh_3d_20.cc @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_21.cc b/tests/grid/mesh_3d_21.cc index 63507e0ed7..7c9b27be8e 100644 --- a/tests/grid/mesh_3d_21.cc +++ b/tests/grid/mesh_3d_21.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_3.cc b/tests/grid/mesh_3d_3.cc index dac69db1b7..c70c5c26a6 100644 --- a/tests/grid/mesh_3d_3.cc +++ b/tests/grid/mesh_3d_3.cc @@ -22,7 +22,7 @@ // // for this grid, check that vertex numbers still match up -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_4.cc b/tests/grid/mesh_3d_4.cc index 98f7502515..ee24e105e8 100644 --- a/tests/grid/mesh_3d_4.cc +++ b/tests/grid/mesh_3d_4.cc @@ -19,7 +19,7 @@ // counting them #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_5.cc b/tests/grid/mesh_3d_5.cc index 5e90aa1315..9605fc0439 100644 --- a/tests/grid/mesh_3d_5.cc +++ b/tests/grid/mesh_3d_5.cc @@ -19,7 +19,7 @@ // looking at them and checking their children #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_6.cc b/tests/grid/mesh_3d_6.cc index f05968e161..b565ab6e4a 100644 --- a/tests/grid/mesh_3d_6.cc +++ b/tests/grid/mesh_3d_6.cc @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_7.cc b/tests/grid/mesh_3d_7.cc index 36b1c86269..13baa9e4e6 100644 --- a/tests/grid/mesh_3d_7.cc +++ b/tests/grid/mesh_3d_7.cc @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_8.cc b/tests/grid/mesh_3d_8.cc index 7cd8cb50fc..6d7c497886 100644 --- a/tests/grid/mesh_3d_8.cc +++ b/tests/grid/mesh_3d_8.cc @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/grid/mesh_3d_9.cc b/tests/grid/mesh_3d_9.cc index cd4ee47e35..15fce9ea98 100644 --- a/tests/grid/mesh_3d_9.cc +++ b/tests/grid/mesh_3d_9.cc @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/manifold/transfinite_manifold_08.cc b/tests/manifold/transfinite_manifold_08.cc index 0dd290ea82..e4db06b3ef 100644 --- a/tests/manifold/transfinite_manifold_08.cc +++ b/tests/manifold/transfinite_manifold_08.cc @@ -17,7 +17,6 @@ // This test verifies that the transfinite interpolation works on a cylinder // with oblique faces -#include #include #include #include diff --git a/tests/manifold/transfinite_manifold_09.cc b/tests/manifold/transfinite_manifold_09.cc index d80947c783..4857783be2 100644 --- a/tests/manifold/transfinite_manifold_09.cc +++ b/tests/manifold/transfinite_manifold_09.cc @@ -17,7 +17,6 @@ // This test verifies that the transfinite interpolation works on a distorted // cylinder with some given coordinates -#include #include #include #include diff --git a/tests/mappings/mapping_q1_eulerian_01.cc b/tests/mappings/mapping_q1_eulerian_01.cc index e972a149ea..723512f3b3 100644 --- a/tests/mappings/mapping_q1_eulerian_01.cc +++ b/tests/mappings/mapping_q1_eulerian_01.cc @@ -34,7 +34,6 @@ #include #include -#include #include #include #include diff --git a/tests/mappings/mapping_q_eulerian_01.cc b/tests/mappings/mapping_q_eulerian_01.cc index 0d42bb6ead..7c0de2e18c 100644 --- a/tests/mappings/mapping_q_eulerian_01.cc +++ b/tests/mappings/mapping_q_eulerian_01.cc @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/tests/mappings/mapping_q_eulerian_02.cc b/tests/mappings/mapping_q_eulerian_02.cc index 69cfad5565..f216cc97ed 100644 --- a/tests/mappings/mapping_q_eulerian_02.cc +++ b/tests/mappings/mapping_q_eulerian_02.cc @@ -34,7 +34,6 @@ #include #include -#include #include #include #include diff --git a/tests/mappings/mapping_q_eulerian_03.cc b/tests/mappings/mapping_q_eulerian_03.cc index 90bbf9ca7a..a8f1ada2b3 100644 --- a/tests/mappings/mapping_q_eulerian_03.cc +++ b/tests/mappings/mapping_q_eulerian_03.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/tests/mappings/mapping_q_eulerian_07.cc b/tests/mappings/mapping_q_eulerian_07.cc index 07652bdc79..d53ee1e855 100644 --- a/tests/mappings/mapping_q_eulerian_07.cc +++ b/tests/mappings/mapping_q_eulerian_07.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/tests/mappings/mapping_q_eulerian_08.cc b/tests/mappings/mapping_q_eulerian_08.cc index 75bd58c2a5..5139b342ad 100644 --- a/tests/mappings/mapping_q_eulerian_08.cc +++ b/tests/mappings/mapping_q_eulerian_08.cc @@ -37,7 +37,6 @@ #include #include -#include #include #include #include diff --git a/tests/mappings/mapping_q_eulerian_11.cc b/tests/mappings/mapping_q_eulerian_11.cc index 8c69e8e12d..35ca3eac27 100644 --- a/tests/mappings/mapping_q_eulerian_11.cc +++ b/tests/mappings/mapping_q_eulerian_11.cc @@ -34,7 +34,6 @@ #include #include -#include #include #include #include diff --git a/tests/matrix_free/interpolate_to_mg.cc b/tests/matrix_free/interpolate_to_mg.cc index 2843c00ec4..aa60ed9879 100644 --- a/tests/matrix_free/interpolate_to_mg.cc +++ b/tests/matrix_free/interpolate_to_mg.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include #include