mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-31 11:36:55 -06:00
Add an operator<< for outputting vector results.
Use it out print reservoir and well pressures at end of solution.
This commit is contained in:
parent
2dffbb3a70
commit
26e965e858
@ -72,6 +72,15 @@ namespace {
|
||||
|
||||
return wells;
|
||||
}
|
||||
|
||||
template <class Ostream, typename T, class A>
|
||||
Ostream&
|
||||
operator<<(Ostream& os, const std::vector<T,A>& v)
|
||||
{
|
||||
std::copy(v.begin(), v.end(), std::ostream_iterator<T>(os, " "));
|
||||
|
||||
return os;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
@ -103,17 +112,8 @@ main(int argc, char* argv[])
|
||||
|
||||
solver.step(1.0, state, well_state);
|
||||
|
||||
#if 0
|
||||
Opm::WellState well_state;
|
||||
well_state.init(wells, state);
|
||||
|
||||
ps.solve(1.0, state, well_state);
|
||||
|
||||
std::copy(state.pressure().begin(), state.pressure().end(), std::ostream_iterator<double>(std::cout, " "));
|
||||
std::cout << std::endl;
|
||||
std::copy(well_state.bhp().begin(), well_state.bhp().end(), std::ostream_iterator<double>(std::cout, " "));
|
||||
std::cout << std::endl;
|
||||
#endif
|
||||
std::cout << state.pressure() << '\n'
|
||||
<< well_state.bhp() << '\n';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user