mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
Use input parameters outputOil and outputWater earlier.
Avoid aborting due to lack of these paramteters at the end of a long run.
This commit is contained in:
parent
668f5d63a8
commit
37e0d2148b
@ -225,12 +225,12 @@ namespace Dune
|
||||
if (start_from_cl) {
|
||||
try {
|
||||
upscaler.setToCapillaryLimit(saturations[i], init_sat);
|
||||
}catch (...){
|
||||
} catch (...) {
|
||||
init_sat.resize(num_cells, saturations[i]);
|
||||
std::cout << "Failed to initialize with capillary limit for s = " << saturations[i]
|
||||
<< ". Init with uniform distribution." << std::endl;
|
||||
}
|
||||
} {
|
||||
} else {
|
||||
init_sat.resize(num_cells, saturations[i]);
|
||||
}
|
||||
|
||||
@ -261,14 +261,14 @@ namespace Dune
|
||||
}
|
||||
std::cout << krw_out << std::endl;
|
||||
std::cout << kro_out << std::endl;
|
||||
if (param.get<std::string>("outputWater") != "") {
|
||||
if (!krw_filename.empty()) {
|
||||
// write water results to file
|
||||
std::ofstream krw_outfile;
|
||||
krw_outfile.open(krw_filename.c_str(), std::ios::out | std::ios::trunc);
|
||||
krw_outfile << krw_out.str();
|
||||
krw_outfile.close();
|
||||
}
|
||||
if (param.get<std::string>("outputOil") != "") {
|
||||
if (!kro_filename.empty()) {
|
||||
// write water results to file
|
||||
std::ofstream kro_outfile;
|
||||
kro_outfile.open(kro_filename.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user