HYPRE_Int HYPRE_SStructGridSetSharedPart

(HYPRE_SStructGrid grid,
  HYPRE_Int part,
  HYPRE_Int* ilower,
  HYPRE_Int* iupper,
  HYPRE_Int* offset,
  HYPRE_Int shared_part,
  HYPRE_Int* shared_ilower,
  HYPRE_Int* shared_iupper,
  HYPRE_Int* shared_offset,
  HYPRE_Int* index_map,
  HYPRE_Int* index_dir)

Describe how regions inside a part are shared with regions in other parts.

Documentation

Describe how regions inside a part are shared with regions in other parts.

Parts part and shared_part must be different.

Indexes should increase from ilower to iupper. It is not necessary that indexes increase from shared_ilower to shared_iupper. This is to maintain consistency with the SetNeighborPart function, which is also able to describe shared regions but in a more limited fashion.

The offset is a triple (in 3D) used to indicate the dimensionality of the shared set of data and its position with respect to the box extents ilower and iupper on part part. The dimensionality is given by the number of 0's in the triple, and the position is given by plus or minus 1's. For example: (0, 0, 0) indicates sharing of all data in the given box; (1, 0, 0) indicates sharing of data on the faces in the (1, 0, 0) direction; (1, 0, -1) indicates sharing of data on the edges in the (1, 0, -1) direction; and (1, -1, 1) indicates sharing of data on the nodes in the (1, -1, 1) direction. To ensure the dimensionality, it is required that for every nonzero entry, the corresponding extents of the box are the same. For example, if offset is (0, 1, 0), then (2, 1, 3) and (10, 1, 15) are valid box extents, whereas (2, 1, 3) and (10, 7, 15) are invalid (because 1 and 7 are not the same).

The shared_offset is used in the same way as offset, but with respect to the box extents shared_ilower and shared_iupper on part shared_part.

The index_map describes the mapping of indexes 0, 1, and 2 on part part to the corresponding indexes on part shared_part. For example, triple (1, 2, 0) means that indexes 0, 1, and 2 on part part map to indexes 1, 2, and 0 on part shared_part, respectively.

The index_dir describes the direction of the mapping in index_map. For example, triple (1, 1, -1) means that for indexes 0 and 1, increasing values map to increasing values on shared_part, while for index 2, decreasing values map to increasing values.

NOTE: All parts related to each other via this routine must have an identical list of variables and variable types. For example, if part 0 has only two variables on it, a cell centered variable and a node centered variable, and we declare part 1 to have shared regions with part 0, then part 1 must also have only two variables on it, and they must be of type cell and node. In addition, variables associated with FACEs or EDGEs must be grouped together and listed in X, Y, Z order. This is to enable the code to correctly associate variables on one part with variables on a shared part when a coordinate transformation is specified. For example, an XFACE variable on one part may correspond to a YFACE variable on a shared part under a particular tranformation, and the code determines this association by assuming that the variable lists are as noted here.

Alphabetic index