Skip to content
Snippets Groups Projects
  • Oliver Sander's avatar
    9ec5de08
    Add a second method evaluateDerivative which accepts the function value as input. · 9ec5de08
    Oliver Sander authored
    To compute the derivative you need the function value (see my paper).
    Therefore, it is computed as the first thing in the evaluateDerivative
    method.  However, frequently, the assembler also needs the function value,
    and also computes it.  Hence the function value is computed twice.
    Since computing the function values takes quite a bit of time
    this patch removes that redundancy, at the price of a slightly
    more complicated API: if you happen to know the correct function
    value when calling evaluateDerivative, you can now hand over the
    value.  Then evaluateDerivative uses that value instead of recomputing it.
    
    Short measurements have shown a speed increase between 25% and 45%.
    
    [[Imported from SVN: r8362]]
    9ec5de08
    History
    Add a second method evaluateDerivative which accepts the function value as input.
    Oliver Sander authored
    To compute the derivative you need the function value (see my paper).
    Therefore, it is computed as the first thing in the evaluateDerivative
    method.  However, frequently, the assembler also needs the function value,
    and also computes it.  Hence the function value is computed twice.
    Since computing the function values takes quite a bit of time
    this patch removes that redundancy, at the price of a slightly
    more complicated API: if you happen to know the correct function
    value when calling evaluateDerivative, you can now hand over the
    value.  Then evaluateDerivative uses that value instead of recomputing it.
    
    Short measurements have shown a speed increase between 25% and 45%.
    
    [[Imported from SVN: r8362]]