mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added phaseName() method.
This commit is contained in:
parent
aac34009e1
commit
4f72bfdbcf
@ -208,6 +208,9 @@ namespace Opm {
|
||||
/// The number of active phases in the model.
|
||||
int numPhases() const;
|
||||
|
||||
/// The name of an active phase in the model.
|
||||
const std::string& phaseName(int phase_index) const;
|
||||
|
||||
/// Update the scaling factors for mass balance equations
|
||||
void updateEquationsScaling();
|
||||
|
||||
@ -274,6 +277,7 @@ namespace Opm {
|
||||
|
||||
std::vector<int> primalVariable_;
|
||||
V pvdt_;
|
||||
std::vector<std::string> phase_name_;
|
||||
|
||||
// --------- Protected methods ---------
|
||||
|
||||
|
@ -179,7 +179,9 @@ namespace detail {
|
||||
ADB::null(),
|
||||
{ 1.1169, 1.0031, 0.0031 }} ) // the default magic numbers
|
||||
, terminal_output_ (terminal_output)
|
||||
, phase_name_{ "Water", "Oil", "Gas" }
|
||||
{
|
||||
assert(numPhases() == 3); // Due to the phase_name_ init above.
|
||||
#if HAVE_MPI
|
||||
if ( linsolver_.parallelInformation().type() == typeid(ParallelISTLInformation) )
|
||||
{
|
||||
@ -284,6 +286,19 @@ namespace detail {
|
||||
|
||||
|
||||
|
||||
template <class Grid, class Implementation>
|
||||
const std::string&
|
||||
BlackoilModelBase<Grid, Implementation>::
|
||||
phaseName(int phase_index) const
|
||||
{
|
||||
assert(phase_index < numPhases());
|
||||
return phase_name_[phase_index];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <class Grid, class Implementation>
|
||||
void
|
||||
BlackoilModelBase<Grid, Implementation>::
|
||||
|
Loading…
Reference in New Issue
Block a user