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:
falgout 2000-07-24 21:47:51 +00:00
parent 8724f441cc
commit 32603e3656
2 changed files with 2 additions and 32 deletions

View File

@ -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)

View File

@ -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)