mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-19 05:53:28 -06:00
Added assert to guard against wrong usage.
This commit is contained in:
parent
1cf0bb465b
commit
125c573461
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <opm/core/grid.h>
|
#include <opm/core/grid.h>
|
||||||
#include <opm/core/props/BlackoilPropertiesInterface.hpp>
|
#include <opm/core/props/BlackoilPropertiesInterface.hpp>
|
||||||
|
#include <opm/core/utility/ErrorMacros.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
@ -62,6 +63,7 @@ namespace Opm
|
|||||||
const int n = cells.size();
|
const int n = cells.size();
|
||||||
std::vector<double> smin(num_phases_*n);
|
std::vector<double> smin(num_phases_*n);
|
||||||
std::vector<double> smax(num_phases_*n);
|
std::vector<double> smax(num_phases_*n);
|
||||||
|
ASSERT(n > 0);
|
||||||
props.satRange(n, &cells[0], &smin[0], &smax[0]);
|
props.satRange(n, &cells[0], &smin[0], &smax[0]);
|
||||||
const double* svals = (es == MinSat) ? &smin[0] : &smax[0];
|
const double* svals = (es == MinSat) ? &smin[0] : &smax[0];
|
||||||
for (int ci = 0; ci < n; ++ci) {
|
for (int ci = 0; ci < n; ++ci) {
|
||||||
|
Loading…
Reference in New Issue
Block a user