]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
list numbering in documentation and allow output to dellog
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 14 Apr 2005 09:39:23 +0000 (09:39 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 14 Apr 2005 09:39:23 +0000 (09:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@10483 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/polynomial_space.h
deal.II/base/source/polynomial_space.cc

index 078775d5cc79282e1f475da33dceaa96d8b04f2c..08a7a43bf9b3a52f1e53ddfdffd5ec6d861f3896 100644 (file)
  * dim-dimensional polynomials can be changed by using the
  * set_numbering() function.
  *
- * @author Guido Kanschat, 2002, Wolfgang Bangerth, 2003, Ralf Hartmann 2004
+ * The standard ordering of polynomials is that indices for the first
+ * space dimension vasry fastest and the last space dimension is
+ * slowest. In particular, if we take for simplicity the vector of
+ * monomials <i>x<sup>0</sup>, x<sup>1</sup>, x<sup>2</sup>,...,
+ * x<sup>n</sup></i>, we get
+ *
+ * <dl>
+ * <dt> 1D <dd> <i> x<sup>0</sup>, x<sup>1</sup>,...,x<sup>n</sup></i>
+ * <dt> 2D: <dd> <i> x<sup>0</sup>y<sup>0</sup>,
+ *    x<sup>1</sup>y<sup>0</sup>,...,
+ *    x<sup>n</sup>y<sup>0</sup>,<br>
+ *    x<sup>0</sup>y<sup>1</sup>,
+ *    x<sup>1</sup>y<sup>1</sup>,...,
+ *    x<sup>n-1</sup>y<sup>1</sup>,<br>
+ *    x<sup>0</sup>y<sup>2</sup>,...
+ *    x<sup>n-2</sup>y<sup>2</sup>,<br>...<br>
+ *    x<sup>0</sup>y<sup>n-1</sup>,
+ *    x<sup>1</sup>y<sup>n-1</sup>,<br>
+ *    x<sup>0</sup>y<sup>n</sup>
+ *    </i>
+ * <dt> 3D: <dd> <i> x<sup>0</sup>y<sup>0</sup>z<sup>0</sup>,...,
+ *    x<sup>n</sup>y<sup>0</sup>z<sup>0</sup>,<br>
+ *    x<sup>0</sup>y<sup>1</sup>z<sup>0</sup>,...,
+ *    x<sup>n-1</sup>y<sup>1</sup>z<sup>0</sup>,<br>...<br>
+ *    x<sup>0</sup>y<sup>n</sup>z<sup>0</sup>,<br>
+ *    x<sup>0</sup>y<sup>0</sup>z<sup>1</sup>,...
+ *    x<sup>n-1</sup>y<sup>0</sup>z<sup>1</sup>,<br>...<br>
+ *    x<sup>0</sup>y<sup>n-1</sup>z<sup>1</sup>,<br>
+ *    x<sup>0</sup>y<sup>0</sup>z<sup>2</sup>,...
+ *    x<sup>n-2</sup>y<sup>0</sup>z<sup>2</sup>,<br>...<br>
+ *    x<sup>0</sup>y<sup>0</sup>z<sup>n</sup>
+ *    </i>
+ * </dl>
+ * @author Guido Kanschat, Wolfgang Bangerth, Ralf Hartmann 2002, 2003, 2004, 2005
  */
 template <int dim>
 class PolynomialSpace
@@ -70,7 +103,8 @@ class PolynomialSpace
                                      * Prints the list of the indices
                                      * to <tt>out</tt>.
                                      */
-    void output_indices(std::ostream &out) const;
+    template <class STREAM>
+    void output_indices(STREAM &out) const;
 
                                     /**
                                      * Sets the ordering of the
@@ -274,6 +308,25 @@ PolynomialSpace<dim>::degree() const
   return polynomials.size();
 }
 
+
+template <int dim>
+template <class STREAM>
+void
+PolynomialSpace<dim>::output_indices(STREAM &out) const
+{
+  unsigned int ix[dim];
+  for (unsigned int i=0; i<n_pols; ++i)
+    {
+      compute_index(i,ix);
+      out << i << "\t";
+      for (unsigned int d=0; d<dim; ++d)
+       out << ix[d] << " ";
+      out << std::endl;
+    }
+}
+
+
+
 /// @endif  
 
 #endif
index 81ab114673e5dc18b7bd84b24297454390123b45..56c45ff0649a4114891667d6aed7cff73b76b1a1 100644 (file)
@@ -106,23 +106,6 @@ compute_index (const unsigned int i,
 }
 
 
-template <int dim>
-void
-PolynomialSpace<dim>::output_indices(std::ostream &out) const
-{
-  unsigned int ix[dim];
-  for (unsigned int i=0; i<n_pols; ++i)
-    {
-      compute_index(i,ix);
-      out << i << "\t";
-      for (unsigned int d=0; d<dim; ++d)
-       out << ix[d] << " ";
-      out << std::endl;
-    }
-}
-
-
-
 template <int dim>
 void
 PolynomialSpace<dim>::set_numbering(

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.