Skip to content
Snippets Groups Projects
  1. Apr 02, 2025
  2. Mar 31, 2025
    • Carsten Gräser's avatar
      [test] Test 2st order partial() for LagrangeSimplexFiniteElement · d6a607f5
      Carsten Gräser authored
      The implementation supports arbitrary order, but the test is only
      implemented for order up to 2.
      d6a607f5
    • Carsten Gräser's avatar
      Implement arbitrary order partial derivatives in LagrangeSimplexLFE · 6886e465
      Carsten Gräser authored
      We can implement arbitrary order derivatives by a simple recursion.
      Notice that the effort grows exponentially with the total order because
      the number of terms from the product rule is 2^totalOrder. Furthermore
      the stack-storage grows linearly with the dynamic total order. Hence
      we need to use a dynamic-to-static switch using an explicit enumeration
      of the supported static derivative orders. Since derivatives of order >k
      are zero, the number of these cases is known at compile time.
      6886e465
    • Carsten Gräser's avatar
      Precompute barycentric factors in LagrangeSimplexBasis · 853580c4
      Carsten Gräser authored
      Instead of evaluating the barycentric factors during the loop
      over the Lagrange nodes, it is simpler and more efficient to
      do this once in advance. This also adds the prcisice formula
      for the basis functions to the doxygen documentation.
      853580c4
    • Carsten Gräser's avatar
      Unify LagrangeSimplexFiniteElement across dimensions · fc08ee91
      Carsten Gräser authored
      The `LagrangeSimplexFiniteElement` contains 5 different code paths
      to implement the basis and its derivatives:
      
      * A special implementation for order 0 in any dimension.
      * A special implementation for order 1 in any dimension.
      * An implementation for any order in dimension 1.
      * An implementation for any order in dimension 2.
      * An implementation for any order in dimension 3.
      
      There are good reasons for the first two special cases.
      Unfortunately the ones for dim=1,2,3 are all implemented
      differently for no good reason (except history) makes the
      code hard to read and understand.
      
      This patch unifies the latter three implementations. While
      there are still three branches, there is a very simple common
      structure making the now making the code much simpler to understand.
      The unified implementation basically follows the former
      `evaluateFunction()` implementation of the 3d case:
      
      1. Rescale the simplex by `k` such that Lagrange points have integer
         coordinates.
      2. Transform to barycentric coordinates in the scaled simplex.
      3. Loop over Lagrange points in lexicographic order.
      4. Compute basis functions as products of univariate
         Lagrange-polynomials wrt. barycentric coordinates.
      
      This approach is now also used for `evaluateJacobian()`
      and first order derivatives in `partial()` extending the
      support of the latter to dim=1 and dim=2.
      
      For now the special implementation of second order
      partial derivatives in 2d is kept, but could be updated
      accordingly.
      fc08ee91
  3. Mar 27, 2025
  4. Mar 23, 2025
  5. Mar 21, 2025
  6. Mar 20, 2025
  7. Mar 19, 2025
  8. Mar 14, 2025
  9. Mar 13, 2025
  10. Mar 05, 2025
  11. Feb 18, 2025
  12. Feb 15, 2025
  13. Feb 13, 2025
  14. Feb 08, 2025
  15. Dec 29, 2024
  16. Dec 15, 2024
Loading