| 1 | /*BHEADER**********************************************************************
|
|---|
| 2 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 3 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 4 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 5 | *
|
|---|
| 6 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 7 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 8 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 9 | *
|
|---|
| 10 | * $Revision: 2.4 $
|
|---|
| 11 | ***********************************************************************EHEADER*/
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | /******************************************************************************
|
|---|
| 15 | *
|
|---|
| 16 | * Header info for the struct assumed partition
|
|---|
| 17 | *
|
|---|
| 18 | *****************************************************************************/
|
|---|
| 19 |
|
|---|
| 20 | #ifndef hypre_ASSUMED_PART_HEADER
|
|---|
| 21 | #define hypre_ASSUMED_PART_HEADER
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 | /* to prevent overflow */
|
|---|
| 25 |
|
|---|
| 26 | #define hypre_doubleBoxVolume(box) \
|
|---|
| 27 | ((double) hypre_BoxSizeX(box) * (double) hypre_BoxSizeY(box) * (double) hypre_BoxSizeZ(box))
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | typedef struct
|
|---|
| 31 | {
|
|---|
| 32 | /* the entries will be the same for all procs */
|
|---|
| 33 | hypre_BoxArray *regions;
|
|---|
| 34 | int num_regions;
|
|---|
| 35 | int *proc_partitions;
|
|---|
| 36 | hypre_Index *divisions;
|
|---|
| 37 | /* these entries are specific to each proc */
|
|---|
| 38 | hypre_BoxArray *my_partition;
|
|---|
| 39 | hypre_BoxArray *my_partition_boxes;
|
|---|
| 40 | int *my_partition_proc_ids;
|
|---|
| 41 | int *my_partition_boxnums;
|
|---|
| 42 | int my_partition_ids_size;
|
|---|
| 43 | int my_partition_ids_alloc;
|
|---|
| 44 | int my_partition_num_distinct_procs;
|
|---|
| 45 |
|
|---|
| 46 | } hypre_StructAssumedPart;
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | /*Accessor macros */
|
|---|
| 50 |
|
|---|
| 51 | #define hypre_StructAssumedPartRegions(apart) ((apart)->regions)
|
|---|
| 52 | #define hypre_StructAssumedPartNumRegions(apart) ((apart)->num_regions)
|
|---|
| 53 | #define hypre_StructAssumedPartDivisions(apart) ((apart)->divisions)
|
|---|
| 54 | #define hypre_StructAssumedPartDivision(apart, i) ((apart)->divisions[i])
|
|---|
| 55 | #define hypre_StructAssumedPartProcPartitions(apart) ((apart)->proc_partitions)
|
|---|
| 56 | #define hypre_StructAssumedPartProcPartition(apart, i) ((apart)->proc_partitions[i])
|
|---|
| 57 | #define hypre_StructAssumedPartMyPartition(apart) ((apart)->my_partition)
|
|---|
| 58 | #define hypre_StructAssumedPartMyPartitionBoxes(apart) ((apart)->my_partition_boxes)
|
|---|
| 59 | #define hypre_StructAssumedPartMyPartitionProcIds(apart) ((apart)->my_partition_proc_ids)
|
|---|
| 60 | #define hypre_StructAssumedPartMyPartitionIdsSize(apart) ((apart)->my_partition_ids_size)
|
|---|
| 61 | #define hypre_StructAssumedPartMyPartitionIdsAlloc(apart) ((apart)->my_partition_ids_alloc)
|
|---|
| 62 | #define hypre_StructAssumedPartMyPartitionNumDistinctProcs(apart) ((apart)->my_partition_num_distinct_procs)
|
|---|
| 63 | #define hypre_StructAssumedPartMyPartitionBoxnums(apart) ((apart)->my_partition_boxnums)
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 | #endif
|
|---|