]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reindent comments.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 28 Mar 2005 16:59:00 +0000 (16:59 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 28 Mar 2005 16:59:00 +0000 (16:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@10244 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/point.h
deal.II/base/include/base/tensor.h

index 3e8bf6b8d32595cca9381c55a01a35f1a1a4f6a0..d41822d044e45d560de83d623d842a4c47653356 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 
 
 /**
- * The <tt>Point</tt> class provides for a point or vector in a space with arbitrary
- * dimension <tt>dim</tt>.
+ * The <tt>Point</tt> class provides for a point or vector in a space with
+ * arbitrary dimension <tt>dim</tt>.
  *
- * It is the preferred object to be passed to functions which
- * operate on points in spaces of a priori unknown dimension: rather than
- * using functions like <tt>double f(double x)</tt> and <tt>double f(double x, double y)</tt>,
+ * It is the preferred object to be passed to functions which operate on
+ * points in spaces of a priori unknown dimension: rather than using functions
+ * like <tt>double f(double x)</tt> and <tt>double f(double x, double y)</tt>,
  * you use double <tt>f(Point<dim> &p)</tt>.
  *
- * <tt>Point</tt> also serves as a starting point for the implementation of the
- * geometrical primitives like <tt>Polyhedron</tt>, <tt>Triangle</tt>, etc.
+ * <tt>Point</tt> also serves as a starting point for the implementation of
+ * the geometrical primitives like <tt>Polyhedron</tt>, <tt>Triangle</tt>,
+ * etc.
  *
- * <tt>Point</tt>s can also be thought of as vectors, i.e. points in a vector space
- * without an obvious meaning. For instance, it may be suitable to let the
- * gradient of a function be a <tt>point</tt> vector:
- * <tt>Point<dim> gradient_of_f (const Point<dim> &x)</tt>. <tt>Point</tt>s have all
+ * <tt>Point</tt>s can also be thought of as vectors, i.e. points in a vector
+ * space without an obvious meaning. For instance, it may be suitable to let
+ * the gradient of a function be a <tt>point</tt> vector: <tt>Point<dim>
+ * gradient_of_f (const Point<dim> &x)</tt>. <tt>Point</tt>s have all
  * functionality for this, e.g. scalar products, addition etc. However, you
- * should also consider using the simpler <tt>Tensor<1,dim></tt> class, which seems
- * more suited to gradients.
+ * should also consider using the simpler <tt>Tensor<1,dim></tt> class, which
+ * seems more suited to gradients.
  *
  * @author Wolfgang Bangerth, 1997
  */
@@ -67,37 +68,41 @@ class Point : public Tensor<1,dim>
     Point (const Tensor<1,dim> &);
     
                                     /**
-                                     *  Constructor for one dimensional points. This
-                                     *  function is only implemented for <tt>dim==1</tt>
-                                     *  since the usage is considered unsafe
-                                     *  for points with <tt>dim!=1</tt>.
+                                     *  Constructor for one dimensional
+                                     *  points. This function is only
+                                     *  implemented for <tt>dim==1</tt> since
+                                     *  the usage is considered unsafe for
+                                     *  points with <tt>dim!=1</tt>.
                                      */
     explicit Point (const double x);
 
                                     /**
-                                     *  Constructor for two dimensional points. This
-                                     *  function is only implemented for <tt>dim==2</tt>
-                                     *  since the usage is considered unsafe
-                                     *  for points with <tt>dim!=2</tt>.
+                                     *  Constructor for two dimensional
+                                     *  points. This function is only
+                                     *  implemented for <tt>dim==2</tt> since
+                                     *  the usage is considered unsafe for
+                                     *  points with <tt>dim!=2</tt>.
                                      */
     Point (const double x, const double y);
     
                                     /**
-                                     *  Constructor for three dimensional points. This
-                                     *  function is only implemented for <tt>dim==3</tt>
-                                     *  since the usage is considered unsafe
-                                     *  for points with <tt>dim!=3</tt>.
+                                     *  Constructor for three dimensional
+                                     *  points. This function is only
+                                     *  implemented for <tt>dim==3</tt> since
+                                     *  the usage is considered unsafe for
+                                     *  points with <tt>dim!=3</tt>.
                                      */
     Point (const double x, const double y, const double z);
 
                                     /**
-                                     *  Read access to the <tt>index</tt>th coordinate.
+                                     *  Read access to the <tt>index</tt>th
+                                     *  coordinate.
                                      */
     double   operator () (const unsigned int index) const;
 
                                     /**
-                                     *  Read and write access to the <tt>index</tt>th
-                                     *  coordinate.
+                                     *  Read and write access to the
+                                     *  <tt>index</tt>th coordinate.
                                      */
     double & operator () (const unsigned int index);
 
@@ -107,16 +112,18 @@ class Point : public Tensor<1,dim>
  */
                                         
                                     /**
-                                     *  Add two point vectors. If possible, use
-                                     *  <tt>operator +=</tt> instead since this does not
-                                     *  need to copy a point at least once.
+                                     *  Add two point vectors. If possible,
+                                     *  use <tt>operator +=</tt> instead
+                                     *  since this does not need to copy a
+                                     *  point at least once.
                                      */
     Point<dim>   operator + (const Tensor<1,dim>&) const;
 
                                     /**
-                                     *  Subtract two point vectors. If possible, use
-                                     *  <tt>operator +=</tt> instead since this does not
-                                     *  need to copy a point at least once.
+                                     *  Subtract two point vectors. If
+                                     *  possible, use <tt>operator +=</tt>
+                                     *  instead since this does not need to
+                                     *  copy a point at least once.
                                      */
     Point<dim>   operator - (const Tensor<1,dim>&) const;
 
@@ -126,9 +133,10 @@ class Point : public Tensor<1,dim>
     Point<dim>   operator - () const;
     
                                     /**
-                                     *  Multiply by a factor. If possible, use
-                                     *  <tt>operator *=</tt> instead since this does not
-                                     *  need to copy a point at least once.
+                                     *  Multiply by a factor. If possible,
+                                     *  use <tt>operator *=</tt> instead
+                                     *  since this does not need to copy a
+                                     *  point at least once.
                                      *
                                      * There is a commutative complement to this
                                      * function also
@@ -136,21 +144,23 @@ class Point : public Tensor<1,dim>
     Point<dim>   operator * (const double) const;
 
                                     /**
-                                     *  Returns the scalar product of two vectors.
+                                     *  Returns the scalar product of two
+                                     *  vectors.
                                      */
     double       operator * (const Tensor<1,dim> &) const;
 
                                     /**
                                      *  Divide by a factor. If possible, use
-                                     *  <tt>operator /=</tt> instead since this does not
-                                     *  need to copy a point at least once.
+                                     *  <tt>operator /=</tt> instead since
+                                     *  this does not need to copy a point at
+                                     *  least once.
                                      */
     Point<dim>   operator / (const double) const;
 
                                     /**
-                                     *  Returns the scalar product of this point
-                                     *  vector with itself, i.e. the square, or
-                                     *  the square of the norm.
+                                     *  Returns the scalar product of this
+                                     *  point vector with itself, i.e. the
+                                     *  square, or the square of the norm.
                                      */
     double              square () const;
     
index 8317d89ceb869d1c6223a2f1cff0b3b6610d6e9a..dec4268eb8d759509321a03291e4834d193b0ca6 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -114,43 +114,47 @@ class Tensor
     bool operator != (const Tensor<rank_,dim> &) const;
 
                                     /**
-                                     *  Add another vector, i.e. move this tensor by
-                                     *  the given offset.
+                                     *  Add another tensor.
                                      */
     Tensor<rank_,dim> & operator += (const Tensor<rank_,dim> &);
     
                                     /**
-                                     *  Subtract another vector.
+                                     *  Subtract another tensor.
                                      */
     Tensor<rank_,dim> & operator -= (const Tensor<rank_,dim> &);
 
                                     /**
-                                     *  Scale the tensor by <tt>factor</tt>, i.e. multiply
-                                     *  all coordinates by <tt>factor</tt>.
+                                     *  Scale the tensor by <tt>factor</tt>,
+                                     *  i.e. multiply all components by
+                                     *  <tt>factor</tt>.
                                      */
     Tensor<rank_,dim> & operator *= (const double &factor);
 
                                     /**
-                                     *  Scale the vector by <tt>1/factor</tt>.
+                                     *  Scale the vector by
+                                     *  <tt>1/factor</tt>.
                                      */
     Tensor<rank_,dim> & operator /= (const double &factor);
 
                                     /**
-                                     *  Add two tensors. If possible, use
-                                     *  <tt>operator +=</tt> instead since this does not
-                                     *  need to copy a point at least once.
+                                     *  Add two tensors. If possible, you
+                                     *  should use <tt>operator +=</tt>
+                                     *  instead since this does not need the
+                                     *  creation of a temporary.
                                      */
     Tensor<rank_,dim>   operator + (const Tensor<rank_,dim> &) const;
 
                                     /**
-                                     *  Subtract two tensors. If possible, use
-                                     *  <tt>operator +=</tt> instead since this does not
-                                     *  need to copy a point at least once.
+                                     *  Subtract two tensors. If possible,
+                                     *  you should use <tt>operator -=</tt>
+                                     *  instead since this does not need the
+                                     *  creation of a temporary.
                                      */
     Tensor<rank_,dim>   operator - (const Tensor<rank_,dim> &) const;
 
                                     /**
-                                     * Invert all entries of a tensor.
+                                     * Unary minus operator. Negate all
+                                     * entries of a tensor.
                                      */
     Tensor<rank_,dim>   operator - () const;
     
@@ -224,7 +228,7 @@ class Tensor
                                     // also, it would be sufficient to make
                                     // the function unroll_loops a friend,
                                     // but that seems to be impossible as well.
-    template <int otherrank, int otherdim> friend class Tensor;
+    template <int, int> friend class Tensor;
 };
 
 

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.