mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
Added size() member for ease of use.
This makes it easier to write for example templated code acting on either AD vectors or non-ad vectors.
This commit is contained in:
parent
51a5bdd039
commit
38259f43bf
@ -173,7 +173,13 @@ namespace AutoDiff
|
||||
return os;
|
||||
}
|
||||
|
||||
/// Number of variables or Jacobian blocks.
|
||||
/// Number of elements
|
||||
int size() const
|
||||
{
|
||||
return val_.size();
|
||||
}
|
||||
|
||||
/// Number of Jacobian blocks.
|
||||
int numBlocks() const
|
||||
{
|
||||
return jac_.size();
|
||||
|
Loading…
Reference in New Issue
Block a user