1. 23 Apr, 2020 1 commit
    • Oliver Sander's avatar
      [!241] Implement global valued bases · 4812d4c1
      Oliver Sander authored
      Merge branch 'implement-global-valued-bases' into 'master'
      
      ref:staging/dune-functions\> We do this by introducing a new
      LocalFiniteElement implementation called GlobalValuedLocalFiniteElement. This
      new implementation wraps existing LocalFiniteElement implementations, but
      applies a transformation to the evaluated shape function values (and
      derivatives etc.). The transformation is a template parameter and can be
      replaced. Currently only the contravariant Piola transform (for H(div) spaces)
      is implemented.
      
      See merge request [!241]
      
        [!241]: gitlab.dune-project.org/staging/dune-functions/merge_requests/241
      4812d4c1
  2. 13 Apr, 2020 2 commits
    • Oliver Sander's avatar
      eed9f23d
    • Oliver Sander's avatar
      Make the Raviart-Thomas basis apply the Piola transform · df4cf203
      Oliver Sander authored
      We do this by introducing a new LocalFiniteElement implementation
      called GlobalValuedLocalFiniteElement.  This new implementation wraps
      existing LocalFiniteElement implementations, but applies a
      transformation to the evaluated shape function values (and
      derivatives etc.).  The transformation is a template parameter
      and can be replaced.  Currently only the contravariant Piola transform
      (for H(div) spaces) is implemented.
      
      Note that while this patch updates the poisson-mfem example,
      the example nevertheless produces a slightly different result now.
      The reason is that the example uses the 'interpolate' method,
      which did not return the correct values for Raviart-Thomas elements
      before this patch.
      df4cf203
  3. 11 Apr, 2020 8 commits
    • Carsten Gräser's avatar
      [!247] [test] Pass tree path to local continuity check · 277945a8
      Carsten Gräser authored
      Merge branch 'feature/improve-continuity-check' into 'master'
      
      ref:staging/dune-functions\> This is a follow up MR to [!163] motivated by
      some insight after merging:
      
      For a nontrivial tree you may want to use different continuity checks for
      different leaf nodes. In part this could be achieved by switching with the
      node type. But this lacks some information, because the same (local) node may
      have different global continuity properties. This is e.g. the case for the
      LagrangeBasis and the LagrangeDGBasis. Hence we miss some information if we do
      not pass the tree path.
      
      See merge request [!247]
      
        [!163]: gitlab.dune-project.org/NoneNone/merge_requests/163
        [!247]: gitlab.dune-project.org/staging/dune-functions/merge_requests/247
      277945a8
    • Carsten Gräser's avatar
      [test] Pass tree path to local continuity check · bce7e9d9
      Carsten Gräser authored
      This was an oversight in the initial version of the continuity check:
      For a nontrivial tree you may want to use different continuity checks
      for different leaf nodes. In part this could be achieved by switching
      with the node type. But this lacks some information, because the same
      (local) node may have different global continuity properties. This
      is e.g. the case for the `LagrangeBasis` and the `LagrangeDGBasis`.
      Hence we miss some information if we do not pass the tree path.
      bce7e9d9
    • Oliver Sander's avatar
      [!163] Extend global basis tests · b54e1eb1
      Oliver Sander authored
      Merge branch 'feature/basis-continuity-test' into 'master'
      
      ref:staging/dune-functions\> This extends the global basis check checkBasis()
      by incorporating the check for zero-basis functions and adding a check for
      continuity of basis functions across intersections. The continuity check first
      matches inside and outside DOFs on an intersection via their global indices.
      Then it performs a local check which can be customized:.
      
      -   You can enable a continuity check by passing EnableContinuityCheck() to
          checkBasis().
      -   The default is checking if the norm of the jump is zero (this is simple
          continuity).
      -   By deriving from EnableContinuityCheck and overloading
          localContinuityCheck() this can be customized.
      -   A simple form of customization is to implement localContinuityCheck()
          using localJumpContinuityCheck() which allows to compute other pointwise
          jump-expressions like, e.g., the normal jump.
      -   Full customization is possible by a hand-crafted implementation of
          localContinuityCheck(). This e.g. allows to check continuity in edge
          midpoints only.
      -   A checking for the normal jump is implemented in
          EnableNormalContinuityCheck (but not tested so far).
      
      See merge request [!163]
      
        [!163]: gitlab.dune-project.org/staging/dune-functions/merge_requests/163
      b54e1eb1
    • Carsten Gräser's avatar
      [test] Enable continuity checks · 13261dfa
      Carsten Gräser authored
      13261dfa
    • Carsten Gräser's avatar
      [test] Factor out local continuity check on intersection · 1abbac5f
      Carsten Gräser authored
      The global continuity check now does all the generic stuff:
      * Loop over elements
      * Find neighbors
      * Loop over all inside leaf nodes
      * Find corresponding outside leaf node
      * Match inside DOFs to outside DOFs using global indices
      
      Using this information it executes a local continuity check.
      The latter gets passed the intersection, inside- and outside-node,
      and the map from inside to outside DOF (if existent). The result
      of the local check should be a random access range indicating
      for each (inside) basis function if is is continuous across the
      intersection.
      1abbac5f
    • Carsten Gräser's avatar
      16d107a0
    • Carsten Gräser's avatar
      [test] Move more checks to basistest.hh · af0469b8
      Carsten Gräser authored
      These are also more general now. Since gridviewfunctionspacebasistest.cc
      executes the other tests, we can remove the parts that have an analouge
      there.
      af0469b8
    • Carsten Gräser's avatar
      [test] Add continuity check for global bases · 1a36f6b4
      Carsten Gräser authored
      This checks for continuity of basis functions across intersections.
      Hence not all bases should pass it. Currently it's not called at all
      and there's two possibilities to include this:
      * Call the check manually for C^0 conforming bases
      * Include the check conditionally into checkBasis() and
        and a flag to enable it.
      
      One can also think of other variants for different types of
      bases:
      * A strong discontinuity check, that ensures that each basis function
        only appears in a single element (for DG-basis)
      * A weak continuity check, that is parametrized with a basis-specific
        per-intersection check (for nonconforming bases, e.g. Crouzeix-Raviart).
      1a36f6b4
  4. 10 Apr, 2020 10 commits
  5. 08 Apr, 2020 3 commits
    • Carsten Gräser's avatar
      [!243] [bugfix] Implement proper copy of BSplineLFE · 75d1608a
      Carsten Gräser authored
      Merge branch 'bugfix/bsplinebasis-lfe-copy' into 'master'
      
      ref:staging/dune-functions\> Since the local basis stores a reference to the
      LFE, we must implement a copy constructor to avoid a dangling reerence. Due to
      guaranteed copy elision there is no copy when storing the BSplineNode in the
      LocalView. Hence this problem does not show up in practice.
      
      The situation is different when using a power of a BSplineBasis. Then the
      PowerNode stores several copies. Hence accessing the basis fails with a
      segfault due to the dangling reference.
      
      This is the reason why the extended basis check failed with a segfault for the
      BSplineBasis.
      
      See merge request [!243]
      
        [!243]: gitlab.dune-project.org/staging/dune-functions/merge_requests/243
      75d1608a
    • Carsten Gräser's avatar
      [bugfix] Implement proper copy of BSplineLFE · e4ef080e
      Carsten Gräser authored
      Since the local basis stores a reference to the LFE,
      we must implement a copy constructor to avoid a dangling
      reerence. Due to guaranteed copy elision there is no
      copy when storing the `BSplineNode` in the `LocalView`.
      Hence this problem does not show up in practice.
      
      The situation is different when using a power of
      a `BSplineBasis`. Then the `PowerNode` stores several
      copies. Hence accessing the basis fails with a segfault
      due to the dangling reference.
      
      This is the reason why the extended basis check failed
      with a segfault for the `BSplineBasis`.
      e4ef080e
    • Carsten Gräser's avatar
      [!242] Feature/replace ifelse · aea4e6c0
      Carsten Gräser authored
      Merge branch 'feature/replace-ifelse' into 'master'
      
      See merge request [!242]
      
        [!242]: Nonestaging/dune-functions/merge_requests/242
      aea4e6c0
  6. 07 Apr, 2020 7 commits
  7. 12 Mar, 2020 2 commits
  8. 13 Feb, 2020 2 commits
  9. 20 Dec, 2019 5 commits