Suppressed multiple warnings.
This commit is contained in:
parent
234836d9ef
commit
4db93c418c
@ -166,16 +166,16 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SinglePvtLiveGas::evalBDeriv(const double press, const double* surfvol,
|
void SinglePvtLiveGas::evalBDeriv(const double press, const double* surfvol,
|
||||||
double& B, double& dBdp) const
|
double& Bval, double& dBdpval) const
|
||||||
{
|
{
|
||||||
if (surfvol[phase_pos_[Vapour]] == 0.0) {
|
if (surfvol[phase_pos_[Vapour]] == 0.0) {
|
||||||
// To handle no-gas case.
|
// To handle no-gas case.
|
||||||
B = 1.0;
|
Bval = 1.0;
|
||||||
dBdp = 0.0;
|
dBdpval = 0.0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
B = miscible_gas(press, surfvol, 1, false);
|
Bval = miscible_gas(press, surfvol, 1, false);
|
||||||
dBdp = miscible_gas(press, surfvol, 1, true);
|
dBdpval = miscible_gas(press, surfvol, 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
double SinglePvtLiveGas::evalR(const double press, const double* surfvol) const
|
double SinglePvtLiveGas::evalR(const double press, const double* surfvol) const
|
||||||
@ -197,12 +197,12 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SinglePvtLiveGas::evalRDeriv(const double press, const double* surfvol,
|
void SinglePvtLiveGas::evalRDeriv(const double press, const double* surfvol,
|
||||||
double& R, double& dRdp) const
|
double& Rval, double& dRdpval) const
|
||||||
{
|
{
|
||||||
if (surfvol[phase_pos_[Liquid]] == 0.0) {
|
if (surfvol[phase_pos_[Liquid]] == 0.0) {
|
||||||
// To handle no-gas case.
|
// To handle no-gas case.
|
||||||
R = 0.0;
|
Rval = 0.0;
|
||||||
dRdp = 0.0;
|
dRdpval = 0.0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
double satR = linearInterpolationExtrap(saturated_gas_table_[0],
|
double satR = linearInterpolationExtrap(saturated_gas_table_[0],
|
||||||
@ -210,14 +210,14 @@ namespace Opm
|
|||||||
double maxR = surfvol[phase_pos_[Liquid]]/surfvol[phase_pos_[Vapour]];
|
double maxR = surfvol[phase_pos_[Liquid]]/surfvol[phase_pos_[Vapour]];
|
||||||
if (satR < maxR ) {
|
if (satR < maxR ) {
|
||||||
// Saturated case
|
// Saturated case
|
||||||
R = satR;
|
Rval = satR;
|
||||||
dRdp = linearInterpolDerivative(saturated_gas_table_[0],
|
dRdpval = linearInterpolDerivative(saturated_gas_table_[0],
|
||||||
saturated_gas_table_[3],
|
saturated_gas_table_[3],
|
||||||
press);
|
press);
|
||||||
} else {
|
} else {
|
||||||
// Undersaturated case
|
// Undersaturated case
|
||||||
R = maxR;
|
Rval = maxR;
|
||||||
dRdp = 0.0;
|
dRdpval = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,12 +227,12 @@ namespace Opm
|
|||||||
const bool deriv) const
|
const bool deriv) const
|
||||||
{
|
{
|
||||||
int section;
|
int section;
|
||||||
double R = linearInterpolationExtrap(saturated_gas_table_[0],
|
double Rval = linearInterpolationExtrap(saturated_gas_table_[0],
|
||||||
saturated_gas_table_[3], press,
|
saturated_gas_table_[3], press,
|
||||||
section);
|
section);
|
||||||
double maxR = surfvol[phase_pos_[Liquid]]/surfvol[phase_pos_[Vapour]];
|
double maxR = surfvol[phase_pos_[Liquid]]/surfvol[phase_pos_[Vapour]];
|
||||||
if (deriv) {
|
if (deriv) {
|
||||||
if (R < maxR ) { // Saturated case
|
if (Rval < maxR ) { // Saturated case
|
||||||
return linearInterpolDerivative(saturated_gas_table_[0],
|
return linearInterpolDerivative(saturated_gas_table_[0],
|
||||||
saturated_gas_table_[item],
|
saturated_gas_table_[item],
|
||||||
press);
|
press);
|
||||||
@ -258,7 +258,7 @@ namespace Opm
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (R < maxR ) { // Saturated case
|
if (Rval < maxR ) { // Saturated case
|
||||||
return linearInterpolationExtrap(saturated_gas_table_[0],
|
return linearInterpolationExtrap(saturated_gas_table_[0],
|
||||||
saturated_gas_table_[item],
|
saturated_gas_table_[item],
|
||||||
press);
|
press);
|
||||||
|
@ -243,10 +243,10 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
void SinglePvtLiveOil::evalBDeriv(const double press, const double* surfvol,
|
void SinglePvtLiveOil::evalBDeriv(const double press, const double* surfvol,
|
||||||
double& B, double& dBdp) const
|
double& Bval, double& dBdpval) const
|
||||||
{
|
{
|
||||||
B = evalB(press, surfvol);
|
Bval = evalB(press, surfvol);
|
||||||
dBdp = -B*B*miscible_oil(press, surfvol, 1, true);
|
dBdpval = -Bval*Bval*miscible_oil(press, surfvol, 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
double SinglePvtLiveOil::evalR(double press, const double* surfvol) const
|
double SinglePvtLiveOil::evalR(double press, const double* surfvol) const
|
||||||
@ -254,36 +254,36 @@ namespace Opm
|
|||||||
if (surfvol[phase_pos_[Vapour]] == 0.0) {
|
if (surfvol[phase_pos_[Vapour]] == 0.0) {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
double R = linearInterpolationExtrap(saturated_oil_table_[0],
|
double Rval = linearInterpolationExtrap(saturated_oil_table_[0],
|
||||||
saturated_oil_table_[3], press);
|
saturated_oil_table_[3], press);
|
||||||
double maxR = surfvol[phase_pos_[Vapour]]/surfvol[phase_pos_[Liquid]];
|
double maxR = surfvol[phase_pos_[Vapour]]/surfvol[phase_pos_[Liquid]];
|
||||||
if (R < maxR ) { // Saturated case
|
if (Rval < maxR ) { // Saturated case
|
||||||
return R;
|
return Rval;
|
||||||
} else {
|
} else {
|
||||||
return maxR; // Undersaturated case
|
return maxR; // Undersaturated case
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SinglePvtLiveOil::evalRDeriv(const double press, const double* surfvol,
|
void SinglePvtLiveOil::evalRDeriv(const double press, const double* surfvol,
|
||||||
double& R, double& dRdp) const
|
double& Rval, double& dRdpval) const
|
||||||
{
|
{
|
||||||
if (surfvol[phase_pos_[Vapour]] == 0.0) {
|
if (surfvol[phase_pos_[Vapour]] == 0.0) {
|
||||||
R = 0.0;
|
Rval = 0.0;
|
||||||
dRdp = 0.0;
|
dRdpval = 0.0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
R = linearInterpolationExtrap(saturated_oil_table_[0],
|
Rval = linearInterpolationExtrap(saturated_oil_table_[0],
|
||||||
saturated_oil_table_[3], press);
|
saturated_oil_table_[3], press);
|
||||||
double maxR = surfvol[phase_pos_[Vapour]]/surfvol[phase_pos_[Liquid]];
|
double maxR = surfvol[phase_pos_[Vapour]]/surfvol[phase_pos_[Liquid]];
|
||||||
if (R < maxR ) {
|
if (Rval < maxR ) {
|
||||||
// Saturated case
|
// Saturated case
|
||||||
dRdp = linearInterpolDerivative(saturated_oil_table_[0],
|
dRdpval = linearInterpolDerivative(saturated_oil_table_[0],
|
||||||
saturated_oil_table_[3],
|
saturated_oil_table_[3],
|
||||||
press);
|
press);
|
||||||
} else {
|
} else {
|
||||||
// Undersaturated case
|
// Undersaturated case
|
||||||
R = maxR;
|
Rval = maxR;
|
||||||
dRdp = 0.0;
|
dRdpval = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,12 +294,12 @@ namespace Opm
|
|||||||
const bool deriv) const
|
const bool deriv) const
|
||||||
{
|
{
|
||||||
int section;
|
int section;
|
||||||
double R = linearInterpolationExtrap(saturated_oil_table_[0],
|
double Rval = linearInterpolationExtrap(saturated_oil_table_[0],
|
||||||
saturated_oil_table_[3],
|
saturated_oil_table_[3],
|
||||||
press, section);
|
press, section);
|
||||||
double maxR = (surfvol[phase_pos_[Liquid]] == 0.0) ? 0.0 : surfvol[phase_pos_[Vapour]]/surfvol[phase_pos_[Liquid]];
|
double maxR = (surfvol[phase_pos_[Liquid]] == 0.0) ? 0.0 : surfvol[phase_pos_[Vapour]]/surfvol[phase_pos_[Liquid]];
|
||||||
if (deriv) {
|
if (deriv) {
|
||||||
if (R < maxR ) { // Saturated case
|
if (Rval < maxR ) { // Saturated case
|
||||||
return linearInterpolDerivative(saturated_oil_table_[0],
|
return linearInterpolDerivative(saturated_oil_table_[0],
|
||||||
saturated_oil_table_[item],
|
saturated_oil_table_[item],
|
||||||
press);
|
press);
|
||||||
@ -321,7 +321,7 @@ namespace Opm
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (R < maxR ) { // Saturated case
|
if (Rval < maxR ) { // Saturated case
|
||||||
return linearInterpolationExtrap(saturated_oil_table_[0],
|
return linearInterpolationExtrap(saturated_oil_table_[0],
|
||||||
saturated_oil_table_[item],
|
saturated_oil_table_[item],
|
||||||
press);
|
press);
|
||||||
|
@ -431,7 +431,7 @@ coarse_topology_build_final(int ncoarse_f, int nblk,
|
|||||||
int *subfacepos, int *subfaces)
|
int *subfacepos, int *subfaces)
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
int coarse_f, b1, b2, n, subpos, subface_valid;
|
int coarse_f, b1, b2, n, subpos, subface_valid = 1;
|
||||||
size_t i;
|
size_t i;
|
||||||
struct hash_set *set;
|
struct hash_set *set;
|
||||||
|
|
||||||
@ -451,8 +451,6 @@ coarse_topology_build_final(int ncoarse_f, int nblk,
|
|||||||
coarse_f = 0;
|
coarse_f = 0;
|
||||||
subpos = 0;
|
subpos = 0;
|
||||||
|
|
||||||
subface_valid = 1;
|
|
||||||
|
|
||||||
for (b1 = 0; (b1 < nblk) && subface_valid; b1++) {
|
for (b1 = 0; (b1 < nblk) && subface_valid; b1++) {
|
||||||
if (bns[b1] != NULL) {
|
if (bns[b1] != NULL) {
|
||||||
for (n = 0; n < bns[b1]->nneigh; n++) {
|
for (n = 0; n < bns[b1]->nneigh; n++) {
|
||||||
|
@ -718,7 +718,7 @@ blkdof_fill(struct coarse_topology *ct,
|
|||||||
struct coarse_sys *sys)
|
struct coarse_sys *sys)
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
int p, ret, dof;
|
int p, ret = 0, dof;
|
||||||
size_t b, nb;
|
size_t b, nb;
|
||||||
|
|
||||||
nb = ct->nblocks;
|
nb = ct->nblocks;
|
||||||
@ -749,7 +749,6 @@ blkdof_fill(struct coarse_topology *ct,
|
|||||||
if (sys->blkdof == NULL) {
|
if (sys->blkdof == NULL) {
|
||||||
free(sys->blkdof_pos);
|
free(sys->blkdof_pos);
|
||||||
sys->blkdof_pos = NULL;
|
sys->blkdof_pos = NULL;
|
||||||
ret = 0;
|
|
||||||
} else {
|
} else {
|
||||||
sys->blkdof_pos[0] = 0;
|
sys->blkdof_pos[0] = 0;
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ ifsh_ms_impl_construct(struct UnstructuredGrid *G ,
|
|||||||
LocalSolver linsolve)
|
LocalSolver linsolve)
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
int max_nconn, nb, nconn_tot;
|
int max_nconn = -1, nb, nconn_tot;
|
||||||
int expected_nconn, alloc_ok;
|
int expected_nconn, alloc_ok;
|
||||||
|
|
||||||
struct ifsh_ms_impl *new;
|
struct ifsh_ms_impl *new;
|
||||||
|
@ -785,7 +785,7 @@ assemble_completion_to_well(int w, int c, int nc, int np,
|
|||||||
{
|
{
|
||||||
int wdof;
|
int wdof;
|
||||||
size_t jc, jw;
|
size_t jc, jw;
|
||||||
double res, w2c, w2w;
|
double res = 0.0, w2c = 0.0, w2w = 0.0;
|
||||||
|
|
||||||
switch (W->ctrl->ctrl[w]) {
|
switch (W->ctrl->ctrl[w]) {
|
||||||
case BHP :
|
case BHP :
|
||||||
|
@ -85,9 +85,9 @@ namespace Opm {
|
|||||||
return path_;
|
return path_;
|
||||||
}
|
}
|
||||||
|
|
||||||
ParameterGroup::ParameterGroup(const std::string& path,
|
ParameterGroup::ParameterGroup(const std::string& patharg,
|
||||||
const ParameterGroup* parent)
|
const ParameterGroup* parent)
|
||||||
: path_(path), parent_(parent), output_is_enabled_(true)
|
: path_(patharg), parent_(parent), output_is_enabled_(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ namespace Opm {
|
|||||||
namespace parameter {
|
namespace parameter {
|
||||||
|
|
||||||
namespace tinyxml {
|
namespace tinyxml {
|
||||||
|
std::string getProperty(const std::string& property,
|
||||||
|
const TiXmlElement* node_ptr);
|
||||||
void read_xml(ParameterGroup& pg, const std::string filename);
|
void read_xml(ParameterGroup& pg, const std::string filename);
|
||||||
void fill_tree(ParameterGroup& pg,
|
void fill_tree(ParameterGroup& pg,
|
||||||
const TiXmlNode* root,
|
const TiXmlNode* root,
|
||||||
|
@ -667,7 +667,7 @@ int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) const
|
int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* valuearg ) const
|
||||||
{
|
{
|
||||||
const TiXmlAttribute* node = attributeSet.Find( name );
|
const TiXmlAttribute* node = attributeSet.Find( name );
|
||||||
if ( !node )
|
if ( !node )
|
||||||
@ -675,7 +675,7 @@ int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) co
|
|||||||
|
|
||||||
int ival = 0;
|
int ival = 0;
|
||||||
int result = node->QueryIntValue( &ival );
|
int result = node->QueryIntValue( &ival );
|
||||||
*value = (unsigned)ival;
|
*valuearg = (unsigned)ival;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user