mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-12 09:55:33 -06:00
Fix bug in operator+ introduced by previous commit.
Also make documentation clearer.
This commit is contained in:
parent
46a17945a3
commit
1eec8b16d6
@ -104,8 +104,8 @@ namespace Opm
|
||||
}
|
||||
|
||||
/// Create an AutoDiffBlock representing a constant.
|
||||
/// This variant allows to specify the block sizes used
|
||||
/// for the Jacobian even though the Jacobian matrices
|
||||
/// This variant requires specifying the block sizes used
|
||||
/// for the Jacobians even though the Jacobian matrices
|
||||
/// themselves will be zero.
|
||||
/// \param[in] val values
|
||||
/// \param[in] blocksizes block pattern
|
||||
@ -201,7 +201,7 @@ namespace Opm
|
||||
return val_ + rhs;
|
||||
}
|
||||
if (rhs.jac_.empty()) {
|
||||
return *this - rhs.val_;
|
||||
return *this + rhs.val_;
|
||||
}
|
||||
std::vector<M> jac = jac_;
|
||||
assert(numBlocks() == rhs.numBlocks());
|
||||
|
Loading…
Reference in New Issue
Block a user