|
std::optional< double > | m_value {} |
| Scalar value.
|
|
std::string | m_wgname {} |
| Associated well/group name.
|
|
std::size_t | m_num = 0 |
| Numbered item. More...
|
|
◆ UDQScalar() [1/2]
Opm::UDQScalar::UDQScalar |
( |
const double |
value, |
|
|
const std::size_t |
num = 0 |
|
) |
| |
|
explicit |
Constructor.
Forms a UDQ scalar defined by its numeric value and, possibly, a particular numbered item.
- Parameters
-
[in] | value | Numeric value |
[in] | num | Item number. |
◆ UDQScalar() [2/2]
Opm::UDQScalar::UDQScalar |
( |
const std::string & |
wgname, |
|
|
const std::size_t |
num = 0 |
|
) |
| |
|
explicit |
Constructor.
Forms a UDQ scalar attached to a particular name and, possibly, a particular numbered item.
- Parameters
-
[in] | wgname | Named well or group to which this scalar is associated. |
[in] | num | Item number. |
◆ assign() [1/2]
void Opm::UDQScalar::assign |
( |
const std::optional< double > & |
value | ) |
|
Assign numeric value to this UDQ scalar.
- Parameters
-
[in] | value | Numeric value. Empty optional or non-finite value makes this UDQ scalar undefined. |
◆ assign() [2/2]
void Opm::UDQScalar::assign |
( |
double |
value | ) |
|
Assign numeric value to this UDQ scalar.
- Parameters
-
[in] | value | Numeric value. Non-finite value makes this UDQ scalar undefined. |
◆ get()
double Opm::UDQScalar::get |
( |
| ) |
const |
Retrive contained numeric value.
Throws an exception unless this UDQ scalar has a defined value.
◆ number()
std::size_t Opm::UDQScalar::number |
( |
| ) |
const |
|
inline |
Retrive numbered item, typically segment or connection, to which this scalar is associated.
Always zero for non-numbered UDQ scalars.
◆ operator bool()
Opm::UDQScalar::operator bool |
( |
| ) |
const |
Predicate for whether or not this UDQ scalar has a defined value.
- Returns
bool defined() const
Predicate for whether or not this UDQ scalar has a defined value.
.
◆ operator*=() [1/2]
void Opm::UDQScalar::operator*= |
( |
const UDQScalar & |
rhs | ) |
|
Multiply UDQ scalar into this.
Result is defined if both this and other scalar are defined, and if the product is a finite value.
- Parameters
-
◆ operator*=() [2/2]
void Opm::UDQScalar::operator*= |
( |
double |
rhs | ) |
|
Multiply numeric value into this.
Result is defined if *this
is defined and the product is a finite value.
- Parameters
-
◆ operator+=() [1/2]
void Opm::UDQScalar::operator+= |
( |
const UDQScalar & |
rhs | ) |
|
Add other UDQ scalar to this.
Result is defined if both this and other scalar are defined, and the sum is a finite value.
- Parameters
-
◆ operator+=() [2/2]
void Opm::UDQScalar::operator+= |
( |
double |
rhs | ) |
|
Add numeric value to this UDQ scalar.
Result is defined if *this
is defined and the sum is a finite value.
- Parameters
-
◆ operator-=() [1/2]
void Opm::UDQScalar::operator-= |
( |
const UDQScalar & |
rhs | ) |
|
Subtract other UDQ scalar from this.
Result is defined if both this and other scalar are defined, and if the difference is a finite value.
- Parameters
-
◆ operator-=() [2/2]
void Opm::UDQScalar::operator-= |
( |
double |
rhs | ) |
|
Add other UDQ scalar to this.
Result is defined if *this
is defined and the difference is a finite value.
- Parameters
-
◆ operator/=() [1/2]
void Opm::UDQScalar::operator/= |
( |
const UDQScalar & |
rhs | ) |
|
Divide this UDQ scalar by other.
Result is defined if both this and other scalar are defined, and the quotient is a finite value.
- Parameters
-
◆ operator/=() [2/2]
void Opm::UDQScalar::operator/= |
( |
double |
rhs | ) |
|
Divide this UDQ scalar by numeric value.
Result is defined if *this
is defined and the quotient is a finite value.
- Parameters
-
◆ operator==()
bool Opm::UDQScalar::operator== |
( |
const UDQScalar & |
other | ) |
const |
Equality predicate.
- Parameters
-
[in] | UDQ | scalar to which this scalar will be compared for equality. |
◆ value()
const std::optional< double > & Opm::UDQScalar::value |
( |
| ) |
const |
|
inline |
Retrive contained numeric value.
Empty optional unless this scalar has a defined value.
◆ m_num
std::size_t Opm::UDQScalar::m_num = 0 |
Numbered item.
Typically segment or connection. Zero for non-numbered items.
The documentation for this class was generated from the following file: