mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Operator *=(): Use correct derivative chain rule
Updating the derivative using '*=' is just plain wrong.
This commit is contained in:
parent
72d6d32095
commit
011ab5ee93
@ -96,7 +96,7 @@ namespace AutoDiff {
|
|||||||
Forward&
|
Forward&
|
||||||
operator *=(const Forward& rhs)
|
operator *=(const Forward& rhs)
|
||||||
{
|
{
|
||||||
dx_ *= dx_*rhs.x_ + x_*rhs.dx_;
|
dx_ = dx_*rhs.x_ + x_*rhs.dx_;
|
||||||
x_ *= rhs.x_;
|
x_ *= rhs.x_;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
Reference in New Issue
Block a user