From: Timo Heister Date: Fri, 17 Apr 2020 14:06:17 +0000 (-0400) Subject: move is_multilevel_hierarchy_constructed() up X-Git-Tag: v9.2.0-rc1~208^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1422c5792f79e97001931d3be8abd45c09407cb7;p=dealii.git move is_multilevel_hierarchy_constructed() up Move is_multilevel_hierarchy_constructed() from DistributedTriangulationBase to parallel::TriangulationBase --- diff --git a/include/deal.II/distributed/shared_tria.h b/include/deal.II/distributed/shared_tria.h index 41295be797..b9b24d09da 100644 --- a/include/deal.II/distributed/shared_tria.h +++ b/include/deal.II/distributed/shared_tria.h @@ -248,6 +248,12 @@ namespace parallel */ virtual ~Triangulation() override = default; + /** + * Return if multilevel hierarchy is supported and has been constructed. + */ + virtual bool + is_multilevel_hierarchy_constructed() const override; + /** * Coarsen and refine the mesh according to refinement and coarsening * flags set. @@ -423,6 +429,12 @@ namespace parallel */ Triangulation() = delete; + /** + * Return if multilevel hierarchy is supported and has been constructed. + */ + virtual bool + is_multilevel_hierarchy_constructed() const override; + /** * A dummy function to return empty vector. */ diff --git a/include/deal.II/distributed/tria_base.h b/include/deal.II/distributed/tria_base.h index 0203f6cc77..6b6efd4b38 100644 --- a/include/deal.II/distributed/tria_base.h +++ b/include/deal.II/distributed/tria_base.h @@ -96,6 +96,12 @@ namespace parallel virtual const MPI_Comm & get_communicator() const; + /** + * Return if multilevel hierarchy is supported and has been constructed. + */ + virtual bool + is_multilevel_hierarchy_constructed() const = 0; + /** * Implementation of the same function as in the base class. * @@ -361,12 +367,6 @@ namespace parallel const typename dealii::Triangulation::MeshSmoothing smooth_grid = (dealii::Triangulation::none), const bool check_for_distorted_cells = false); - - /** - * Return if multilevel hierarchy is supported and has been constructed. - */ - virtual bool - is_multilevel_hierarchy_constructed() const = 0; }; } // namespace parallel diff --git a/source/distributed/shared_tria.cc b/source/distributed/shared_tria.cc index 31cdf26447..a21102ad37 100644 --- a/source/distributed/shared_tria.cc +++ b/source/distributed/shared_tria.cc @@ -69,6 +69,15 @@ namespace parallel + template + bool + Triangulation::is_multilevel_hierarchy_constructed() const + { + return (settings & construct_multigrid_hierarchy); + } + + + template void Triangulation::partition() @@ -439,7 +448,12 @@ namespace parallel return true; } - + template + bool + Triangulation::is_multilevel_hierarchy_constructed() const + { + return false; + } template const std::vector &