From: Daniel Arndt Date: Tue, 4 May 2021 13:26:19 +0000 (-0400) Subject: Give reasonable error messages when trying to use p::d::Triangulation without p4est X-Git-Tag: v9.3.0-rc1~140^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6829c4a6eda3422697e2fe426e2a332064bf2646;p=dealii.git Give reasonable error messages when trying to use p::d::Triangulation without p4est --- 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