]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
eliminate interior boundaries
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Oct 2011 02:23:51 +0000 (02:23 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Oct 2011 02:23:51 +0000 (02:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@24520 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/dofs/dof_tools.h
deal.II/source/dofs/dof_tools.cc

index cd27f3b21d08ab52de1713ef9afbb6591e5bf1d0..e387e694c48b8d6a8a063adfc714511f1d3ac2ac 100644 (file)
@@ -1464,6 +1464,16 @@ namespace DoFTools
                                   // @}
                                   /**
                                    * @name Dof indices for patches
+                                   *
+                                   * Create structures containing a
+                                   * large set of degrees of freedom
+                                   * for small patches of cells. The
+                                   * resulting objects can be used in
+                                   * RelaxationBlockSOR and related
+                                   * classes to implement Schwarz
+                                   * preconditioners and smoothers,
+                                   * where the subdomains consist of
+                                   * small numbers of cells only.
                                    */
                                   //@{
                                   /**
@@ -1486,13 +1496,61 @@ namespace DoFTools
                                     * freedom associated to the
                                     * corresponding cells
                                     * corresponding to a vertex.
+                                    *
+                                    * The function has some boolean
+                                    * arguments (lsited below)
+                                    * controlling details of the
+                                    * generated patches. The default
+                                    * settings are those for
+                                    * Arnold-Falk-Winther type
+                                    * smoothers for divergence and
+                                    * curl conforming finite elements
+                                    * with essential boundary
+                                    * conditions. Other applications
+                                    * are possible, in particular
+                                    * changing
+                                    * <tt>boundary_patches</tt> for
+                                    * non-essential boundary conditions.
+                                    *
+                                    * @arg <tt>block_list</tt>: the
+                                    * SparsityPattern into which the
+                                    * patches will be stored.
+                                    * @arg <tt>dof_handler</tt>: The
+                                    * multilevel dof handler
+                                    * providing the topology operated
+                                    * on.
+                                    * @arg
+                                    * <tt>interior_dofs_only</tt>:
+                                    * for each patch of cells around
+                                    * a vertex, collect only the
+                                    * interior degrees of freedom of
+                                    * the patch and disregard those
+                                    * on the boundary of the
+                                    * patch. This is for instance the
+                                    * setting for smoothers of
+                                    * Arnold-Falk-Winther type.
+                                    * @arg <tt>boundary_patches</tt>:
+                                    * include patches around vertices
+                                    * at the boundary of the
+                                    * domain. If not, only patches
+                                    * around interior vertices will
+                                    * be generated.
+                                    * @arg
+                                    * <tt>level_boundary_patches</tt>:
+                                    * same for refinement edges
+                                    * towards coarser cells.
+                                    * @arg
+                                    * <tt>single_cell_patches</tt>:
+                                    * if not true, patches containing
+                                    * a single cell are eliminated.
                                     */
    template <class DH>
    void make_vertex_patches(SparsityPattern& block_list,
                            const DH& dof_handler,
                            const unsigned int level,
                            const bool interior_dofs_only,
-                           const bool boundary_patches = true,
+                           const bool boundary_patches = false,
+                           const bool level_boundary_patches = false,
                            const bool single_cell_patches = false);
   
                                   //@}
index 2d4eb64933e2aeb5532303dad292385c523bb0d5..c78b30e51dd230b537b52c15930cba1818ed2660 100644 (file)
@@ -5913,8 +5913,15 @@ namespace DoFTools
          vertex_dof_count[vg] += cell->get_fe().dofs_per_cell;
          ++vertex_cell_count[vg];
          for (unsigned int d=0;d<DH::dimension;++d)
-           if (cell->at_boundary(GeometryInfo<DH::dimension>::vertex_to_face[v][d]))
-             vertex_boundary[vg] = true;
+           {
+             const unsigned int face = GeometryInfo<DH::dimension>::vertex_to_face[v][d];
+             if (cell->at_boundary(face))
+               vertex_boundary[vg] = true;
+             else
+               if ((!level_boundary_patches)
+                   && (cell->neighbor(face)->level() != (int) level))
+                 vertex_boundary[vg] = true;
+           }
        }
                                     // From now on, onlly vertices
                                     // with positive dof count are

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.