[Dune] [Dune-Commit] dune-common r6438 - trunk/dune/common

Oliver Sander sander at mi.fu-berlin.de
Mon May 9 14:56:41 CEST 2011


Hi Dune!
Can the new file still change its name?  I find math.hh too generic
and nichtssagend.  In particular, the new math.hh is not a replacement
for the math.h system header.  How about constants.hh or mathconstants.hh
instead?
best,
Oliver

Am 09.05.2011 14:53, schrieb christi at dune-project.org:
> Author: christi
> Date: 2011-05-09 14:53:49 +0200 (Mon, 09 May 2011)
> New Revision: 6438
>
> Modified:
>     trunk/dune/common/math.hh
> Log:
> Basic documentation of math.hh
>
> Modified: trunk/dune/common/math.hh
> ===================================================================
> --- trunk/dune/common/math.hh	2011-05-05 07:08:15 UTC (rev 6437)
> +++ trunk/dune/common/math.hh	2011-05-09 12:53:49 UTC (rev 6438)
> @@ -1,3 +1,5 @@
> +// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
> +// vi: set et ts=4 sw=4 sts=2:
>   #ifndef DUNE_MATH_HH
>   #define DUNE_MATH_HH
>
> @@ -6,14 +8,26 @@
>   namespace Dune
>   {
>
> +  /**
> +     \brief Provides commonly used mathematical constants.
> +
> +     a struct that is specilized for types repesenting real or complex
> +     numbers. I provides commonly used mathematical constants with the
> +     required accuary for the specified type.
> +   */
>     template<  class Field>
>     struct MathematicalConstants;
>
> +  /**
> +     \brief Standard implementation of MathematicalConstants.
>
> +     This implementation will work with all build in floating point
> +     types. It provides
>
> -  // StandardMathematicalConstants
> -  // -----------------------------
> -
> +     * e as std::exp(1.0)
> +     * pi as std::acos(-1.0)
> +
> +  */
>     template<  class T>
>     struct StandardMathematicalConstants
>     {
> @@ -31,7 +45,7 @@
>     };
>
>
> -
> +#ifndef DOXYGEN
>     // MathematicalConstants for float
>     // -------------------------------
>
> @@ -59,6 +73,7 @@
>     struct MathematicalConstants<  long double>
>     : public StandardMathematicalConstants<  long double>
>     {};
> +#endif // DOXYGEN
>
>   }
>
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>    





More information about the Dune mailing list