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