Skip to content
Snippets Groups Projects
  1. Dec 17, 2013
  2. 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
  3. Oct 02, 2013
  4. 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
  5. 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
  6. Aug 06, 2012
  7. Jun 12, 2012
  8. 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
  9. May 02, 2012
  10. Jan 26, 2012
  11. Sep 08, 2011
  12. 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
  13. Mar 07, 2011
  14. Mar 04, 2011
  15. Mar 03, 2011
  16. Mar 01, 2011
  17. Jan 13, 2011
  18. Nov 26, 2010
  19. Oct 13, 2010
  20. Oct 12, 2010
  21. Oct 11, 2010
  22. Oct 06, 2010
  23. Sep 08, 2010
  24. Aug 25, 2010
  25. Mar 12, 2010
Loading