#include <source/hierarchy/boxes/BoxGraphUtilities.h>
Static Public Member Functions | |
static void | makeBoxesPlusPeriodicBoxes (BoxArray< DIM > &out_boxes, const BoxArray< DIM > &in_boxes, const tbox::Array< tbox::List< IntVector< DIM > > > &shifts) |
Returns an array of boxes that includes entries for each box that touches a periodic boundary. | |
static void | makeBoxesPlusPeriodicBoxes (BoxArray< DIM > &out_boxes, tbox::Array< int > &out_indices, const BoxArray< DIM > &in_boxes, const tbox::Array< tbox::List< IntVector< DIM > > > &shifts) |
Returns an array of boxes that includes entries for each box that touches a periodic boundary. | |
static int | countPeriodicBoxes (const tbox::Array< tbox::List< IntVector< DIM > > > &shifts) |
Returns the sum of shifts[j].getNumberOfItems(). | |
static int | qsortIntCompare (const void *v, const void *w) |
Compare function for use with qsort when sorting integers in ascending order. |
* * --------------------------- * | | * | | * | | * |------------- |------------- * | this | | the virtual| * | box touches| | wrap around| * | a periodic | | box | * | boundary | | | * |------------- |------------- * | | * | domain | * | box | * --------------------------- * *
The BoxTop, BoxGraph, and possibly other classes require as input arrays of boxes in which the "virtual" boxes are explicitly represented.
void SAMRAI::hier::BoxGraphUtilities< DIM >::makeBoxesPlusPeriodicBoxes | ( | BoxArray< DIM > & | out_boxes, | |
const BoxArray< DIM > & | in_boxes, | |||
const tbox::Array< tbox::List< IntVector< DIM > > > & | shifts | |||
) | [static] |
Returns an array of boxes that includes entries for each box that touches a periodic boundary.
The shift array must either have zero length, or have the same length as in_boxes, otherwise an unrecoverable error will be thrown.
out_boxes | contains all items in the in_boxes array, and contains one or more additional items for any box that touches a periodic boundary. | |
in_boxes | array of input boxes. | |
shifts | shift information for each of the input boxes. |
void SAMRAI::hier::BoxGraphUtilities< DIM >::makeBoxesPlusPeriodicBoxes | ( | BoxArray< DIM > & | out_boxes, | |
tbox::Array< int > & | out_indices, | |||
const BoxArray< DIM > & | in_boxes, | |||
const tbox::Array< tbox::List< IntVector< DIM > > > & | shifts | |||
) | [static] |
Returns an array of boxes that includes entries for each box that touches a periodic boundary.
The shift array must either have zero length, or have the same length as in_boxes, otherwise an unrecoverable error will be thrown.
out_boxes | contains all items in the in_boxes array, and contains one or more additional items for any box that touches a periodic boundary. | |
out_indices | contains an entry for each box in out_boxes; the entry indicates the box, w.r.t in_boxes, from which the box was derived. | |
in_boxes | array of input boxes. | |
shifts | shift information for each of the input boxes. |
int SAMRAI::hier::BoxGraphUtilities< DIM >::countPeriodicBoxes | ( | const tbox::Array< tbox::List< IntVector< DIM > > > & | shifts | ) | [static] |
Returns the sum of shifts[j].getNumberOfItems().
This function is called by makeBoxesPlusPeriodicBoxes().
shifts | periodic shift information for each box. |
int SAMRAI::hier::BoxGraphUtilities< DIM >::qsortIntCompare | ( | const void * | v, | |
const void * | w | |||
) | [static] |
Compare function for use with qsort when sorting integers in ascending order.
Sample usage:
* intarray[len]; * ... * qsort(array, len, sizeof(int), qsortIntCompare); *