Skip to content
Snippets Groups Projects
  1. Mar 06, 2025
  2. Mar 05, 2025
  3. Mar 03, 2025
    • Carsten Gräser's avatar
      Merge branch 'feature/hermite-examples' into 'master' · 2a293eb4
      Carsten Gräser authored
      [examples] Add examples with Hermite-type bases
      
      See merge request !238
      2a293eb4
    • Carsten Gräser's avatar
      [examples] Add examples with Hermite-type bases · f06a43f4
      Carsten Gräser authored
      This adds three examples:
      
      * 2d Poisson equation with cubic Hermite-basis and weak enforcement of
        Dirichlet BC (Nitsches method).
      * 2d Poisson equation with cubic Hermite-basis and strong enforcement
        of Dirichlet BC utilizing the `FunctionalDescriptor` interface.
      * 2d biharmonic equation with nonconforming Morley basis and strong
        enforcement of clamped BC utilizing the `FunctionalDescriptor` interface.
      f06a43f4
  4. Feb 25, 2025
  5. Feb 24, 2025
  6. Feb 16, 2025
  7. Feb 15, 2025
    • Carsten Gräser's avatar
    • Carsten Gräser's avatar
      [examples] Don't use dune-vtk with 2.9 · 432a70c4
      Carsten Gräser authored
      432a70c4
    • Carsten Gräser's avatar
    • Carsten Gräser's avatar
    • Carsten Gräser's avatar
    • Carsten Gräser's avatar
      [constraints] Fix contraint computation for hierarchical bases · bb58d223
      Carsten Gräser authored
      The algorithm basically interpolates fine DOFs from
      coarse basis functions of neighboring elements. This
      requires some mechanism to interpolate only hanging fine
      DOFs and not all.
      Instead of checking if the fine interpolation point is in
      within the coarse element, we now check if the interpolated
      DOF is associated to a subentity of the intersection.
      In most cases this is equivalent. But for hierarchical bases,
      the former does probably not lead to the desired result (*).
      
      Remark: (*)
      In principle one would expect that the conforming hierarchical
      basis consists of the conforming P1-basis plus conforming bubbles.
      This is the case for both algorithms (except for some numerical
      issues for the old one). However, it turnes out that there are
      different possibilities to define the conforming bubbles and
      it's not clear which one is desired. Ideally we would like to have:
      
      * The bubbles are lagrangian, i.e. each one is zero at the interpolation
        point of the other ones.
      * The bubbles are non-negative.
      
      For hanging nodes you can't have both at once. The old algorithm
      guarantees the former, the new one the latter property. I'm undecides
      which one is 'correct'.
      bb58d223
    • Carsten Gräser's avatar
      [examples] Add adaptive Poisson example with hanging nodes · f20ff90d
      Carsten Gräser authored
      This demonstrates the usage of hanging node.
      So far the refinement indicator is a very crude
      quick and dirty hack.
      f20ff90d
    • Carsten Gräser's avatar
      [constraints] Add constraints support for dune-functions basis · 913fbc59
      Carsten Gräser authored
      This adds a class `AffineConstraints` for storing contraints
      for general dune-functions bases and a method
      `makeContinuityConstraints()` for computing the
      constraints for the H^1-conforming subspace
      for classical FE spaces on grid with hanging nodes.
      
      This is experimental and the interface may change.
      Also some features are still missing:
      
      * The code is generic and should work with nested
        bases and subspace bases. But this has not been
        tested so far.
      * One may want to generalize `makeContinuityConstraints()`
        such that one can extend an existing constraints
        object. This way one could add constraints for
        different branches in the tree one after the other.
      * Currently constraints are stored in a simple
        `std::unordered_map<std::map<Index,Coeff>>`
        data structure. Maybe this could be more efficient
        in a vector-based data structure or a sparse matrix.
        I had a compress method in mind that transforms into
        a more efficient storage once the contraints are fully
        build. But in my tests copying into a vector-bases
        data structure did not improve significantly, probably
        because the number of entries is relatively small.
      * The constraints class is called `AffineConstraints`
        because it is intended to also hold Dirichlet constraints.
        This feature is currently missing.
      913fbc59
  8. Feb 03, 2025
  9. Feb 01, 2025
    • Carsten Gräser's avatar
      [examples] Use new traversal to incorporate Dirichlet constraints · efa39edf
      Carsten Gräser authored
      This has a few advantages:
      * It does not require the basis just to do algebraic transformations.
      * It is also correct if the pattern is not exactly the one given by
        the local basis coupling. This is e.g. important for hanging nodes.
      * It is faster, because we loop over the matrix entries just once
        and in consecutive order.
      efa39edf
    • Carsten Gräser's avatar
      Add utility functions for recursive traversal of matrices and vectors · 4fbf8312
      Carsten Gräser authored
      This allows
      
      ```cpp
      recursiveForEachMatrixEntry(matrix, [](auto&& matrix_ij, auto&& i, auto&& j) {
        ...
      });
      
      recursiveForEachVectorEntry(vector, [](auto&& vector_i, auto&& i) {
        ...
      });
      ```
      
      Here the container is traversed hierachically and the row and column multi-indices
      `i` and `j` are instances of `Dune::Functions::StaticMultiIndex` with appropriate
      length depending on the nesting depth.
      4fbf8312
    • Carsten Gräser's avatar
      Merge branch 'cleanup/fix-example-types' into 'master' · fe543f9c
      Carsten Gräser authored
      [examples] Fix matrix/vector types of examples
      
      See merge request !256
      fe543f9c
    • Carsten Gräser's avatar
      [examples] Fix matrix/vector types of examples · 5e9faaed
      Carsten Gräser authored
      The nested matrix and vector types should correspond
      to the index tree of the basis. Here, this is not the
      case since `Field*<T,*>` was used instead of `T`.
      While this is in many cases no problem, it may fail
      if the matrix is recursively traversed with `IsNumber`
      as termination criterion.
      5e9faaed
  10. Jan 26, 2025
Loading