From: Daniel Arndt Date: Mon, 5 Sep 2016 13:14:05 +0000 (+0200) Subject: Assert limit_level_difference_at_vertices for multigrid X-Git-Tag: v8.5.0-rc1~697^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67d2764743112f7ba2b7e7149eb4e823d52dbded;p=dealii.git Assert limit_level_difference_at_vertices for multigrid --- diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 8e8b548c78..db5d54f6e1 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -1552,6 +1552,11 @@ public: */ virtual void set_mesh_smoothing (const MeshSmoothing mesh_smoothing); + /** + * Return the mesh smoothing requirements that are obeyed. + */ + virtual const Triangulation::MeshSmoothing &get_mesh_smoothing() const; + /** * If @p dim==spacedim, assign a boundary object to a certain part of the * boundary of a the triangulation. If a face with boundary number @p number diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index ff879f9b87..fd986a6a28 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -1156,6 +1156,9 @@ void DoFHandler::distribute_mg_dofs (const FiniteElementget_mesh_smoothing() & Triangulation::limit_level_difference_at_vertices)==true, + ExcMessage("The mesh smoothing requirement 'limit_level_difference_at_vertices' has to be set for using multigrid!")); + clear_mg_space(); internal::DoFHandler::Implementation::reserve_space_mg (*this); diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 0dc044a918..0611c1371b 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -9074,6 +9074,15 @@ Triangulation::set_mesh_smoothing(const MeshSmoothing mesh_smooth +template +const typename Triangulation::MeshSmoothing & +Triangulation::get_mesh_smoothing() const +{ + return smooth_grid; +} + + + template void Triangulation::set_boundary (const types::manifold_id m_number, @@ -11831,6 +11840,7 @@ Triangulation::get_triangulation () const } + template void Triangulation::add_periodicity @@ -11846,6 +11856,8 @@ Triangulation::add_periodicity update_periodic_face_map(); } + + template const typename std::map::cell_iterator, unsigned int>, std::pair::cell_iterator, unsigned int>, std::bitset<3> > > & @@ -11855,6 +11867,7 @@ const typename std::map::cell_it } + template void Triangulation::execute_coarsening_and_refinement ()