When a particular process does not own a piece of the grid, instead
of add a zero-sized fake box, just set BoxArray to be of size zero.
This commit is contained in:
parent
8724f441cc
commit
32603e3656
@ -29,7 +29,7 @@ hypre_StructGridCreate( MPI_Comm comm,
|
||||
|
||||
hypre_StructGridComm(grid) = comm;
|
||||
hypre_StructGridDim(grid) = dim;
|
||||
hypre_StructGridBoxes(grid) = NULL;
|
||||
hypre_StructGridBoxes(grid) = hypre_BoxArrayCreate(0);
|
||||
hypre_StructGridIDs(grid) = NULL;
|
||||
hypre_StructGridNeighbors(grid) = NULL;
|
||||
hypre_StructGridMaxDistance(grid) = 2;
|
||||
@ -125,11 +125,6 @@ hypre_StructGridSetExtents( hypre_StructGrid *grid,
|
||||
int ierr = 0;
|
||||
hypre_Box *box;
|
||||
|
||||
if (hypre_StructGridBoxes(grid) == NULL)
|
||||
{
|
||||
hypre_StructGridBoxes(grid) = hypre_BoxArrayCreate(0);
|
||||
}
|
||||
|
||||
box = hypre_BoxCreate();
|
||||
hypre_BoxSetExtents(box, ilower, iupper);
|
||||
hypre_AppendBox(box, hypre_StructGridBoxes(grid));
|
||||
@ -226,16 +221,6 @@ hypre_StructGridAssemble( hypre_StructGrid *grid )
|
||||
int size;
|
||||
int i;
|
||||
|
||||
/* If I don't own any boxes, need to add a "zero-sized" */
|
||||
if (hypre_StructGridBoxes(grid) == NULL)
|
||||
{
|
||||
hypre_Index ilower, iupper;
|
||||
|
||||
hypre_SetIndex(ilower, 99, 99, 99);
|
||||
hypre_SetIndex(iupper, -99, -99, -99);
|
||||
hypre_StructGridSetExtents(grid, ilower, iupper);
|
||||
}
|
||||
|
||||
boxes = hypre_StructGridBoxes(grid);
|
||||
|
||||
if (hypre_StructGridNeighbors(grid) == NULL)
|
||||
|
||||
@ -29,7 +29,7 @@ hypre_StructGridCreate( MPI_Comm comm,
|
||||
|
||||
hypre_StructGridComm(grid) = comm;
|
||||
hypre_StructGridDim(grid) = dim;
|
||||
hypre_StructGridBoxes(grid) = NULL;
|
||||
hypre_StructGridBoxes(grid) = hypre_BoxArrayCreate(0);
|
||||
hypre_StructGridIDs(grid) = NULL;
|
||||
hypre_StructGridNeighbors(grid) = NULL;
|
||||
hypre_StructGridMaxDistance(grid) = 2;
|
||||
@ -125,11 +125,6 @@ hypre_StructGridSetExtents( hypre_StructGrid *grid,
|
||||
int ierr = 0;
|
||||
hypre_Box *box;
|
||||
|
||||
if (hypre_StructGridBoxes(grid) == NULL)
|
||||
{
|
||||
hypre_StructGridBoxes(grid) = hypre_BoxArrayCreate(0);
|
||||
}
|
||||
|
||||
box = hypre_BoxCreate();
|
||||
hypre_BoxSetExtents(box, ilower, iupper);
|
||||
hypre_AppendBox(box, hypre_StructGridBoxes(grid));
|
||||
@ -226,16 +221,6 @@ hypre_StructGridAssemble( hypre_StructGrid *grid )
|
||||
int size;
|
||||
int i;
|
||||
|
||||
/* If I don't own any boxes, need to add a "zero-sized" */
|
||||
if (hypre_StructGridBoxes(grid) == NULL)
|
||||
{
|
||||
hypre_Index ilower, iupper;
|
||||
|
||||
hypre_SetIndex(ilower, 99, 99, 99);
|
||||
hypre_SetIndex(iupper, -99, -99, -99);
|
||||
hypre_StructGridSetExtents(grid, ilower, iupper);
|
||||
}
|
||||
|
||||
boxes = hypre_StructGridBoxes(grid);
|
||||
|
||||
if (hypre_StructGridNeighbors(grid) == NULL)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user