Skip to content
  • Oliver Sander's avatar
    Implement LagrangeBasis with run-time order · 76ba7a1a
    Oliver Sander authored
    This patch extends the LagrangeBasis class to also allow to select
    the polynomial order at run-time.  For this, the integer template
    parameter 'k' (the order) is made optional, with a default value of -1.
    If k is explicitly set to something non-negative, then the basis
    implementation behaves as before.  If k is indeed -1 then the basis
    object needs to be constructed by a new constructor that accepts
    a run-time order.
    
    The changes to LagrangeBasis are completely backward-compatible.
    I did not do any measurements of the performance, but as the switch
    between run-time and compile-time order is based on a simple
    compile-time criterion I expect decent compilers to optimize away
    all new code if a compile-time order is selected.
    76ba7a1a
To find the state of this project's repository at the time of any of these versions, check out the tags.