VTK
Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkAMRBox Class Reference

Encloses a rectangular region of voxel like cells. More...

#include <vtkAMRBox.h>

List of all members.

Public Member Functions

 vtkAMRBox ()
 vtkAMRBox (const vtkAMRBox &other)
 vtkAMRBox (const int lo[3], const int hi[3])
 vtkAMRBox (const int dims[6])
vtkAMRBoxoperator= (const vtkAMRBox &other)
virtual ~vtkAMRBox ()
bool EmptyDimension (int i) const
void SetDimensions (const int lo[3], const int hi[3], int desc=VTK_XYZ_GRID)
void SetDimensions (const int dims[6], int desc=VTK_XYZ_GRID)
void GetDimensions (int lo[3], int hi[3]) const
void GetDimensions (int dims[6]) const
int ComputeDimension () const
void GetValidHiCorner (int hi[3]) const
bool Empty () const
bool operator== (const vtkAMRBox &other) const
ostream & Print (ostream &os) const
void Deserialize (unsigned char *buffer, const vtkIdType &bytesize)
bool DoesBoxIntersectAlongDimension (const vtkAMRBox &other, const int q) const
bool DoesIntersect (const vtkAMRBox &other) const
void Coarsen (int r)
void Refine (int r)
bool Intersect (const vtkAMRBox &other)
bool Contains (const vtkAMRBox &) const
void GetGhostVector (int r, int nghost[6]) const
void RemoveGhosts (int r)
 vtkAMRBox (int ilo, int jlo, int klo, int ihi, int jhi, int khi)
 vtkAMRBox (int ilo, int jlo, int ihi, int jhi)
 vtkAMRBox (const double *origin, const int *dimensions, const double *spacing, const double *globalOrigin, int gridDescription=VTK_XYZ_GRID)
void Invalidate ()
void SetDimensions (int ilo, int jlo, int klo, int ihi, int jhi, int khi, int desc=VTK_XYZ_GRID)
vtkIdType GetNumberOfCells () const
void GetNumberOfCells (int num[3]) const
void GetNumberOfNodes (int ext[3]) const
vtkIdType GetNumberOfNodes () const
const intGetLoCorner () const
const intGetHiCorner () const
bool IsInvalid () const
bool operator!= (const vtkAMRBox &other) const
void Serialize (unsigned char *&buffer, vtkIdType &bytesize)
void Serialize (int *buffer) const
void Grow (int byN)
void Shrink (int byN)
void Shift (int i, int j, int k)
void Shift (const int I[3])
bool Contains (int i, int j, int k) const
bool Contains (const int I[3]) const

Static Public Member Functions

static vtkIdType GetBytesize ()
static int GetCellLinearIndex (const vtkAMRBox &box, const int i, const int j, const int k, int imageDimension[3])
static void GetBounds (const vtkAMRBox &box, const double origin[3], const double spacing[3], double bounds[6])
static void GetBoxOrigin (const vtkAMRBox &box, const double X0[3], const double spacing[3], double x0[3])
static bool HasPoint (const vtkAMRBox &box, const double origin[3], const double spacing[3], double x, double y, double z)
static int ComputeStructuredCoordinates (const vtkAMRBox &box, const double dataOrigin[3], const double h[3], const double x[3], int ijk[3], double pcoords[3])

Protected Member Functions

void Initialize ()
bool IntersectBoxAlongDimension (const vtkAMRBox &other, const int q)

Detailed Description

Encloses a rectangular region of voxel like cells.

vtkAMRBox stores information for an AMR block

See also:
vtkAMRInformation
Examples:
vtkAMRBox (Examples)
Tests:
vtkAMRBox (Tests)

Definition at line 38 of file vtkAMRBox.h.


Constructor & Destructor Documentation

Construct the empty box.

vtkAMRBox::vtkAMRBox ( const vtkAMRBox other)

Copy construct this box from another.

vtkAMRBox::vtkAMRBox ( int  ilo,
int  jlo,
int  klo,
int  ihi,
int  jhi,
int  khi 
)

Construct a specific 3D box.

vtkAMRBox::vtkAMRBox ( int  ilo,
int  jlo,
int  ihi,
int  jhi 
)

Construct a specific 2D box in the XY plane.

vtkAMRBox::vtkAMRBox ( const double origin,
const int dimensions,
const double spacing,
const double globalOrigin,
int  gridDescription = VTK_XYZ_GRID 
)

Construct an AMR box from the description a vtkUniformGrid Note that the dimensions specify the node dimensions, rather than the cell dimensions

vtkAMRBox::vtkAMRBox ( const int  lo[3],
const int  hi[3] 
)

Construct a specific box. (ilo,jlo,klo,)(ihi,jhi,khi)

vtkAMRBox::vtkAMRBox ( const int  dims[6])
virtual vtkAMRBox::~vtkAMRBox ( ) [inline, virtual]

Definition at line 78 of file vtkAMRBox.h.


Member Function Documentation

vtkAMRBox& vtkAMRBox::operator= ( const vtkAMRBox other)

Copy the other box to this box.

void vtkAMRBox::Invalidate ( ) [inline]

Set the box to be invalid;

Definition at line 82 of file vtkAMRBox.h.

bool vtkAMRBox::EmptyDimension ( int  i) const [inline]

Whether dimension i is empty, e.g. if the data set is type VTK_XY_PLANE

Definition at line 91 of file vtkAMRBox.h.

void vtkAMRBox::SetDimensions ( int  ilo,
int  jlo,
int  klo,
int  ihi,
int  jhi,
int  khi,
int  desc = VTK_XYZ_GRID 
)

Set the dimensions of the box. ilo,jlo,klo,ihi,jhi,khi

void vtkAMRBox::SetDimensions ( const int  lo[3],
const int  hi[3],
int  desc = VTK_XYZ_GRID 
)

Set the dimensions of the box. (ilo,jlo,klo),(ihi,jhi,khi)

void vtkAMRBox::SetDimensions ( const int  dims[6],
int  desc = VTK_XYZ_GRID 
)

Set the dimensions of the box. (ilo,ihi,jlo,jhi,klo,khi)

void vtkAMRBox::GetDimensions ( int  lo[3],
int  hi[3] 
) const

Get the dimensions of this box. (ilo,jlo,jhi),(ihi,jhi,khi)

void vtkAMRBox::GetDimensions ( int  dims[6]) const

Get the dimensions of this box. (ilo,ihi, jlo,jhi, klo,khi)

Gets the number of cells enclosed by the box.

void vtkAMRBox::GetNumberOfCells ( int  num[3]) const

Gets the number of cells enclosed by the box.

void vtkAMRBox::GetNumberOfNodes ( int  ext[3]) const

Gets the number of nodes required to construct a physical representation of the box.

Gets the number of nodes required to construct a physical representation of the box.

Determines the dimension of the AMR box given the box indices. Note, the AMR box can be on an arbitrary axis-aligned plane, i.e., XZ or YZ.

const int* vtkAMRBox::GetLoCorner ( ) const [inline]

Get the low corner index.

Definition at line 132 of file vtkAMRBox.h.

const int* vtkAMRBox::GetHiCorner ( ) const [inline]

Get the low corner index.

Definition at line 133 of file vtkAMRBox.h.

void vtkAMRBox::GetValidHiCorner ( int  hi[3]) const

Return a high corner. If dimension j is empty, then hi[j] is set from lo[j]. This is convenient For algorithm that must iterate over all cells

bool vtkAMRBox::Empty ( ) const [inline]

Definition at line 141 of file vtkAMRBox.h.

bool vtkAMRBox::IsInvalid ( ) const [inline]

Check to see if the AMR box instance is invalid.

Definition at line 146 of file vtkAMRBox.h.

bool vtkAMRBox::operator== ( const vtkAMRBox other) const

Test if this box is equal with the box instance on the rhs. Note: Two AMR boxes are equal if: (a) they have the same dimensionality (b) they are at the same level and (c) they occupy the same index space.

bool vtkAMRBox::operator!= ( const vtkAMRBox other) const [inline]

Test if this box is NOT equal with the box instance on the rhs. Note: Two AMR boxes are equal if: (a) they have the same dimensionality (b) they are at the same level and (c) they occupy the same index space.

Definition at line 163 of file vtkAMRBox.h.

ostream& vtkAMRBox::Print ( ostream &  os) const

Send the box to a stream. "(ilo,jlo,jhi),(ihi,jhi,khi)"

void vtkAMRBox::Serialize ( unsigned char *&  buffer,
vtkIdType bytesize 
)

Serializes this object instance into a byte-stream. buffer -- user-supplied pointer where the serialized object is stored. bytesize -- number of bytes, i.e., the size of the buffer. NOTE: buffer is allocated internally by this method. Pre-conditions: buffer == NULL Post-conditions: buffer != NULL bytesize != 0

void vtkAMRBox::Serialize ( int buffer) const

Serializes this object instance into a byte-stream. buffer -- user-supplied pointer where the serialized object is stored. bytesize -- number of bytes, i.e., the size of the buffer. NOTE: buffer is allocated internally by this method. Pre-conditions: buffer == NULL Post-conditions: buffer != NULL bytesize != 0

void vtkAMRBox::Deserialize ( unsigned char *  buffer,
const vtkIdType bytesize 
)

Deserializes this object instance from the given byte-stream. Pre-conditions: buffer != NULL bytesize != 0

bool vtkAMRBox::DoesBoxIntersectAlongDimension ( const vtkAMRBox other,
const int  q 
) const

Checks if this instance of vtkAMRBox intersects with the box passed through the argument list along the given dimension q. True is returned iff the box intersects successfully. Otherwise, there is no intersection along the given dimension and false is returned.

bool vtkAMRBox::DoesIntersect ( const vtkAMRBox other) const
void vtkAMRBox::Coarsen ( int  r)

Coarsen the box.

void vtkAMRBox::Refine ( int  r)

Refine the box.

void vtkAMRBox::Grow ( int  byN)

Grows the box in all directions.

void vtkAMRBox::Shrink ( int  byN)

Grows the box in all directions.

void vtkAMRBox::Shift ( int  i,
int  j,
int  k 
)

Shifts the box in index space

void vtkAMRBox::Shift ( const int  I[3])

Shifts the box in index space

bool vtkAMRBox::Intersect ( const vtkAMRBox other)

Intersect this box with another box in place. Returns true if the boxes do intersect. Note that the box is modified to be the intersection or is made invalid.

bool vtkAMRBox::Contains ( int  i,
int  j,
int  k 
) const

Test to see if a given cell index is inside this box.

bool vtkAMRBox::Contains ( const int  I[3]) const

Test to see if a given cell index is inside this box.

bool vtkAMRBox::Contains ( const vtkAMRBox ) const

Test to see if a given box is inside this box.

void vtkAMRBox::GetGhostVector ( int  r,
int  nghost[6] 
) const

Given an AMR box and the refinement ratio, r, this method computes the number of ghost layers in each of the 6 directions, i.e., [imin,imax,jmin,jmax,kmin,kmax]

Given an AMR box and the refinement ratio, r, this shrinks the AMRBox

static vtkIdType vtkAMRBox::GetBytesize ( ) [inline, static]

Returns the number of bytes allocated by this instance. In addition, this number of bytes corresponds to the buffer size required to serialize any vtkAMRBox instance.

Definition at line 236 of file vtkAMRBox.h.

static int vtkAMRBox::GetCellLinearIndex ( const vtkAMRBox box,
const int  i,
const int  j,
const int  k,
int  imageDimension[3] 
) [static]

Returns the linear index of the given cell structured coordinates

static void vtkAMRBox::GetBounds ( const vtkAMRBox box,
const double  origin[3],
const double  spacing[3],
double  bounds[6] 
) [static]

Get the bounds of this box.

static void vtkAMRBox::GetBoxOrigin ( const vtkAMRBox box,
const double  X0[3],
const double  spacing[3],
double  x0[3] 
) [static]

Get the world space origin of this box. The origin is the location of the lower corner cell's lower corner node,

static bool vtkAMRBox::HasPoint ( const vtkAMRBox box,
const double  origin[3],
const double  spacing[3],
double  x,
double  y,
double  z 
) [static]

Checks if the point is inside this AMRBox instance. x,y,z the world point

static int vtkAMRBox::ComputeStructuredCoordinates ( const vtkAMRBox box,
const double  dataOrigin[3],
const double  h[3],
const double  x[3],
int  ijk[3],
double  pcoords[3] 
) [static]

Compute structured coordinates

void vtkAMRBox::Initialize ( ) [protected]

Initializes this box instance.

bool vtkAMRBox::IntersectBoxAlongDimension ( const vtkAMRBox other,
const int  q 
) [protected]

Intersects this instance of vtkAMRbox with box passed through the argument list along the given dimension q. True is returned iff the box intersects successfully. Otherwise, false is returned if there is no intersection at the given dimension.


The documentation for this class was generated from the following file: