Initialise all tpfa_solution members to zero (i.e., NULL).

This is in anticipation of introducing additional structure members to
represent solution variables associated with wells whilst having the
compiler generate the appropriate null pointers to aid debugging.

Unfortunately, GCC warns about the standard "structure = { 0 }" idiom
under -Wmissing-field-initializers which is enabled by default under
"-Wextra".
This commit is contained in:
Bård Skaflestad 2012-03-15 15:13:03 +01:00
parent d69eb28dfc
commit 116b8f9d95

View File

@ -118,7 +118,7 @@ namespace Opm
pressure.resize(grid_.number_of_cells);
faceflux.resize(grid_.number_of_faces);
ifs_tpfa_solution soln;
ifs_tpfa_solution soln = { 0 };
soln.cell_press = &pressure[0];
soln.face_flux = &faceflux[0];