Reverting to previous revision. The last changes cause problems
with multiple boxes on a processor. Oh well.
This commit is contained in:
parent
e591981e4c
commit
1155e03ba4
@ -372,25 +372,25 @@ hypre_StructVectorGetValues( hypre_StructVector *vector,
|
||||
|
||||
double values;
|
||||
|
||||
hypre_BoxArray *data_space;
|
||||
hypre_Box *data_box;
|
||||
hypre_BoxArray *boxes;
|
||||
hypre_Box *box;
|
||||
|
||||
double *vecp;
|
||||
|
||||
int i;
|
||||
|
||||
data_space = hypre_StructVectorDataSpace(vector);
|
||||
boxes = hypre_StructGridBoxes(hypre_StructVectorGrid(vector));
|
||||
|
||||
hypre_ForBoxI(i, data_space)
|
||||
hypre_ForBoxI(i, boxes)
|
||||
{
|
||||
data_box = hypre_BoxArrayBox(data_space, i);
|
||||
box = hypre_BoxArrayBox(boxes, i);
|
||||
|
||||
if ((hypre_IndexX(grid_index) >= hypre_BoxIMinX(data_box)) &&
|
||||
(hypre_IndexX(grid_index) <= hypre_BoxIMaxX(data_box)) &&
|
||||
(hypre_IndexY(grid_index) >= hypre_BoxIMinY(data_box)) &&
|
||||
(hypre_IndexY(grid_index) <= hypre_BoxIMaxY(data_box)) &&
|
||||
(hypre_IndexZ(grid_index) >= hypre_BoxIMinZ(data_box)) &&
|
||||
(hypre_IndexZ(grid_index) <= hypre_BoxIMaxZ(data_box)) )
|
||||
if ((hypre_IndexX(grid_index) >= hypre_BoxIMinX(box)) &&
|
||||
(hypre_IndexX(grid_index) <= hypre_BoxIMaxX(box)) &&
|
||||
(hypre_IndexY(grid_index) >= hypre_BoxIMinY(box)) &&
|
||||
(hypre_IndexY(grid_index) <= hypre_BoxIMaxY(box)) &&
|
||||
(hypre_IndexZ(grid_index) >= hypre_BoxIMinZ(box)) &&
|
||||
(hypre_IndexZ(grid_index) <= hypre_BoxIMaxZ(box)) )
|
||||
{
|
||||
vecp = hypre_StructVectorBoxDataValue(vector, i, grid_index);
|
||||
values = *vecp;
|
||||
@ -413,6 +413,8 @@ hypre_StructVectorGetBoxValues( hypre_StructVector *vector,
|
||||
{
|
||||
int ierr = 0;
|
||||
|
||||
hypre_BoxArray *grid_boxes;
|
||||
hypre_Box *grid_box;
|
||||
hypre_BoxArray *box_array;
|
||||
hypre_Box *box;
|
||||
|
||||
@ -434,16 +436,16 @@ hypre_StructVectorGetBoxValues( hypre_StructVector *vector,
|
||||
int loopi, loopj, loopk;
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Set up `box_array' by intersecting `box' with the vector data space
|
||||
* Set up `box_array' by intersecting `box' with the grid boxes
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
data_space = hypre_StructVectorDataSpace(vector);
|
||||
box_array = hypre_BoxArrayCreate(hypre_BoxArraySize(data_space));
|
||||
grid_boxes = hypre_StructGridBoxes(hypre_StructVectorGrid(vector));
|
||||
box_array = hypre_BoxArrayCreate(hypre_BoxArraySize(grid_boxes));
|
||||
box = hypre_BoxCreate();
|
||||
hypre_ForBoxI(i, data_space)
|
||||
hypre_ForBoxI(i, grid_boxes)
|
||||
{
|
||||
data_box = hypre_BoxArrayBox(data_space, i);
|
||||
hypre_IntersectBoxes(value_box, data_box, box);
|
||||
grid_box = hypre_BoxArrayBox(grid_boxes, i);
|
||||
hypre_IntersectBoxes(value_box, grid_box, box);
|
||||
hypre_CopyBox(box, hypre_BoxArrayBox(box_array, i));
|
||||
}
|
||||
hypre_BoxDestroy(box);
|
||||
|
||||
@ -372,25 +372,25 @@ hypre_StructVectorGetValues( hypre_StructVector *vector,
|
||||
|
||||
double values;
|
||||
|
||||
hypre_BoxArray *data_space;
|
||||
hypre_Box *data_box;
|
||||
hypre_BoxArray *boxes;
|
||||
hypre_Box *box;
|
||||
|
||||
double *vecp;
|
||||
|
||||
int i;
|
||||
|
||||
data_space = hypre_StructVectorDataSpace(vector);
|
||||
boxes = hypre_StructGridBoxes(hypre_StructVectorGrid(vector));
|
||||
|
||||
hypre_ForBoxI(i, data_space)
|
||||
hypre_ForBoxI(i, boxes)
|
||||
{
|
||||
data_box = hypre_BoxArrayBox(data_space, i);
|
||||
box = hypre_BoxArrayBox(boxes, i);
|
||||
|
||||
if ((hypre_IndexX(grid_index) >= hypre_BoxIMinX(data_box)) &&
|
||||
(hypre_IndexX(grid_index) <= hypre_BoxIMaxX(data_box)) &&
|
||||
(hypre_IndexY(grid_index) >= hypre_BoxIMinY(data_box)) &&
|
||||
(hypre_IndexY(grid_index) <= hypre_BoxIMaxY(data_box)) &&
|
||||
(hypre_IndexZ(grid_index) >= hypre_BoxIMinZ(data_box)) &&
|
||||
(hypre_IndexZ(grid_index) <= hypre_BoxIMaxZ(data_box)) )
|
||||
if ((hypre_IndexX(grid_index) >= hypre_BoxIMinX(box)) &&
|
||||
(hypre_IndexX(grid_index) <= hypre_BoxIMaxX(box)) &&
|
||||
(hypre_IndexY(grid_index) >= hypre_BoxIMinY(box)) &&
|
||||
(hypre_IndexY(grid_index) <= hypre_BoxIMaxY(box)) &&
|
||||
(hypre_IndexZ(grid_index) >= hypre_BoxIMinZ(box)) &&
|
||||
(hypre_IndexZ(grid_index) <= hypre_BoxIMaxZ(box)) )
|
||||
{
|
||||
vecp = hypre_StructVectorBoxDataValue(vector, i, grid_index);
|
||||
values = *vecp;
|
||||
@ -413,6 +413,8 @@ hypre_StructVectorGetBoxValues( hypre_StructVector *vector,
|
||||
{
|
||||
int ierr = 0;
|
||||
|
||||
hypre_BoxArray *grid_boxes;
|
||||
hypre_Box *grid_box;
|
||||
hypre_BoxArray *box_array;
|
||||
hypre_Box *box;
|
||||
|
||||
@ -434,16 +436,16 @@ hypre_StructVectorGetBoxValues( hypre_StructVector *vector,
|
||||
int loopi, loopj, loopk;
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Set up `box_array' by intersecting `box' with the vector data space
|
||||
* Set up `box_array' by intersecting `box' with the grid boxes
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
data_space = hypre_StructVectorDataSpace(vector);
|
||||
box_array = hypre_BoxArrayCreate(hypre_BoxArraySize(data_space));
|
||||
grid_boxes = hypre_StructGridBoxes(hypre_StructVectorGrid(vector));
|
||||
box_array = hypre_BoxArrayCreate(hypre_BoxArraySize(grid_boxes));
|
||||
box = hypre_BoxCreate();
|
||||
hypre_ForBoxI(i, data_space)
|
||||
hypre_ForBoxI(i, grid_boxes)
|
||||
{
|
||||
data_box = hypre_BoxArrayBox(data_space, i);
|
||||
hypre_IntersectBoxes(value_box, data_box, box);
|
||||
grid_box = hypre_BoxArrayBox(grid_boxes, i);
|
||||
hypre_IntersectBoxes(value_box, grid_box, box);
|
||||
hypre_CopyBox(box, hypre_BoxArrayBox(box_array, i));
|
||||
}
|
||||
hypre_BoxDestroy(box);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user