Corrected upscaleNetPorosity-method

This commit is contained in:
Kari B. Skjerve
2013-10-17 12:57:05 +02:00
parent 0ff33d0445
commit 03af099bbc

View File

@@ -390,13 +390,14 @@ namespace Opm
template <class Traits>
double UpscalerBase<Traits>::upscaleNetPorosity() const
{
double total_vol = 0.0;
double total_net_vol = 0.0;
double total_pore_vol = 0.0;
for (CellIter c = ginterf_.cellbegin(); c != ginterf_.cellend(); ++c) {
total_vol += c->volume();
total_net_vol += c->volume()*res_prop_.ntg(c->index());
total_pore_vol += c->volume()*res_prop_.porosity(c->index())*res_prop_.ntg(c->index());
}
return total_pore_vol/total_vol;
if (total_net_vol>0.0) return total_pore_vol/total_net_vol;
else return 0.0;
}
template <class Traits>