]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move diameter function to where it really belongs.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 30 Apr 1998 14:13:48 +0000 (14:13 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 30 Apr 1998 14:13:48 +0000 (14:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@227 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.h
deal.II/deal.II/include/grid/tria_accessor.h
deal.II/deal.II/source/dofs/dof_accessor.cc
deal.II/deal.II/source/grid/tria_accessor.cc

index 2b2679072c39d6c128c267cb2b0e3be4eba13743..ab626c4301f52b7e159c24f5ce4b9c7d7dda343b 100644 (file)
@@ -208,15 +208,6 @@ class DoFLineAccessor :  public DoFAccessor<dim>, public BaseClass {
                                      */
     void get_dof_indices (vector<int> &dof_indices) const;
 
-                                    /**
-                                     * Return the length of the line. If the
-                                     * line describes part of the boundary
-                                     * and is not a straight one, ask the
-                                     * finite element class for the correct
-                                     * length!
-                                     */
-    double diameter () const;
-                                     
                                     /**
                                      * Return the #i#th child as a DoF line
                                      * iterator. This function is needed since
@@ -303,18 +294,6 @@ class DoFQuadAccessor :  public DoFAccessor<dim>, public BaseClass {
                                      */
     void get_dof_indices (vector<int> &dof_indices) const;
 
-                                    /**
-                                     * Return the diameter of the quad. If the
-                                     * quad describes part of the boundary
-                                     * and is not a plane one, ask the
-                                     * finite element class for the correct
-                                     * length!
-                                     *
-                                     * The diameter of a quad is computed to
-                                     * be the larger of the two diagonals.
-                                     */
-    double diameter () const;
-
                                     /**
                                      *  Return a pointer to the #i#th line
                                      *  bounding this #Quad#.
index 14f4040a1c5dc69a140ab007969e6354cc595997..16e94db21acad50f576765774e133373e19d2f43 100644 (file)
@@ -413,6 +413,15 @@ class LineAccessor :  public TriaAccessor<dim> {
                                      * boundary or not.
                                      */
     bool at_boundary () const;
+
+                                    /**
+                                     * Return the length of the line. If the
+                                     * line describes part of the boundary
+                                     * and is not a straight one, ask the
+                                     * finite element class for the correct
+                                     * length!
+                                     */
+    double diameter () const;
     
   private:
                                     /**
@@ -637,7 +646,23 @@ class QuadAccessor :  public TriaAccessor<dim> {
                                      * boundary or not.
                                      */
     bool at_boundary () const;
-
+                                    /**
+                                     * Return the diameter of the quad. If the
+                                     * quad describes part of the boundary
+                                     * and is not a plane one, ask the
+                                     * finite element class for the correct
+                                     * length!
+                                     *
+                                     * The diameter of a quad is computed to
+                                     * be the larger of the two diagonals. You
+                                     * should absolutely be clear about the
+                                     * fact that this definitely is not the
+                                     * diameter of all quadrilaterals; however
+                                     * it may serve as an approximation and
+                                     * is exact in many cases.
+                                     */
+    double diameter () const;
+    
   private:
                                     /**
                                      *  Copy operator. This is normally
index d64c87388149dcc896cbce84d248d9de5b99ee02..e2e620dc0a60d15966bda44842b4c76a8f1ecf20 100644 (file)
@@ -101,14 +101,6 @@ DoFLineAccessor<dim,BaseClass>::get_dof_indices (vector<int> &dof_indices) const
 
 
 
-template <int dim, class BaseClass>
-double
-DoFLineAccessor<dim,BaseClass>::diameter () const {
-  return sqrt((vertex(1)-vertex(0)).square());
-};
-
-
-
 template <int dim, class BaseClass>
 TriaIterator<dim,DoFLineAccessor<dim,BaseClass> >
 DoFLineAccessor<dim,BaseClass>::child (const unsigned int i) const {
@@ -223,16 +215,6 @@ DoFQuadAccessor<dim,BaseClass>::get_dof_indices (vector<int> &dof_indices) const
 
 
 
-template <int dim, class BaseClass>
-double
-DoFQuadAccessor<dim,BaseClass>::diameter () const {
-  return sqrt(max((vertex(2)-vertex(0)).square(),
-                 (vertex(3)-vertex(1)).square()));
-};
-
-
-
-
 template <int dim, class BaseClass>
 TriaIterator<dim,DoFLineAccessor<dim,LineAccessor<dim> > >
 DoFQuadAccessor<dim,BaseClass>::line (const unsigned int i) const {
index b95739c01b954e19ed5a2d550f91373686aaab85..cd609f7d7c19333227fe3f6b156198177e05a3ca 100644 (file)
@@ -270,6 +270,15 @@ bool LineAccessor<dim>::at_boundary () const {
 
 
 
+template <int dim>
+double LineAccessor<dim>::diameter () const {
+  return sqrt((vertex(1)-vertex(0)).square());
+};
+
+
+
+
+
 
 template class LineAccessor<1>;
 template class LineAccessor<2>;
@@ -497,6 +506,18 @@ bool QuadAccessor<dim>::at_boundary () const {
 };
 
 
+
+template <int dim>
+double QuadAccessor<dim>::diameter () const {
+  return sqrt(max((vertex(2)-vertex(0)).square(),
+                 (vertex(3)-vertex(1)).square()));
+};
+
+
+
+
+
+
 template class QuadAccessor<2>;
 
 

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.