mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Stop writing ascii output twice.
This commit is contained in:
@@ -474,18 +474,6 @@ namespace Opm
|
|||||||
Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity);
|
Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity);
|
||||||
dm["velocity"] = &cell_velocity;
|
dm["velocity"] = &cell_velocity;
|
||||||
Opm::writeVtkData(grid, dm, vtkfile);
|
Opm::writeVtkData(grid, dm, vtkfile);
|
||||||
|
|
||||||
// Write data (not grid) in Matlab format
|
|
||||||
for (Opm::DataMap::const_iterator it = dm.begin(); it != dm.end(); ++it) {
|
|
||||||
std::ostringstream fname;
|
|
||||||
fname << output_dir << "/" << it->first << "-" << std::setw(3) << std::setfill('0') << step << ".dat";
|
|
||||||
std::ofstream file(fname.str().c_str());
|
|
||||||
if (!file) {
|
|
||||||
THROW("Failed to open " << fname.str());
|
|
||||||
}
|
|
||||||
const std::vector<double>& d = *(it->second);
|
|
||||||
std::copy(d.begin(), d.end(), std::ostream_iterator<double>(file, "\n"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void outputStateMatlab(const UnstructuredGrid& grid,
|
void outputStateMatlab(const UnstructuredGrid& grid,
|
||||||
|
|||||||
Reference in New Issue
Block a user