mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Silence warnings related to ad-hoc polymer fluid wrapper class.
This commit is contained in:
@@ -176,10 +176,10 @@ class PolymerFluid2pWrappingProps
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PolymerFluid2pWrappingProps(const Opm::IncompPropertiesInterface& props, const Opm::PolymerProperties& polyprops)
|
PolymerFluid2pWrappingProps(const Opm::IncompPropertiesInterface& props, const Opm::PolymerProperties& polyprops)
|
||||||
: props_(props),
|
: props_(props),
|
||||||
polyprops_(polyprops),
|
polyprops_(polyprops),
|
||||||
smin_(props.numCells()*props.numPhases()),
|
smin_(props.numCells()*props.numPhases()),
|
||||||
smax_(props.numCells()*props.numPhases())
|
smax_(props.numCells()*props.numPhases())
|
||||||
{
|
{
|
||||||
if (props.numPhases() != 2) {
|
if (props.numPhases() != 2) {
|
||||||
THROW("PolymerFluid2pWrapper requires 2 phases.");
|
THROW("PolymerFluid2pWrapper requires 2 phases.");
|
||||||
@@ -201,21 +201,18 @@ public:
|
|||||||
class CAds,
|
class CAds,
|
||||||
class DCAdsDc>
|
class DCAdsDc>
|
||||||
|
|
||||||
void adsorption(const PolyC& c, const PolyC& cmax, CAds& cads, DCAdsDc& dcadsdc) {
|
void adsorption(const PolyC& c, const PolyC& cmax, CAds& cads, DCAdsDc& dcadsdc)
|
||||||
|
{
|
||||||
cads = polyprops_.adsorptionWithDer(c, cmax, &dcadsdc);
|
cads = polyprops_.adsorptionWithDer(c, cmax, &dcadsdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<double> porosity() const {
|
const double* porosity() const
|
||||||
const int num_cells = props_.numCells();
|
{
|
||||||
std::vector<double> porosity(num_cells, 0.);
|
return props_.porosity();
|
||||||
const double* poro = props_.porosity();
|
|
||||||
for (std::vector<double>::iterator it = porosity.begin(); it != porosity.end(); ++it, ++poro) {
|
|
||||||
*it = poro[0];
|
|
||||||
}
|
|
||||||
return porosity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double rockdensity() const {
|
double rockdensity() const
|
||||||
|
{
|
||||||
return polyprops_.rockDensity();
|
return polyprops_.rockDensity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,15 +236,15 @@ public:
|
|||||||
class DPcap>
|
class DPcap>
|
||||||
void pc(int c, const Sat& s, Pcap& pcap, DPcap& dpcap) const
|
void pc(int c, const Sat& s, Pcap& pcap, DPcap& dpcap) const
|
||||||
{
|
{
|
||||||
double pc[2];
|
double pcow[2];
|
||||||
double dpc[4];
|
double dpcow[4];
|
||||||
props_.capPress(1, &s[0], &c, pc, dpc);
|
props_.capPress(1, &s[0], &c, pcow, dpcow);
|
||||||
pcap = pc[0];
|
pcap = pcow[0];
|
||||||
ASSERT(pc[1] == 0.0);
|
ASSERT(pcow[1] == 0.0);
|
||||||
dpcap = dpc[0];
|
dpcap = dpcow[0];
|
||||||
ASSERT(dpc[1] == 0.0);
|
ASSERT(dpcow[1] == 0.0);
|
||||||
ASSERT(dpc[2] == 0.0);
|
ASSERT(dpcow[2] == 0.0);
|
||||||
ASSERT(dpc[3] == 0.0);
|
ASSERT(dpcow[3] == 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
double s_min(int c) const
|
double s_min(int c) const
|
||||||
@@ -264,10 +261,10 @@ public:
|
|||||||
template <class PolyC,
|
template <class PolyC,
|
||||||
class Mc,
|
class Mc,
|
||||||
class DMcDc>
|
class DMcDc>
|
||||||
void mc(const PolyC& c, Mc& mc,
|
void mc(const PolyC& c, Mc& mcval,
|
||||||
DMcDc& dmcdc) const
|
DMcDc& dmcdcval) const
|
||||||
{
|
{
|
||||||
polyprops_.computeMc(c, mc, dmcdc);
|
polyprops_.computeMc(c, mcval, dmcdcval);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -212,8 +212,8 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::copy(porevol.begin(), porevol.end(), store_.porevol());
|
std::copy(porevol.begin(), porevol.end(), store_.porevol());
|
||||||
const std::vector<double> porosity = fluid.porosity();
|
const double* poro = fluid.porosity();
|
||||||
std::copy(porosity.begin(), porosity.end(), store_.porosity());
|
std::copy(poro, poro + g.number_of_cells, store_.porosity());
|
||||||
store_.rockdensity() = fluid.rockdensity();
|
store_.rockdensity() = fluid.rockdensity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user