Use minimum 5 digits for step numbers in output file names.

Was 3 digits, created trouble for certain scripts reading
the files when more than 1000 steps were taken.
This commit is contained in:
Atgeirr Flø Rasmussen 2012-11-05 15:37:14 +01:00
parent be617bbe7b
commit bcfcfdc930
2 changed files with 4 additions and 4 deletions

View File

@ -541,7 +541,7 @@ namespace Opm
catch (...) {
THROW("Creating directories failed: " << fpath);
}
vtkfilename << "/output-" << std::setw(3) << std::setfill('0') << step << ".vtu";
vtkfilename << "/output-" << std::setw(5) << std::setfill('0') << step << ".vtu";
std::ofstream vtkfile(vtkfilename.str().c_str());
if (!vtkfile) {
THROW("Failed to open " << vtkfilename.str());
@ -584,7 +584,7 @@ namespace Opm
catch (...) {
THROW("Creating directories failed: " << fpath);
}
fname << "/" << std::setw(3) << std::setfill('0') << step << ".txt";
fname << "/" << std::setw(5) << std::setfill('0') << step << ".txt";
std::ofstream file(fname.str().c_str());
if (!file) {
THROW("Failed to open " << fname.str());

View File

@ -532,7 +532,7 @@ namespace Opm
catch (...) {
THROW("Creating directories failed: " << fpath);
}
vtkfilename << "/output-" << std::setw(3) << std::setfill('0') << step << ".vtu";
vtkfilename << "/output-" << std::setw(5) << std::setfill('0') << step << ".vtu";
std::ofstream vtkfile(vtkfilename.str().c_str());
if (!vtkfile) {
THROW("Failed to open " << vtkfilename.str());
@ -573,7 +573,7 @@ namespace Opm
catch (...) {
THROW("Creating directories failed: " << fpath);
}
fname << "/" << std::setw(3) << std::setfill('0') << step << ".txt";
fname << "/" << std::setw(5) << std::setfill('0') << step << ".txt";
std::ofstream file(fname.str().c_str());
if (!file) {
THROW("Failed to open " << fname.str());