Skip to content
Snippets Groups Projects
  1. Jun 16, 2015
  2. Oct 06, 2014
  3. Apr 16, 2014
    • Markus Blatt's avatar
      [g++-4.4] Fixes missing std::initializer_list::const_iterator for g++-4.4. · bd498e0d
      Markus Blatt authored
      With g++-4.4 I got the following errors:
      
      fmatrix.hh:106: error: no type named ‘const_iterator’ in ‘class std::initializer_list<std::initializer_list<int> >’
      
      Looking into the header there is indeed the const_iterator (demanded by the standard)
      missing. Therefore I refactored the code to use std::copy_n and thus am omitting the iterator
      type.
      
      At the same time I made the actual copying safer for the case that the initializer_list
      is of different size and people compile with -DNDEBUG. The assertion for the size is still
      left in there. Remove the assert or the size computation at your discretion.
      bd498e0d
  4. Apr 14, 2014
    • Oliver Sander's avatar
      Change conversion operators (operator K()) to return references instead of values · d6f00739
      Oliver Sander authored
      We simply return a reference to the internal memory instead of copying the object.
      This should save some copying when using FieldVector/FieldMatrix with non-trivial
      types.  Also, it fixes crashes I have experienced with the ADOL-C automatic
      differentiation toolbox [0].
      
      I hope that this patch doesn't have any nasty side effects.  I didn't see any
      so far.  Comments for this patch had been requested in FS 1449, and there have
      been no objections.
      
      [0] I have contacted the ADOL-C maintainer about this and he said the crashes
      are not really bugs in ADOL-C, but that it is simply very difficult to write
      a good operator-overloading AD program that can handle operator K returning
      values.
      d6f00739
  5. Mar 22, 2014
  6. Mar 18, 2014
  7. Dec 17, 2013
  8. Oct 29, 2013
    • Martin Nolte's avatar
      [bugfix] Prohibit copy constructor of DenseVector · d8ec10b4
      Martin Nolte authored
      DenseVector is the base class of a CRTP. This is kind of an abstract
      class that works only if it can be casted into a derived type. Copying
      the base class is pointless.
      
      This patch marks the copy constructor of DenseVector private (not even
      implementing it), so that it cannot be called anymore. Once we have a
      DUNE_DELETE macro, we should use it, here.
      
      At the same time, the default constructor is marked protected, so that only
      derived classes can instantiate a DenseVector. Notice that this does not
      prevent the user from building a derivced class which does not pass
      itself as implementation to DenseVector. It is (to my knowledge) not possible
      to make CRTPs completely fail-safe.
      d8ec10b4
  9. Oct 02, 2013
  10. Oct 01, 2013
    • Martin Nolte's avatar
      [c++11] add support for C++11 constexpr · 45990b69
      Martin Nolte authored
      As decided on the developer meeting in Aachen, we support (but do not
      rely on) the C++11 keyword constexpr. This patch adds an m4-check for
      constexpr and a header (cxx11.hh) defining a macro DUNE_CONSTEXPR either
      as constexpr or empty (depending on the compiler support for it). It is
      then used in FieldVector and FieldMatrix on size, rows, and cols.
      45990b69
  11. Jul 24, 2013
    • Steffen Müthing's avatar
      [FieldVector] Change FieldVector default constructor to default-initialize data · b4328de2
      Steffen Müthing authored
      The default constructor of the FieldVector has intentionally avoided calling a
      constructor for the contained data to eliminate the potential overhead of that
      initialization.
      During implementation of a new creation mode of the BCRSMatrix, it was discovered
      that this behavior is problematic due to its inconsistency: If the data type
      contained in the FieldVector is a non-trivial type, a default-constructed
      FieldVector will be fully initialized. On the other hand, with a primitive data
      type it will be in an uninitialized state, potentially causing undefined behavior.
      
      As this behavior might be very unintuitive for users and made implementing the new,
      more efficient creation method for the BCRS matrix very difficult to implement, this
      patch changes the FieldVector default constructor to always default-construct its
      contents regardless of its type. While this change does introduce a possible
      performance regression (for primitive types, the compiler now has to zero out the
      memory), the overhead has been measured to be minimal.
      
      The actual implementation prefers to use the new C++11 unified initialization
      syntax and falls back to std::fill for older compilers. The distinction was made
      because newer compilers generate much more efficient code when using unified
      initialization, and for user-defined types, this approach avoids first calling the
      default constructors and then the copy assignment operator.
      b4328de2
  12. Aug 06, 2012
  13. Jun 12, 2012
  14. May 31, 2012
    • Oliver Sander's avatar
      Document each header file · 98fbc7b3
      Oliver Sander authored
      With the exception of mpicollectivecommunication.hh
      and propertymap.hh, which I didn't understand.
      
      [[Imported from SVN: r6784]]
      98fbc7b3
  15. May 02, 2012
  16. Jan 26, 2012
  17. Sep 08, 2011
  18. Aug 11, 2011
    • Oliver Sander's avatar
      Add a mechanism for the transition from FieldVector::size as an enum member · 8d981b1f
      Oliver Sander authored
      to FieldVector::size() as a method.
      
      With this patch applied FieldVector::size remains an enum, hence all your
      code compiles as before.  However you get a compiler warning explaining
      the issue and suggesting to configure with --enable-fieldvector-size-is-method.
      If you do so, then FieldVector::size becomes a method, and you may have
      to go out and adjust your code.  The configure flag is transitional and
      will be removed after dune 2.2 is out.
      
      Remember that there is no smoother way to do the transition, as you can't
      have FieldVector::size to be both an enum value and a method at the same
      time.
      
      This fixes FlySpray issue 819.
      
      
      [[Imported from SVN: r6486]]
      8d981b1f
  19. Mar 07, 2011
  20. Mar 04, 2011
  21. Mar 03, 2011
  22. Mar 01, 2011
  23. Jan 13, 2011
  24. Nov 26, 2010
  25. Oct 13, 2010
  26. Oct 12, 2010
  27. Oct 11, 2010
Loading