Commit 79118037 authored by graeser's avatar graeser

Merge branch 'bugfix/polynomial-matrix-assignment' into 'master'

[bugfix] Evaluate Newton-polynomias as raw field

See merge request !69
parents 08c8e3c6 e4f9071c
Pipeline #28159 passed with stage
in 114 minutes and 13 seconds
......@@ -81,11 +81,14 @@ class Polynomial:
*/
virtual void evaluateDerivative(const DomainType& x, DerivativeType& d) const
{
d = 0.0;
// Compute result as field, because FM<K,1,1> and FV<k,1,1>
// d not interact nicely and we're having univariate polynomials
// anyway.
using Field = typename Dune::FieldTraits<DerivativeType>::field_type;
Field y = 0.0;
for (int k=degree_; k>=1; --k)
d = x*d + dCoeff(1,k)*coeffs_[k];
y = x*y + dCoeff(1,k)*coeffs_[k];
d = y;
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment