From 5fa9b9e11005a1c1164d96fd0e79751aca59064d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Wed, 13 Jun 2012 10:34:45 +0200 Subject: [PATCH] Initialise state variables. --- tutorials/tutorial2.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tutorials/tutorial2.cpp b/tutorials/tutorial2.cpp index b29d9738..e0f32344 100644 --- a/tutorials/tutorial2.cpp +++ b/tutorials/tutorial2.cpp @@ -144,8 +144,9 @@ int main() /// Opm::IncompTPFA. /// \code Opm::TwophaseState state; - state.pressure().resize(num_cells); - state.faceflux().resize(num_faces); + state.pressure().resize(num_cells, 0.0); + state.faceflux().resize(num_faces, 0.0); + state.saturation().resize(num_cells, 1.0); Opm::WellState well_state; /// \endcode