Skip to content

fix an error in momentum calculation introduced in !2898

Sevda Esen requested to merge sevda-matching-fix into master

When converting the inner product for

 auto       vars = {txT * txT, txT * txT * txT * txT, txT * txV, tyV * tyV, tyV * tyV * tyV * tyV};
 const auto  coef   = std::inner_product( next( begin( params ) ), end( params ), begin( vars ), params[0] );

to

 const auto coef = params[0] + params[1] * txT * txT + params[2] * txT * txT * txT * txT + params[3] * txV * tyV + params[4] * tyV * tyV * tyV * tyV;

last two terms were mistakenly converted.

It doesn't seem to have any effect on the performance.

@cagapopo @gunther @decianm

Merge request reports