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

Oliver Sander sander at mi.fu-berlin.de
Mon Jan 18 13:58:04 CET 2010


Hi Christian!
After all I decided that FieldVector would not inherit from array after all.
The reason is that their behavior is subtly different and you cannot really
use any code from array in FieldVector.  In particular you cannot use the
array iterators for FieldVector.  The remaining savings in lines-of-code are
minimal.

best,
Oliver

christi at dune-project.org schrieb:
> Author: christi
> Date: 2010-01-17 17:07:54 +0100 (Sun, 17 Jan 2010)
> New Revision: 5829
>
> Modified:
>    trunk/dune/common/array.hh
> Log:
> In Berlin it was decided that Dune::array should not be substituted by
> std::tr1::array, but only by std::array. The reason is to avoid the
> alignment bug is gcc-4.[012]
>
> This allows Dune::FieldVector to inherit from Dune::array.
>
>
> Modified: trunk/dune/common/array.hh
> ===================================================================
> --- trunk/dune/common/array.hh	2010-01-15 13:44:13 UTC (rev 5828)
> +++ trunk/dune/common/array.hh	2010-01-17 16:07:54 UTC (rev 5829)
> @@ -12,8 +12,6 @@
>  // Include system implementation of array class if present
>  #ifdef HAVE_ARRAY
>  #include <array>
> -#elif defined HAVE_TR1_ARRAY
> -#include <tr1/array>
>  #else
>  #include <algorithm>
>  #endif
> @@ -28,8 +26,6 @@
>  
>  #ifdef HAVE_ARRAY
>      using std::array;
> -#elif defined HAVE_TR1_ARRAY
> -    using std::tr1::array;
>  #else
>  
>    /** \brief Simple fixed size array class.  This replaces std::array,
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>   


-- 
************************************************************************
* Oliver Sander                ** email: sander at mi.fu-berlin.de        *
* Freie Universität Berlin     ** phone: + 49 (30) 838 75348           *
* Institut für Mathematik      ** URL  : page.mi.fu-berlin.de/~sander  *
* Arnimallee 6                 ** -------------------------------------*
* 14195 Berlin, Germany        ** Member of MATHEON (www.matheon.de)   *
************************************************************************





More information about the Dune mailing list