]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Assert limit_level_difference_at_vertices for multigrid
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 5 Sep 2016 13:14:05 +0000 (15:14 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 5 Sep 2016 13:14:05 +0000 (15:14 +0200)
include/deal.II/grid/tria.h
source/dofs/dof_handler.cc
source/grid/tria.cc

index 8e8b548c78f8eeffa0d8c5e1f93aa3ebdbf0d622..db5d54f6e15f0dfaf3a1c3c3dc7f4f0d358979cd 100644 (file)
@@ -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<dim, spacedim>::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
index ff879f9b87f03a399166d57e51c581443ec35e44..fd986a6a285383714820f6086931ff7d0e887126 100644 (file)
@@ -1156,6 +1156,9 @@ void DoFHandler<dim, spacedim>::distribute_mg_dofs (const FiniteElement<dim, spa
   (void)old_fe;
   Assert(old_fe == &fe, ExcMessage("You are required to use the same FE for level and active DoFs!") );
 
+  Assert((tria->get_mesh_smoothing() & Triangulation<dim, spacedim>::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);
index 0dc044a918f10e432050dcd5157a01476704b5b4..0611c1371bb58786da015f9c0c5c7921ea380dde 100644 (file)
@@ -9074,6 +9074,15 @@ Triangulation<dim, spacedim>::set_mesh_smoothing(const MeshSmoothing mesh_smooth
 
 
 
+template <int dim, int spacedim>
+const typename Triangulation<dim, spacedim>::MeshSmoothing &
+Triangulation<dim,spacedim>::get_mesh_smoothing() const
+{
+  return smooth_grid;
+}
+
+
+
 template <int dim, int spacedim>
 void
 Triangulation<dim, spacedim>::set_boundary (const types::manifold_id m_number,
@@ -11831,6 +11840,7 @@ Triangulation<dim,spacedim>::get_triangulation () const
 }
 
 
+
 template <int dim, int spacedim>
 void
 Triangulation<dim, spacedim>::add_periodicity
@@ -11846,6 +11856,8 @@ Triangulation<dim, spacedim>::add_periodicity
   update_periodic_face_map();
 }
 
+
+
 template <int dim, int spacedim>
 const typename std::map<std::pair<typename Triangulation<dim, spacedim>::cell_iterator, unsigned int>,
       std::pair<std::pair<typename Triangulation<dim, spacedim>::cell_iterator, unsigned int>, std::bitset<3> > > &
@@ -11855,6 +11867,7 @@ const typename std::map<std::pair<typename Triangulation<dim, spacedim>::cell_it
 }
 
 
+
 template <int dim, int spacedim>
 void
 Triangulation<dim, spacedim>::execute_coarsening_and_refinement ()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.