mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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;
|
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
|
int
|
||||||
@ -103,17 +112,8 @@ main(int argc, char* argv[])
|
|||||||
|
|
||||||
solver.step(1.0, state, well_state);
|
solver.step(1.0, state, well_state);
|
||||||
|
|
||||||
#if 0
|
std::cout << state.pressure() << '\n'
|
||||||
Opm::WellState well_state;
|
<< well_state.bhp() << '\n';
|
||||||
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
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user