mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 01:41:56 -06:00
Made getInflowValues() a const method.
This commit is contained in:
parent
0428c4abb4
commit
f2e7c0bece
@ -40,7 +40,7 @@ namespace Opm
|
||||
|
||||
void PolymerInflowBasic::getInflowValues(const double step_start,
|
||||
const double step_end,
|
||||
std::vector<double>& poly_inflow_c)
|
||||
std::vector<double>& poly_inflow_c) const
|
||||
{
|
||||
const double eps = 1e-5*(step_end - step_start);
|
||||
if (step_start + eps >= stime_ && step_end - eps <= etime_) {
|
||||
@ -66,7 +66,8 @@ namespace Opm
|
||||
: sparse_inflow_(num_cells)
|
||||
{
|
||||
if (!deck.hasField("WPOLYMER")) {
|
||||
THROW("PolymerInflowFromDeck requires WPOLYMER in deck.");
|
||||
MESSAGE("PolymerInflowFromDeck initialized without WPOLYMER in current epoch.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Extract concentrations and put into cell->concentration map.
|
||||
@ -102,7 +103,7 @@ namespace Opm
|
||||
|
||||
void PolymerInflowFromDeck::getInflowValues(const double /*step_start*/,
|
||||
const double /*step_end*/,
|
||||
std::vector<double>& poly_inflow_c)
|
||||
std::vector<double>& poly_inflow_c) const
|
||||
{
|
||||
// This method does not depend on the given time,
|
||||
// instead one would have a new epoch (and create a new
|
||||
|
@ -46,7 +46,7 @@ namespace Opm
|
||||
/// Must be properly sized before calling.
|
||||
virtual void getInflowValues(const double step_start,
|
||||
const double step_end,
|
||||
std::vector<double>& poly_inflow_c) = 0;
|
||||
std::vector<double>& poly_inflow_c) const = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ namespace Opm
|
||||
/// Must be properly sized before calling.
|
||||
virtual void getInflowValues(const double step_start,
|
||||
const double step_end,
|
||||
std::vector<double>& poly_inflow_c);
|
||||
std::vector<double>& poly_inflow_c) const;
|
||||
private:
|
||||
double stime_;
|
||||
double etime_;
|
||||
@ -101,7 +101,7 @@ namespace Opm
|
||||
/// Must be properly sized before calling.
|
||||
virtual void getInflowValues(const double /*step_start*/,
|
||||
const double /*step_end*/,
|
||||
std::vector<double>& poly_inflow_c);
|
||||
std::vector<double>& poly_inflow_c) const;
|
||||
private:
|
||||
SparseVector<double> sparse_inflow_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user