mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 10:40:21 -06:00
Bugfix for scalar AutoDiff class.
Missing chain-rule usage in Scalar/AD operator.
This commit is contained in:
parent
91af12034c
commit
5977590e70
@ -256,7 +256,7 @@ namespace Opm
|
||||
const AutoDiff<Scalar>& rhs)
|
||||
{
|
||||
Scalar a = Scalar(lhs) / rhs.val();
|
||||
Scalar b = -Scalar(lhs) / (rhs.val() * rhs.val());
|
||||
Scalar b = (-Scalar(lhs) / (rhs.val() * rhs.val())) * rhs.der();
|
||||
|
||||
return AutoDiff<Scalar>::function(a, b);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user