|
IBAMR
IBAMR version 0.19.
|
Class IndexUtilities is a utility class that defines simple functions such as conversion routines between physical coordinates and Cartesian index space.
#include <ibtk/IndexUtilities.h>
Static Public Member Functions | |
| static SAMRAI::hier::Index< NDIM > | coarsen (const SAMRAI::hier::Index< NDIM > &i_fine, const SAMRAI::hier::Index< NDIM > &ratio) |
| static SAMRAI::hier::Index< NDIM > | refine (const SAMRAI::hier::Index< NDIM > &i_coarsen, const SAMRAI::hier::Index< NDIM > &ratio) |
| template<class DoubleArray > | |
| static SAMRAI::hier::Index< NDIM > | getCellIndex (const DoubleArray &X, const double *x_lower, const double *x_upper, const double *dx, const SAMRAI::hier::Index< NDIM > &ilower, const SAMRAI::hier::Index< NDIM > &iupper) |
| template<class DoubleArray > | |
| static SAMRAI::hier::Index< NDIM > | getCellIndex (const DoubleArray &X, const SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianPatchGeometry< NDIM > > &patch_geom, const SAMRAI::hier::Box< NDIM > &patch_box) |
| template<class DoubleArray > | |
| static SAMRAI::hier::Index< NDIM > | getCellIndex (const DoubleArray &X, const SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > &grid_geom, const SAMRAI::hier::IntVector< NDIM > &ratio) |
| template<class DoubleArray > | |
| static SAMRAI::hier::Index< NDIM > | getAssignedCellIndex (const DoubleArray &X, const SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > &grid_geom, const SAMRAI::hier::IntVector< NDIM > &ratio) |
| template<typename Vector > | |
| static Vector | getCellCenter (const SAMRAI::hier::Patch< NDIM > &patch, const SAMRAI::pdat::CellIndex< NDIM > &cell_idx) |
| static IBTK::VectorNd | getCellCenter (const SAMRAI::hier::Patch< NDIM > &patch, const SAMRAI::pdat::CellIndex< NDIM > &cell_idx) |
| template<typename Vector > | |
| static Vector | getCellCenter (const SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > &grid_geom, const SAMRAI::hier::IntVector< NDIM > &ratio, const SAMRAI::pdat::CellIndex< NDIM > &cell_idx) |
| template<typename Vector > | |
| static Vector | getSideCenter (const SAMRAI::hier::Patch< NDIM > &patch, const SAMRAI::pdat::SideIndex< NDIM > &side_idx) |
| static IBTK::VectorNd | getSideCenter (const SAMRAI::hier::Patch< NDIM > &patch, const SAMRAI::pdat::SideIndex< NDIM > &side_idx) |
| template<typename Vector > | |
| static Vector | getSideCenter (const SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > &grid_geom, const SAMRAI::hier::IntVector< NDIM > &ratio, const SAMRAI::pdat::SideIndex< NDIM > &side_idx) |
| static IBTK::VectorNd | getSideCenter (const SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > &grid_geom, const SAMRAI::hier::IntVector< NDIM > &ratio, const SAMRAI::pdat::SideIndex< NDIM > &side_idx) |
| static int | mapIndexToInteger (const SAMRAI::hier::Index< NDIM > &i, const SAMRAI::hier::Index< NDIM > &domain_lower, const SAMRAI::hier::Index< NDIM > &num_cells, const int depth, const int offset=0, const SAMRAI::hier::IntVector< NDIM > &periodic_shift=SAMRAI::hier::IntVector< NDIM >(0)) |
| Map (i,j,k,d) index for a DOF defined for a SAMRAI variable on a particular patch level to a positive integer. Such a mapping can be useful for creating an application ordering (AO) between SAMRAI and PETSc data structures. More... | |
| static SAMRAI::hier::IntVector< NDIM > | partitionPatchBox (std::vector< SAMRAI::hier::Box< NDIM > > &overlap_boxes, std::vector< SAMRAI::hier::Box< NDIM > > &nonoverlap_boxes, const SAMRAI::hier::Box< NDIM > &patch_box, const SAMRAI::hier::IntVector< NDIM > &box_size, const SAMRAI::hier::IntVector< NDIM > &overlap_size) |
| Partition a patch box into subdomains of size box_size and into equal number of overlapping subdomains whose overlap region is defined by overlap_size. More... | |
Private Member Functions | |
| IndexUtilities ()=delete | |
| Default constructor. More... | |
| IndexUtilities (const IndexUtilities &from)=delete | |
| Copy constructor. More... | |
| ~IndexUtilities ()=delete | |
| Unimplemented destructor. More... | |
| IndexUtilities & | operator= (const IndexUtilities &that)=delete |
| Assignment operator. More... | |
|
privatedelete |
|
privatedelete |
| from | The value to copy to this object. |
|
privatedelete |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
X relative to x_lower and x_upper for the specified Cartesian grid spacings dx and box extents ilower and iupper.
|
inlinestatic |
X relative to the extents of the supplied Cartesian grid patch geometry and patch box.
|
inlinestatic |
X relative to the corner of the computational domain specified by the grid geometry object.
|
inlinestatic |
X relative to the corner of the computational domain specified by the grid geometry object. Unlike getCellIndex(), this function assigns points on upper boundaries to the cells inside the domain (instead of in the ghost region) which makes it more suitable for partitioning purposes.This function does not shift points on periodic domains. It is up to the caller to correctly shift X with respect to periodicity before calling this function.
|
inlinestatic |
| patch | The patch on which the cell lives. |
| cell_idx | The CellIndex describing the current cell. |
|
inlinestatic |
| patch | The patch on which the cell lives. |
| cell_idx | The CellIndex describing the current cell. |
|
inlinestatic |
| grid_geom | The grid geometry provides the extents of the computational domain. |
| ratio | Refinement ratio. |
| cell_idx | The CellIndex describing the current cell. |
|
inlinestatic |
| patch | The patch on which the cell lives. |
| side_idx | The SideIndex describing the current side. |
|
inlinestatic |
| patch | The patch on which the cell lives. |
| side_idx | The SideIndex describing the current side. |
|
inlinestatic |
| grid_geom | The grid geometry provides the extents of the computational domain. |
| ratio | Refinement ratio. |
| side_idx | The SideIndex describing the current side. |
|
inlinestatic |
| grid_geom | The grid geometry provides the extents of the computational domain. |
| ratio | Refinement ratio. |
| side_idx | The SideIndex describing the current side. |
|
inlinestatic |
| i | AMR index representing the (i,j,k) array data index for a variable on particular patch level. |
| domain_lower | Lower index of the domain for that patch level, assuming that the patch level covers the entire domain. |
| num_cells | Number of data array cells for a patch level, which is assumed to cover the entire domain. It can be thought of size of the rectangular array that can store the variable data for the patch level that covers the entire domain. For a cc-variable the number of data array cells are same as patch level cells. For a sc-variable, the number of cells for the normal component exceeds the patch level cells by 1 in the normal direction. |
| depth | Data depth. |
| offset | Component offset. This is useful for getting unique values for different components of the variable, e.g., a sc-variable. Different components can have different depth. |
| periodic_shift | Periodic shift in each direction. |
|
inlinestatic |
|
privatedelete |
| that | The value to assign to this object. |
1.8.17