Skip to content
Snippets Groups Projects
  1. Sep 03, 2015
  2. Sep 01, 2015
  3. Aug 18, 2015
  4. Aug 17, 2015
  5. Aug 16, 2015
  6. Aug 15, 2015
  7. Aug 13, 2015
  8. Aug 12, 2015
    • Oliver Sander's avatar
      Improve code documentation · 3acd7af5
      Oliver Sander authored
      3acd7af5
    • Oliver Sander's avatar
      Simplify code by using new method MultiTypeBlockVector::size · f32ccd78
      Oliver Sander authored
      We replace constructs like (if T is a MultiTypeBlockVector)
      
      mpl::size<T>::value
      
      by
      
      T::size()
      
      which I find easier to read.  Besides, using size() hides the fact that
      boost::fusion is used for the implementation.
      f32ccd78
    • Oliver Sander's avatar
      Implement pseudo-operator[] for MultiTypeBlockVector · 6fcfa07f
      Oliver Sander authored
      This method mimicks the behavior of normal vector access with square brackets like, e.g., v[5] = 1.
      The problem is that the return type is different for each value of the argument in the brackets.
      Therefore we implement a trick using std::integral_constant.  To access the first entry of
      a MultiTypeBlockVector named v write
      
        MultiTypeBlockVector<A,B,C,D> v;
        std::integral_constant<int,0> _0;
        v[_0] = ...
      
      The name '_0' used here as a static replacement of the integer number zero is arbitrary.
      Any other variable name can be used.  If you don't like the separate variable, you can writee
      
        MultiTypeBlockVector<A,B,C,D> v;
        v[std::integral_constant<int,0>()] = ...
      6fcfa07f
  9. Aug 11, 2015
  10. Aug 10, 2015
  11. Aug 09, 2015
    • Oliver Sander's avatar
      Add new method 'size' to class MultiTypeBlockVector, which returns the vector size · 1ad99477
      Oliver Sander authored
      The class already contains a method 'count', which returns the same value.
      However, all our other vector types use 'size' for the vector size, not
      'count'.
      
      Additionally, the method is static and DUNE_CONSTEXPR, which is sometimes
      helpful.
      1ad99477
    • Oliver Sander's avatar
      Add unit tests for the MultiTypeBlockVector and MultiTypeBlockMatrix classes · 02dbc9e4
      Oliver Sander authored
      Both tests mainly test whether all interface methods compile, and whether
      the resulting code does not crash (it doesn't).  A large part of the matrix
      test has been copied from the file dune/istl/tutorial/example.cc, which
      is really much more of a test than an example.
      
      That test for MultiTypeBlockMatrix seems to trigger a valgrind complaint
      inside BCRSMatrix.  I'll need to investigate this.
      
      Both test executables are built even if boost fusion is not found.  In that
      case, both simply return '77'.  I am aware that this may not be the official
      way to handle the boost dependency, but I didn't want to spend to much time
      on the corresponding cmake way to skip the test, given that my plan is
      to remove the boost dependency anyway.
      02dbc9e4
    • Oliver Sander's avatar
      Fix typos in comments · a788d4a9
      Oliver Sander authored
      a788d4a9
  12. Aug 05, 2015
  13. Aug 03, 2015
Loading