Fixed some unitialized read problems.

This commit is contained in:
Rob Falgout 2015-02-04 17:42:20 -08:00
parent 2d8d555166
commit c2109bd10c
3 changed files with 10 additions and 1 deletions

View File

@ -152,6 +152,9 @@ hypre_StructCoarsen( hypre_StructGrid *fgrid,
hypre_BeginTiming(tindex);
#endif
hypre_SetIndex(ilower, 0);
hypre_SetIndex(iupper, 0);
/* get relevant information from the fine grid */
fids = hypre_StructGridIDs(fgrid);
fboxman = hypre_StructGridBoxMan(fgrid);

View File

@ -216,7 +216,7 @@ hypre_BoxCreate( HYPRE_Int ndim )
{
hypre_Box *box;
box = hypre_TAlloc(hypre_Box, 1);
box = hypre_CTAlloc(hypre_Box, 1);
hypre_BoxNDim(box) = ndim;
return box;

View File

@ -369,6 +369,12 @@ hypre_CreateCommInfoFromStencil( hypre_StructGrid *grid,
* Initializations
*------------------------------------------------------*/
hypre_SetIndex(ilower, 0);
hypre_SetIndex(iupper, 0);
hypre_SetIndex(istart, 0);
hypre_SetIndex(istop, 0);
hypre_SetIndex(sgindex, 0);
local_boxes = hypre_StructGridBoxes(grid);
local_ids = hypre_StructGridIDs(grid);
num_boxes = hypre_BoxArraySize(local_boxes);