From 6829c4a6eda3422697e2fe426e2a332064bf2646 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 4 May 2021 09:26:19 -0400 Subject: [PATCH] Give reasonable error messages when trying to use p::d::Triangulation without p4est --- include/deal.II/distributed/tria.h | 52 +++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/include/deal.II/distributed/tria.h b/include/deal.II/distributed/tria.h index 3727241811..7266bfe40c 100644 --- a/include/deal.II/distributed/tria.h +++ b/include/deal.II/distributed/tria.h @@ -957,11 +957,61 @@ namespace parallel : public dealii::parallel::DistributedTriangulationBase { public: + /** + * Dummy settings to allow defining the deleted constructor. + */ + enum Settings + { + default_setting = 0x0, + mesh_reconstruction_after_repartitioning = 0x1, + construct_multigrid_hierarchy = 0x2, + no_automatic_repartitioning = 0x4 + }; + /** * Constructor. Deleted to make sure that objects of this type cannot be * constructed (see also the class documentation). */ - Triangulation() = delete; + explicit Triangulation( + const MPI_Comm &mpi_communicator, + const typename dealii::Triangulation::MeshSmoothing + smooth_grid = (dealii::Triangulation::none), + const Settings settings = default_setting) = delete; + + /** + * Dummy replacement to allow for better error messages when compiling + * this class. + */ + virtual bool + is_multilevel_hierarchy_constructed() const override + { + return false; + } + + /** + * Dummy replacement to allow for better error messages when compiling + * this class. + */ + virtual void + save(const std::string &filename) const override + {} + + /** + * Dummy replacement to allow for better error messages when compiling + * this class. + */ + virtual void + load(const std::string &filename, + const bool autopartition = true) override + {} + + /** + * Dummy replacement to allow for better error messages when compiling + * this class. + */ + virtual void + update_cell_relations() override + {} }; } // namespace distributed } // namespace parallel -- 2.39.5