Checkpoint

This commit is contained in:
babrodtk 2016-04-20 18:03:47 +02:00
parent 75936c1d9c
commit dcf9c6a067
2 changed files with 15 additions and 6 deletions

View File

@ -88,8 +88,14 @@ namespace Opm
}
pu.num_phases = 0;
for (int i = 0; i < BlackoilPhases::MaxNumPhases; ++i) {
pu.phase_pos[i] = pu.num_phases;
pu.num_phases += pu.phase_used[i];
if (pu.phase_used[i]) {
pu.phase_pos[i] = pu.num_phases;
pu.num_phases += 1;
}
else {
//Set to ridiculous value on purpose: should never be used
pu.phase_pos[i] = -1;
}
}
// Only 2 or 3 phase systems handled.

View File

@ -741,7 +741,7 @@ namespace Opm
}
/// Initialize surface volume from pressure and saturation by z = As.
/// Here saturation is used as an intial guess for z in the
/// Here saturation is used as an initial guess for z in the
/// computation of A.
template <class Props, class State>
void initBlackoilSurfvol(const UnstructuredGrid& grid,
@ -801,9 +801,9 @@ namespace Opm
State& state)
{
if (props.numPhases() != 3) {
OPM_THROW(std::runtime_error, "initBlackoilSurfvol() is only supported in three-phase simulations.");
}
//if (props.numPhases() != 3) {
// OPM_THROW(std::runtime_error, "initBlackoilSurfvol() is only supported in three-phase simulations.");
//}
const std::vector<double>& rs = state.gasoilratio();
const std::vector<double>& rv = state.rv();
@ -828,6 +828,8 @@ namespace Opm
std::vector<double> capPressures(number_of_cells*np);
props.capPress(number_of_cells,&state.saturation()[0],&allcells[0],&capPressures[0],NULL);
/*
* FIXME: This never used?
std::vector<double> Pw(number_of_cells);
std::vector<double> Pg(number_of_cells);
@ -835,6 +837,7 @@ namespace Opm
Pw[c] = state.pressure()[c] + capPressures[c*np + BlackoilPhases::Aqua];
Pg[c] = state.pressure()[c] + capPressures[c*np + BlackoilPhases::Vapour];
}
*/
double z_tmp;