]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
In tria.h, we use an object of type StraightBoundary<dim> to initialize a default...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 Jul 2004 15:21:19 +0000 (15:21 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 Jul 2004 15:21:19 +0000 (15:21 +0000)
While it may be that xlC is wrong, there is no need to be so contrived. We can just overload the set_boundary function and have one that has one and one with two arguments.

git-svn-id: https://svn.dealii.org/trunk@9537 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/grid/tria.cc

index 9bdb20ca4797935198f6f3dbfed1b64a3f850841..a821fefcf78b3b1d3e15cb21daf54e12192ed5b1 100644 (file)
@@ -1637,62 +1637,62 @@ class Triangulation : public Subscriptor
     void clear ();
     
                                     /**                                        
-                                     * Assign a boundary object to
-                                     * the triangulation. If a face
-                                     * with boundary number @p number
-                                     * is refined, this object is
-                                     * used to find the location of
-                                     * new vertices on the
-                                     * boundary. This will also be
-                                     * true for non-linear
-                                     * transformations of cells to
-                                     * the unit cell in shape
-                                     * function
-                                     * calculations. Multiple calls
-                                     * to this function are allowed
-                                     * to store different boundary
-                                     * curves or surfaces.
+                                     * Assign a boundary object to a certain
+                                     * part of the boundary of a the
+                                     * triangulation. If a face with boundary
+                                     * number @p number is refined, this
+                                     * object is used to find the location of
+                                     * new vertices on the boundary. It is
+                                     * also used for for non-linear (i.e.:
+                                     * non-Q1) transformations of cells to
+                                     * the unit cell in shape function
+                                     * calculations.
                                      *
-                                     * Numbers of boundary objects
-                                     * correspond to material numbers
-                                     * of faces at the boundary, for
-                                     * instance the material id in a
-                                     * UCD input file. They are not
-                                     * necessarily consecutive but
-                                     * must be in the range 0-254.
-                                     * Material IDs on boundaries are
-                                     * also called boundary indicators
-                                     * and are accessed with accessor
-                                     * functions of that name.
+                                     * Numbers of boundary objects correspond
+                                     * to material numbers of faces at the
+                                     * boundary, for instance the material id
+                                     * in a UCD input file. They are not
+                                     * necessarily consecutive but must be in
+                                     * the range 0-254.  Material IDs on
+                                     * boundaries are also called boundary
+                                     * indicators and are accessed with
+                                     * accessor functions of that name.
                                      *
-                                     * The @p boundary_object is not
-                                     * copied and MUST persist until
-                                     * the triangulation is
-                                     * destroyed. Otherwise, the
-                                     * Subscriptor class will issue
-                                     * @p ExcObjectInUse.  This is
-                                     * also true for triangulations
-                                     * generated from this one by
-                                     * @p copy_triangulation.
+                                     * The @p boundary_object is not copied
+                                     * and MUST persist until the
+                                     * triangulation is destroyed. This is
+                                     * also true for triangulations generated
+                                     * from this one by @p
+                                     * copy_triangulation.
                                      *
-                                     * It is possible to remove or
-                                     * replace the boundary object
-                                     * during the lifetime of a
-                                     * non-empty
-                                     * triangulation. Usually, this
-                                     * is done before the first
-                                     * refinement and is dangerous
-                                     * afterwards.  Removal of a
+                                     * It is possible to remove or replace
+                                     * the boundary object during the
+                                     * lifetime of a non-empty
+                                     * triangulation. Usually, this is done
+                                     * before the first refinement and is
+                                     * dangerous afterwards. Removal of a
                                      * boundary object is done by
-                                     * <tt>set_boundary(number)</tt>, which
-                                     * uses the default argument of this
-                                     * function and replaces the boundary
-                                     * approximation by a piecewise
-                                     * straight line.
+                                     * <tt>set_boundary(number)</tt>,
+                                     * i.e. the function of same name but
+                                     * only one argument. This operation then
+                                     * replaces the boundary object given
+                                     * before by a straight boundary
+                                     * approximation.
                                      */
     void set_boundary (const unsigned int   number,
-                      const Boundary<dim> &boundary_object = *straight_boundary);
-
+                      const Boundary<dim> &boundary_object);
+
+                                     /**
+                                      * Reset those parts of the boundary with
+                                      * the given number to use a straight
+                                      * boundary approximation. This is the
+                                      * default state of a triangulation, and
+                                      * undoes assignment of a different
+                                      * boundary object by the function of
+                                      * same name and two arguments.
+                                      */
+    void set_boundary (const unsigned int number);
+    
                                     /**
                                      * Return a constant reference to
                                      * a boundary object used for
index 9d48446535b1d07ec808abbde338b488cd81559a..ccb5c51619ff9c1986dbb00108335202c5288371 100644 (file)
@@ -122,6 +122,16 @@ Triangulation<dim>::set_boundary (const unsigned int number,
 }
 
 
+
+template <int dim>
+void
+Triangulation<dim>::set_boundary (const unsigned int number)
+{
+  set_boundary (number, *straight_boundary);
+}
+
+
+
 template <int dim>
 const Boundary<dim> &
 Triangulation<dim>::get_boundary (const unsigned int number) const 

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.