mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-03 18:40:29 -06:00
Added operators += and *= for SmallVec.
This commit is contained in:
parent
1a0e068f44
commit
f6b9dbc57b
@ -54,6 +54,18 @@ namespace Opm
|
||||
{ return data_[i]; }
|
||||
T& operator[](int i)
|
||||
{ return data_[i]; }
|
||||
void operator += (const SmallVec& sm)
|
||||
{
|
||||
for (int i = 0; i < N; ++i) {
|
||||
data_[i] += sm.data_[i];
|
||||
}
|
||||
}
|
||||
void operator *= (const T& scalar)
|
||||
{
|
||||
for (int i = 0; i < N; ++i) {
|
||||
data_[i] *= scalar;
|
||||
}
|
||||
}
|
||||
template <typename U>
|
||||
void assign(const U& elem)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user