1. 14 May, 2019 4 commits
    • Carsten Gräser's avatar
      [!207] Improve poisson-pq2 example · 6d280aab
      Carsten Gräser authored
      Merge branch 'feature/improve-poisson-pq2-example' into 'master'
      
      ref:staging/dune-functions This introduces several improvements to the
      poisson-pq2 example:
      
      -   Demonstrate usage of mixed grids if UGGrid is available. While there's no
          reason to use a mixed grid here, we should imho demonstrate that it simply
          works. This is done conditionally using HAVE_UG. However, we strictly
          speaking already depend on dune-uggrid, because it's used unconditionally
          in the tests.
      -   Use symmetrized approach to incorporate Dirichlet data. While CG works on
          the non-symmetric approach to (because it stays in an appropriate
          subspace) it's unclear if this is still the case in the presence of a
          preconditioner (see below).
      -   Use ILDL instead of ILU preconditioner. Since we use CG, the
          preconditioner should be s.p.d.. In fact it turnes out that ILDL and ILU
          generate exactly the same results once the problem is symmetrized (see
          above). However, we should still use ILDL since the ILU documentation does
          not guarantee this.
      -   It turnes out that using ILDL/ILU for the properly symmetrized problem is
          much better that the old method (which was beyond any theory anyway).
      
      See merge request [!207]
      
        [!207]: gitlab.dune-project.org/staging/dune-functions/merge_requests/207
      6d280aab
    • Carsten Gräser's avatar
      Improve poisson-pq2 example · bae7ec27
      Carsten Gräser authored
      This introduces several improvements to the poisson-pq2 example:
      * Demonstrate usage of mixed grids if `UGGrid` is available.
        While there's no reason to use a mixed grid here, we should
        imho demonstrate that it simply works.
        This is done conditionally using `HAVE_UG`. However, we strictly
        speaking already depend on `dune-uggrid`, because it's used
        unconditionally in the tests.
      * Use symmetrized approach to incorporate Dirichlet data. While
        CG works on the non-symmetric approach to (because it stays
        in an appropriate subspace) it's unclear if this is still
        the case in the presence of a preconditioner (see below).
      * Use ILDL instead of ILU preconditioner. Since we use CG,
        the preconditioner should be s.p.d.. In fact it turnes out
        that ILDL and ILU generate exactly the same results once
        the problem is symmetrized (see above). However, we should
        still use ILDL since the ILU documentation does not guarantee
        this.
      * It turnes out that using ILDL/ILU for the properly symmetrized
        problem is much better that the old method (which was beyond
        any theory anyway).
      bae7ec27
    • Carsten Gräser's avatar
      [!206] [cmake] Modernize examples/CMakeLists.txt · 5b648c11
      Carsten Gräser authored
      Merge branch 'feature/modernize-cmake-file' into 'master'
      
      ref:staging/dune-functions Replace target_link_dune_default_libraries(target)
      by the modern dune_target_enable_all_packages(target). The problem with the
      former is, that it does not append definitions, such that we cannot use UGGrid
      because ENABLE_UG is not defined. Surprisingly this is in contrast to
      dune_add_test(...) which does add the definitions.
      
      Alternatively we could call dune_enable_all_packages() in our root
      CMakeLists.txt, but I'm unsure about the implications.
      
      Notice that this reveals several open questions regarding dune-common:
      
      -   Should target_link_dune_default_libraries() still be used or should it be
          deprecated in favour of dune_target_enable_all_packages()?
      -   Should the src/ example created by duneproject still call
          target_link_dune_default_libraries() altough dune_enable_all_packages() is
          called by default?
      -   Should the call to add_dune_all_flags() in dune_add_test() be replaced by
          dune_target_enable_all_packages() such that tests are build similarly to
          normal executables?
      -   Should a library module (like, e.g. dune-functions) use
          dune_enable_all_packages()? Or is this discouraged, because it has to be
          used in all derived modules?
      -   Do we allow building anything without using one of the add-all-flags
          approaches at all? In view of possible binary incompatibility it looks
          like "All tests use it" implies "All libraries have to use it" which
          implies "All applications have to use it"
      
      See merge request [!206]
      
        [!206]: gitlab.dune-project.org/staging/dune-functions/merge_requests/206
      5b648c11
    • Carsten Gräser's avatar
      [cmake] Modernize examples/CMakeLists.txt · 47d2e67e
      Carsten Gräser authored
      Replace `target_link_dune_default_libraries(target)` by the
      modern `dune_target_enable_all_packages(target)`. The problem
      with the former is, that it does not append definitions, such
      that we cannot use `UGGrid` because `ENABLE_UG` is not defined.
      Surprisingly this is in contrast to `dune_add_test(...)` which
      does add the definitions.
      
      Alternatively we could call `dune_enable_all_packages()` in
      our root `CMakeLists.txt`, but I'm unsure about the implications.
      
      Notice that this reveals several open questions regarding dune-common:
      
      * Should `target_link_dune_default_libraries()` still be used
        or should it be deprecated in favour of `dune_target_enable_all_packages()`?
      * Should the `src/` example created by `duneproject` still call
        `target_link_dune_default_libraries()` altough
        `dune_enable_all_packages()` is called by default?
      * Should the call to `add_dune_all_flags()` in `dune_add_test()`
        be replaced by `dune_target_enable_all_packages()` such that
        tests are build similarly to normal executables?
      * Should a library module (like, e.g. dune-functions) use
        `dune_enable_all_packages()`? Or is this discouraged,
        because it has to be used in all derived modules?
      * Do we allow building anything without using one of the
        add-all-flags approaches at all?
        In view of possible binary incompatibility it looks like
        "All tests use it" implies "All libraries have to use it"
        which implies "All applications have to use it"
      47d2e67e
  2. 28 Mar, 2019 5 commits
  3. 26 Mar, 2019 1 commit
    • Carsten Gräser's avatar
      [!205] Add compatibility check to istlVectorBackend() · 72dd909f
      Carsten Gräser authored
      Merge branch 'feature/check-field-types' into 'master'
      
      ref:staging/dune-functions This now checks if the provided container provides
      a unique field type and fails with a nice static_assert message if this is not
      the case. Hence you get much better diagnostic messages, if this is not the
      case. E.g.
      
          using VelocityBitVector = std::vector<std::array<bool,dim> >;
          using PressureBitVector = std::vector<bool>;
          using BitVectorType = TupleVector<VelocityBitVector, PressureBitVector>;
          auto v = BitVectorType{};
          auto vBackend = Functions::istlVectorBackend(v);
      
      will now fail with a nice error message because there's two different field
      types here: plain bool and the proxy-reference of std::vector<bool>.
      Unfortunately you cannot pass more data to the static_assert, not even
      constexpr functions are allowed. But you can trick the compiler to see the
      list of field types:
      
          auto fieldTypeList = Dune::Functions::fieldTypes<BitVectorType>();
          Dune::UnpackTypeList_t<std::tuple, decltype(fieldTypeList)>::printError();
      
      See merge request [!205]
      
        [!205]: gitlab.dune-project.org/staging/dune-functions/merge_requests/205
      72dd909f
  4. 25 Mar, 2019 4 commits
    • Carsten Gräser's avatar
      Guard Hybrid::ifElse lambda body using id() · 4e72152b
      Carsten Gräser authored
      * I can understand, why this need's to be done, but I have
        no idea, why it's necessary only after introducing a
        static_asset() in istlVectorBackend(). The error can
        reproducibly be avoided by removing the static_assert
        again.
      * It looks like this is still not correct. If you pass
        a temporary vector to makeDiscreteGlobalBasisFunction()
        it may be double wrapped leading to a pointer to
        (vanished) temporary.
      4e72152b
    • Carsten Gräser's avatar
      Add compatibility check to istlVectorBackend() · 0b423483
      Carsten Gräser authored
      This now checks if the provided container provides a unique field
      type and fails with a nice `static_assert` message if this is not
      the case. Hence you get much better diagnostic messages, if this is
      not the case. E.g.
      
      ```
      using VelocityBitVector = std::vector<std::array<bool,dim> >;
      using PressureBitVector = std::vector<bool>;
      using BitVectorType = TupleVector<VelocityBitVector, PressureBitVector>;
      auto v = BitVectorType{};
      auto vBackend = Functions::istlVectorBackend(v);
      ```
      
      will now fails with a nice error message because there's two different
      field types here: plain `bool` and the proxy-reference of `std::vector<bool>`.
      Unfortunately you cannot pass more data to the `static_assert`, not even
      `constexpr` functions are allowed. But you can trick the compiler to see
      the list of field types:
      
      ```
      auto fieldTypeList = Dune::Functions::fieldTypes<BitVectorType>();
      Dune::UnpackTypeList_t<std::tuple, decltype(fieldTypeList)>::printError();
      ```
      0b423483
    • Carsten Gräser's avatar
      Guard Hybrid::ifElse lambda bodies using identity function · 9542c9eb
      Carsten Gräser authored
      Without doing this, istVectorBackend() is instanciated for AllTrueBitVector.
      This is problematic, because operator[] can lead to an infinite template recursion
      or related error ("auto ... was used before auto could be deduced").
      This will become a problem if static_asserts are added to istlVectorBackend().
      9542c9eb
    • Carsten Gräser's avatar
      Add HasStaticIndexAccess concept · 29fc7128
      Carsten Gräser authored
      29fc7128
  5. 19 Mar, 2019 2 commits
    • Oliver Sander's avatar
      [!203] Minor cleanup in the examples code · 8535bddb
      Oliver Sander authored
      Merge branch 'minor-examples-cleanup' into 'master'
      
      ref:staging/dune-functions
      
      -   Remove unnecessary 'Dune::' prefixes
      -   Remove unnecessary 'hybridTreePath()' arguments
      -   Use namespace Dune::Indices instead of Dune::TypeTree::Indices
      
      See merge request [!203]
      
        [!203]: gitlab.dune-project.org/staging/dune-functions/merge_requests/203
      8535bddb
    • Oliver Sander's avatar
      Minor cleanup in the examples code · 2f9855d7
      Oliver Sander authored
      * Remove unnecessary 'Dune::' prefixes
      * Remove unnecessary 'hybridTreePath()' arguments
      * Use namespace Dune::Indices instead of Dune::TypeTree::Indices
      2f9855d7
  6. 11 Mar, 2019 4 commits
  7. 17 Dec, 2018 3 commits
    • Carsten Gräser's avatar
      [!199] Simplify (Composite|Power)NodeIndexSet · cfc8d6cd
      Carsten Gräser authored
      Merge branch 'feature/cleanup-composite-power-basis' into 'master'
      
      ref:staging/dune-functions
      
      -   Simplify template argument list. Now we pass the PreBasis directly and
          extract all needed information.
      -   Cleanup exported and internal typedefs.
      
      See merge request [!199]
      
        [!199]: gitlab.dune-project.org/staging/dune-functions/merge_requests/199
      cfc8d6cd
    • Carsten Gräser's avatar
      Simplify (Composite|Power)NodeIndexSet · bf815d17
      Carsten Gräser authored
      * Simplify template argument list. Now we pass the PreBasis
        directly and extract all needed information.
      * Cleanup exportet and internal typedefs.
      bf815d17
    • Carsten Gräser's avatar
      [!198] Feature/remove node treepath · 3ca7cc54
      Carsten Gräser authored
      Merge branch 'feature/remove-node-treepath' into 'master'
      
      ref:staging/dune-functions This removes the TreePath typedef and the
      treePath() member function from the basis nodes. While this is a
      non-compatible change of the user-interface, it seems that those are not used
      anywhere.
      
      As a consequence, this also simplifies the interface of a PreBasis and **any
      PreBasis implementation will have to be adjusted** by replacing the following
      templated typedefs and member functions
      
          PreBasis::Node<TreePath>
          PreBasis::IndexSet<TreePath>
          PreBasis::node<TreePath>(const TreePath&)
          PreBasis::indexSet<TreePath>()
      
      by the non-templated versions
      
          PreBasis::Node
          PreBasis::IndexSet
          PreBasis::makeNode()
          PreBasis::makeIndexSet()
      
      See merge request [!198]
      
        [!198]: gitlab.dune-project.org/staging/dune-functions/merge_requests/198
      3ca7cc54
  8. 14 Dec, 2018 3 commits
    • Carsten Gräser's avatar
      Remove templated versions of PreBasis::(Node|IndexSet|node()|indexSet()) · 363b29e8
      Carsten Gräser authored
      In all `PreBasis` implemenations, the `PreBasis` concept,
      and the `DefaultLocalView` remove the templated typedefs and methods
      
      ```
      PreBasis::Node<TreePath>
      PreBasis::IndexSet<TreePath>
      PreBasis::node<TreePath>(const TreePath&)
      PreBasis::indexSet<TreePath>()
      ```
      
      As a replacement introduce and use the non-templated versions
      
      ```
      PreBasis::Node
      PreBasis::IndexSet
      PreBasis::makeNode()
      PreBasis::makeIndexSet()
      ```
      
      After this commit, all of dune-functions should work as
      before. Notice that this does change the implementer interface
      of a PreBasis.
      363b29e8
    • Carsten Gräser's avatar
      Remove TreePath template parameter from leaf node implementations · 6e34f449
      Carsten Gräser authored
      * The implementations of leaf nodes do no longer need the
        parameter, since it was removed from the base class.
        This removes the paramter only from those implementations.
      * This does not touch the template parameters of power-
        or composite prebasis, because we still need a tree path
        to pass to the node<TreePath>() or indexSet<TreePath>()
        methods of its children.
      
      After this commit, all of dune-functions should work as
      before. Notice that this does not change the interface
      of the PreBasis implementations. This will be done in follow
      up commits.
      6e34f449
    • Carsten Gräser's avatar
      Remove tree path from node base classes · c16568ae
      Carsten Gräser authored
      * Remove ::TreePath and ::treePath() from the basis
        node base classes. This changes the template list
        and constructor arguments!
      * Remove unused SIZE_TYPE_DUMMY template parameter,
        since we change the template parameter list anyway.
      * Adjust all derived classes to modified base classes
      * Adjust node concept to removed interface features and
        modified base class template parameter list
      
      After this commit, all of dune-functions should work as
      before. Notice that this does not change the interface
      of the PreBasis implementations. This will be done in follow
      up commits.
      c16568ae
  9. 13 Dec, 2018 6 commits
    • Carsten Gräser's avatar
      [!197] [cleanup] Remove leftover from localIdexSet removal · 0307f052
      Carsten Gräser authored
      Merge branch 'feature/remove-localindexset-leftovers' into 'master'
      
      ref:staging/dune-functions
      
      -   Remove unused DefaultLocalIndexSet class and header
      -   Remove leftover typedefs and replace their usage
      
      See merge request [!197]
      
        [!197]: gitlab.dune-project.org/staging/dune-functions/merge_requests/197
      0307f052
    • Carsten Gräser's avatar
      [cleanup] Remove leftover from localIdexSet removal · 11e0f4af
      Carsten Gräser authored
      * Remove unused DefaultLocalIndexSet class and header
      * Remove leftover typedefs and replace their usage
      11e0f4af
    • Carsten Gräser's avatar
      [!196] Remove interfaces deprecated in 2.6 · 4b1a9e4e
      Carsten Gräser authored
      Merge branch 'feature/remove-deprecated-in-2.6' into 'master'
      
      ref:staging/dune-functions All interface have been deprecated in the last
      (2.6) release and can be removed safely. Strictly speaking the
      pqknodalbasis.hh header itself was not deprecated but is empty after removal
      of deprecated stuff. Hence removing it is consistent.
      
      See merge request [!196]
      
        [!196]: gitlab.dune-project.org/staging/dune-functions/merge_requests/196
      4b1a9e4e
    • Carsten Gräser's avatar
      Remove interfaces deprecated in 2.6 · f41f3605
      Carsten Gräser authored
      All interface have been deprecated in the last (2.6) release
      and can be removed safely. Strictly speaking the pqknodalbasis.hh
      header itself was not deprecated but is empty after removal of
      deprecated stuff. Hence removing it is consistent.
      f41f3605
    • Carsten Gräser's avatar
      [!195] [cleanup] Simplify CompositePreBasis · 8a8e9b5a
      Carsten Gräser authored
      Merge branch 'feature/cleanup-compositeprebasis' into 'master'
      
      ref:staging/dune-functions This avoids several explicite tuple transformations
      by simply expanding an index_sequence in the new helper template Types. As a
      result code is much more readable and there are much fewer indirections.
      
      See merge request [!195]
      
        [!195]: gitlab.dune-project.org/staging/dune-functions/merge_requests/195
      8a8e9b5a
    • Carsten Gräser's avatar
      [cleanup] Simplify CompositePreBasis · 2ffbe649
      Carsten Gräser authored
      This avoids several explicite tuple transformations by
      simply expanding an index_sequence in the new helper template
      Types. As a result code is much more readable and there are
      much fewer indirections.
      2ffbe649
  10. 10 Dec, 2018 1 commit
    • Carsten Gräser's avatar
      [!192] silence compiler warning about unused left operand of comma operator · 1d8b092d
      Carsten Gräser authored
      Merge branch 'unused-left-operand-of-comma-operator' into 'master'
      
      ref:staging/dune-functions This addresses the following compiler warning (from
      building dune-fufem's dunepythontest):
      
          dune/functions/common/signature.hh:170:63: warning:
          left operand of comma operator has no effect [-Wunused-value]
      
      See merge request [!192]
      
        [!192]: gitlab.dune-project.org/staging/dune-functions/merge_requests/192
      1d8b092d
  11. 06 Dec, 2018 4 commits
  12. 27 Nov, 2018 1 commit
  13. 10 Oct, 2018 1 commit
    • Carsten Gräser's avatar
      [!185] Minor fixes · e3b79cd8
      Carsten Gräser authored
      Merge branch 'feature/minor-fixes' into 'master'
      
      Fixes some typos, spurious consts and includes [!180].
      
      See merge request [!185]
      
        [!180]: gitlab.dune-project.org/staging/dune-functions/merge_requests/180
        [!185]: gitlab.dune-project.org/staging/dune-functions/merge_requests/185
      e3b79cd8
  14. 01 Oct, 2018 1 commit
    • Carsten Gräser's avatar
      [!190] CHANGELOG.md: document merge of LocalIndexSet and LocalView · ad8bc3e8
      Carsten Gräser authored
      Merge branch 'doc/changelog-localindexset-merge' into 'master'
      
      LocalIndexSet has been merged into LocalView a while ago, in commit
      ed807839. Somehow it never made it into the
      changelog for 2.6, so I propose to add it now and cherry-pick this new
      changelog entry to the releases/2.6 branch to be included in case of a 2.6.1
      release.
      
      See merge request [!190]
      
        [!190]: gitlab.dune-project.org/staging/dune-functions/merge_requests/190
      ad8bc3e8