VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkAMRResampleFilter Class Reference

#include <vtkAMRResampleFilter.h>

Inheritance diagram for vtkAMRResampleFilter:
Inheritance graph
[legend]
Collaboration diagram for vtkAMRResampleFilter:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
vtkMultiBlockDataSetAlgorithm 
Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkAMRResampleFilterNewInstance () const
void PrintSelf (ostream &oss, vtkIndent indent)
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int FillInputPortInformation (int port, vtkInformation *info)
virtual int FillOutputPortInformation (int port, vtkInformation *info)
virtual void SetNumberOfSamples (int, int, int)
virtual void SetNumberOfSamples (int[3])
virtual intGetNumberOfSamples ()
virtual void GetNumberOfSamples (int &, int &, int &)
virtual void GetNumberOfSamples (int[3])
virtual void SetTransferToNodes (int)
virtual int GetTransferToNodes ()
virtual void SetDemandDrivenMode (int)
virtual int GetDemandDrivenMode ()
virtual void SetNumberOfPartitions (int)
virtual int GetNumberOfPartitions ()
virtual void SetMin (double, double, double)
virtual void SetMin (double[3])
virtual doubleGetMin ()
virtual void GetMin (double &, double &, double &)
virtual void GetMin (double[3])
virtual void SetMax (double, double, double)
virtual void SetMax (double[3])
virtual doubleGetMax ()
virtual void GetMax (double &, double &, double &)
virtual void GetMax (double[3])
virtual void SetUseBiasVector (bool)
virtual bool GetUseBiasVector ()
virtual void SetBiasVector (double, double, double)
virtual void SetBiasVector (double[3])
virtual doubleGetBiasVector ()
virtual void GetBiasVector (double &, double &, double &)
virtual void GetBiasVector (double[3])
virtual void SetController (vtkMultiProcessController *)
virtual vtkMultiProcessControllerGetController ()
virtual int RequestInformation (vtkInformation *rqst, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Static Public Member Functions

static vtkAMRResampleFilterNew ()
static int IsTypeOf (const char *type)
static vtkAMRResampleFilterSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkAMRResampleFilter ()
virtual ~vtkAMRResampleFilter ()
bool IsParallel ()
bool IsRegionMine (const int regionIdx)
int GetRegionProcessId (const int regionIdx)
void InitializeFields (vtkFieldData *f, vtkIdType size, vtkCellData *src)
bool FoundDonor (double q[3], vtkUniformGrid *&donorGrid, int &cellIdx)
bool IsBlockWithinBounds (double *grd)
void ComputeAMRBlocksToLoad (vtkOverlappingAMR *metadata)
void GetRegion (double h[3])
bool GridsIntersect (double *g1, double *g2)
vtkUniformGridGetReferenceGrid (vtkOverlappingAMR *amrds)
void ComputeCellCentroid (vtkUniformGrid *g, const vtkIdType cellIdx, double c[3])
void CopyData (vtkFieldData *target, vtkIdType targetIdx, vtkCellData *src, vtkIdType srcIdx)
bool SearchForDonorGridAtLevel (double q[3], vtkOverlappingAMR *amrds, unsigned int level, unsigned int &gridId, int &donorCellIdx)
int ProbeGridPointInAMR (double q[3], unsigned int &donorLevel, unsigned int &donorGridId, vtkOverlappingAMR *amrds, unsigned int maxLevel, bool useCached)
int ProbeGridPointInAMRGraph (double q[3], unsigned int &donorLevel, unsigned int &donorGridId, vtkOverlappingAMR *amrds, unsigned int maxLevel, bool useCached)
void TransferToCellCenters (vtkUniformGrid *g, vtkOverlappingAMR *amrds)
void TransferToGridNodes (vtkUniformGrid *g, vtkOverlappingAMR *amrds)
void TransferSolution (vtkUniformGrid *g, vtkOverlappingAMR *amrds)
void ExtractRegion (vtkOverlappingAMR *amrds, vtkMultiBlockDataSet *mbds, vtkOverlappingAMR *metadata)
void ComputeRegionParameters (vtkOverlappingAMR *amrds, int N[3], double min[3], double max[3], double h[3])
void GetDomainParameters (vtkOverlappingAMR *amr, double domainMin[3], double domainMax[3], double h[3], int dims[3], double &rf)
bool RegionIntersectsWithAMR (double domainMin[3], double domainMax[3], double regionMin[3], double regionMax[3])
void AdjustNumberOfSamplesInRegion (const double Rh[3], const bool outside[6], int N[3])
void ComputeLevelOfResolution (const int N[3], const double h0[3], const double L[3], const double rf)
void SnapBounds (const double h0[3], const double domainMin[3], const double domainMax[3], const int dims[3], bool outside[6])
void ComputeAndAdjustRegionParameters (vtkOverlappingAMR *amrds, double h[3])
void SearchGridDecendants (double q[3], vtkOverlappingAMR *amrds, unsigned int maxLevel, unsigned int &level, unsigned int &gridId, int &id)
bool SearchGridAncestors (double q[3], vtkOverlappingAMR *amrds, unsigned int &level, unsigned int &gridId, int &id)

Protected Attributes

vtkOverlappingAMRAMRMetaData
vtkMultiBlockDataSetROI
int NumberOfSamples [3]
int GridNumberOfSamples [3]
double Min [3]
double Max [3]
double GridMin [3]
double GridMax [3]
int LevelOfResolution
int NumberOfPartitions
int TransferToNodes
int DemandDrivenMode
vtkMultiProcessControllerController
bool UseBiasVector
double BiasVector [3]
int NumberOfBlocksTestedForLevel
int NumberOfBlocksTested
int NumberOfBlocksVisSkipped
int NumberOfTimesFoundOnDonorLevel
int NumberOfTimesLevelUp
int NumberOfTimesLevelDown
int NumberOfFailedPoints
double AverageLevel
std::vector< intBlocksToLoad

Detailed Description

This filter is a concrete instance of vtkMultiBlockDataSetAlgorithm and provides functionality for extracting portion of the AMR dataset, specified by a bounding box, in a uniform grid of the desired level of resolution. The resulting uniform grid is stored in a vtkMultiBlockDataSet where the number of blocks correspond to the number of processors utilized for the operation.

Warning:
Data of the input AMR dataset is assumed to be cell-centered.
See also:
vtkOverlappingAMR, vtkUniformGrid
Tests:
vtkAMRResampleFilter (Tests)

Definition at line 54 of file vtkAMRResampleFilter.h.


Member Typedef Documentation

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Definition at line 58 of file vtkAMRResampleFilter.h.


Constructor & Destructor Documentation

virtual vtkAMRResampleFilter::~vtkAMRResampleFilter ( ) [protected, virtual]

Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

static int vtkAMRResampleFilter::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual int vtkAMRResampleFilter::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual vtkObjectBase* vtkAMRResampleFilter::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

void vtkAMRResampleFilter::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual void vtkAMRResampleFilter::SetNumberOfSamples ( int  ,
int  ,
int   
) [virtual]

Set & Get macro for the number of samples (cells) in each dimension. Nominal value for the number of samples is 10x10x10.

virtual void vtkAMRResampleFilter::SetNumberOfSamples ( int  [3]) [virtual]

Set & Get macro for the number of samples (cells) in each dimension. Nominal value for the number of samples is 10x10x10.

Set & Get macro for the number of samples (cells) in each dimension. Nominal value for the number of samples is 10x10x10.

virtual void vtkAMRResampleFilter::GetNumberOfSamples ( int ,
int ,
int  
) [virtual]

Set & Get macro for the number of samples (cells) in each dimension. Nominal value for the number of samples is 10x10x10.

virtual void vtkAMRResampleFilter::GetNumberOfSamples ( int  [3]) [virtual]

Set & Get macro for the number of samples (cells) in each dimension. Nominal value for the number of samples is 10x10x10.

virtual void vtkAMRResampleFilter::SetTransferToNodes ( int  ) [virtual]

Set & Get macro for the TransferToNodes flag

Set & Get macro for the TransferToNodes flag

virtual void vtkAMRResampleFilter::SetDemandDrivenMode ( int  ) [virtual]

Set & Get macro to allow the filter to operate in both demand-driven and standard modes

Set & Get macro to allow the filter to operate in both demand-driven and standard modes

virtual void vtkAMRResampleFilter::SetNumberOfPartitions ( int  ) [virtual]

Set & Get macro for the number of subdivisions

Set & Get macro for the number of subdivisions

virtual void vtkAMRResampleFilter::SetMin ( double  ,
double  ,
double   
) [virtual]

Set and Get the min corner

virtual void vtkAMRResampleFilter::SetMin ( double  [3]) [virtual]

Set and Get the min corner

virtual double* vtkAMRResampleFilter::GetMin ( ) [virtual]

Set and Get the min corner

virtual void vtkAMRResampleFilter::GetMin ( double ,
double ,
double  
) [virtual]

Set and Get the min corner

virtual void vtkAMRResampleFilter::GetMin ( double  [3]) [virtual]

Set and Get the min corner

virtual void vtkAMRResampleFilter::SetMax ( double  ,
double  ,
double   
) [virtual]

Set and Get the max corner

virtual void vtkAMRResampleFilter::SetMax ( double  [3]) [virtual]

Set and Get the max corner

virtual double* vtkAMRResampleFilter::GetMax ( ) [virtual]

Set and Get the max corner

virtual void vtkAMRResampleFilter::GetMax ( double ,
double ,
double  
) [virtual]

Set and Get the max corner

virtual void vtkAMRResampleFilter::GetMax ( double  [3]) [virtual]

Set and Get the max corner

virtual void vtkAMRResampleFilter::SetUseBiasVector ( bool  ) [virtual]

Set & Get macro for the number of subdivisions

virtual bool vtkAMRResampleFilter::GetUseBiasVector ( ) [virtual]

Set & Get macro for the number of subdivisions

virtual void vtkAMRResampleFilter::SetBiasVector ( double  ,
double  ,
double   
) [virtual]

Set and Get the bias vector. If UseBiasVector is true then the largest component of this vector can not have the max number of samples

virtual void vtkAMRResampleFilter::SetBiasVector ( double  [3]) [virtual]

Set and Get the bias vector. If UseBiasVector is true then the largest component of this vector can not have the max number of samples

Set and Get the bias vector. If UseBiasVector is true then the largest component of this vector can not have the max number of samples

virtual void vtkAMRResampleFilter::GetBiasVector ( double ,
double ,
double  
) [virtual]

Set and Get the bias vector. If UseBiasVector is true then the largest component of this vector can not have the max number of samples

virtual void vtkAMRResampleFilter::GetBiasVector ( double  [3]) [virtual]

Set and Get the bias vector. If UseBiasVector is true then the largest component of this vector can not have the max number of samples

Set & Get macro for the multi-process controller

Set & Get macro for the multi-process controller

virtual int vtkAMRResampleFilter::RequestInformation ( vtkInformation rqst,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [virtual]

Gets the metadata from upstream module and determines which blocks should be loaded by this instance.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

This is called by the superclass. This is the method you should override.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual int vtkAMRResampleFilter::FillInputPortInformation ( int  port,
vtkInformation info 
) [virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual int vtkAMRResampleFilter::FillOutputPortInformation ( int  port,
vtkInformation info 
) [virtual]

Fill the output port information objects for this algorithm. This is invoked by the first call to GetOutputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Performs upstream requests to the reader

Reimplemented from vtkMultiBlockDataSetAlgorithm.

bool vtkAMRResampleFilter::IsParallel ( ) [protected]

Checks if this filter instance is running on more than one processes

bool vtkAMRResampleFilter::IsRegionMine ( const int  regionIdx) [protected]

Given the Region ID this function returns whether or not the region belongs to this process or not.

int vtkAMRResampleFilter::GetRegionProcessId ( const int  regionIdx) [protected]

Given the Region ID, this method computes the corresponding process ID that owns the region based on static block-cyclic distribution.

void vtkAMRResampleFilter::ComputeCellCentroid ( vtkUniformGrid g,
const vtkIdType  cellIdx,
double  c[3] 
) [protected]

Given a cell index and a grid, this method computes the cell centroid.

void vtkAMRResampleFilter::InitializeFields ( vtkFieldData f,
vtkIdType  size,
vtkCellData src 
) [protected]

Given the source cell data of an AMR grid, this method initializes the field values, i.e., the number of arrays with the prescribed size. Note, the size must correspond to the number of points if node-centered or the the number of cells if cell-centered.

void vtkAMRResampleFilter::CopyData ( vtkFieldData target,
vtkIdType  targetIdx,
vtkCellData src,
vtkIdType  srcIdx 
) [protected]

Copies the data to the target from the given source.

bool vtkAMRResampleFilter::FoundDonor ( double  q[3],
vtkUniformGrid *&  donorGrid,
int cellIdx 
) [protected]

Given a query point q and a candidate donor grid, this method checks for the corresponding donor cell containing the point in the given grid.

bool vtkAMRResampleFilter::SearchForDonorGridAtLevel ( double  q[3],
vtkOverlappingAMR amrds,
unsigned int  level,
unsigned int gridId,
int donorCellIdx 
) [protected]

Given a query point q and a target level, this method finds a suitable grid at the given level that contains the point if one exists. If a grid is not found, donorGrid is set to NULL.

int vtkAMRResampleFilter::ProbeGridPointInAMR ( double  q[3],
unsigned int donorLevel,
unsigned int donorGridId,
vtkOverlappingAMR amrds,
unsigned int  maxLevel,
bool  useCached 
) [protected]

Finds the AMR grid that contains the point q. If donorGrid points to a valid AMR grid in the hierarchy, the algorithm will search this grid first. The method returns the ID of the cell w.r.t. the donorGrid that contains the probe point q.

int vtkAMRResampleFilter::ProbeGridPointInAMRGraph ( double  q[3],
unsigned int donorLevel,
unsigned int donorGridId,
vtkOverlappingAMR amrds,
unsigned int  maxLevel,
bool  useCached 
) [protected]

Finds the AMR grid that contains the point q. If donorGrid points to a valid AMR grid in the hierarchy, the algorithm will search this grid first. The method returns the ID of the cell w.r.t. the donorGrid that contains the probe point q. - Makes use of Parent/Child Info

Transfers the solution from the AMR dataset to the cell-centers of the given uniform grid.

Transfer the solution from the AMR dataset to the nodes of the given uniform grid.

Transfers the solution

void vtkAMRResampleFilter::ExtractRegion ( vtkOverlappingAMR amrds,
vtkMultiBlockDataSet mbds,
vtkOverlappingAMR metadata 
) [protected]

Extract the region (as a multiblock) from the given AMR dataset.

Checks if the AMR block, described by a uniform grid, is within the bounds of the ROI perscribed by the user.

Given a user-supplied region of interest and the metadata by a module upstream, this method generates the list of linear AMR block indices that need to be loaded.

void vtkAMRResampleFilter::ComputeRegionParameters ( vtkOverlappingAMR amrds,
int  N[3],
double  min[3],
double  max[3],
double  h[3] 
) [protected]

Computes the region parameters

void vtkAMRResampleFilter::GetDomainParameters ( vtkOverlappingAMR amr,
double  domainMin[3],
double  domainMax[3],
double  h[3],
int  dims[3],
double rf 
) [protected]

This method accesses the domain boundaries

bool vtkAMRResampleFilter::RegionIntersectsWithAMR ( double  domainMin[3],
double  domainMax[3],
double  regionMin[3],
double  regionMax[3] 
) [protected]

Checks if the domain and requested region intersect.

void vtkAMRResampleFilter::AdjustNumberOfSamplesInRegion ( const double  Rh[3],
const bool  outside[6],
int  N[3] 
) [protected]

This method adjust the numbers of samples in the region, N, if the requested region falls outside, but, intersects the domain.

void vtkAMRResampleFilter::ComputeLevelOfResolution ( const int  N[3],
const double  h0[3],
const double  L[3],
const double  rf 
) [protected]

This method computes the level of resolution based on the number of samples requested, N, the root level spacing h0, the length of the box, L (actual length after snapping) and the refinement ratio.

void vtkAMRResampleFilter::SnapBounds ( const double  h0[3],
const double  domainMin[3],
const double  domainMax[3],
const int  dims[3],
bool  outside[6] 
) [protected]

This method snaps the bounds s.t. they are within the interior of the domain described the root level uniform grid with h0, domainMin and domain Max. The method computes and returns the new min/max bounds and the corresponding ijkmin/ijkmax coordinates w.r.t. the root level.

This method computes and adjusts the region parameters s.t. the requested region always fall within the AMR region and the number of samples is adjusted if the region of interest moves outsided the domain.

void vtkAMRResampleFilter::GetRegion ( double  h[3]) [protected]

This method gets the region of interest as perscribed by the user.

bool vtkAMRResampleFilter::GridsIntersect ( double g1,
double g2 
) [protected]

Checks if two uniform grids intersect.

Returns a reference grid from the amrdataset.

void vtkAMRResampleFilter::SearchGridDecendants ( double  q[3],
vtkOverlappingAMR amrds,
unsigned int  maxLevel,
unsigned int level,
unsigned int gridId,
int id 
) [protected]

Writes a uniform grid to a file. Used for debugging purposes. void WriteUniformGrid( vtkUniformGrid *g, std::string prefix ); void WriteUniformGrid( double origin[3], int dims[3], double h[3], std::string prefix );

Find a decendant of the specified grid that contains the point. If none is found then the original grid information is returned. The search is limited to levels < maxLevel

bool vtkAMRResampleFilter::SearchGridAncestors ( double  q[3],
vtkOverlappingAMR amrds,
unsigned int level,
unsigned int gridId,
int id 
) [protected]

Find an ancestor of the specified grid that contains the point. If none is found then the original grid information is returned


Member Data Documentation

Definition at line 146 of file vtkAMRResampleFilter.h.

Definition at line 147 of file vtkAMRResampleFilter.h.

Definition at line 148 of file vtkAMRResampleFilter.h.

Definition at line 149 of file vtkAMRResampleFilter.h.

Definition at line 150 of file vtkAMRResampleFilter.h.

Definition at line 151 of file vtkAMRResampleFilter.h.

Definition at line 152 of file vtkAMRResampleFilter.h.

Definition at line 153 of file vtkAMRResampleFilter.h.

Definition at line 154 of file vtkAMRResampleFilter.h.

Definition at line 155 of file vtkAMRResampleFilter.h.

Definition at line 156 of file vtkAMRResampleFilter.h.

Definition at line 157 of file vtkAMRResampleFilter.h.

Definition at line 158 of file vtkAMRResampleFilter.h.

Definition at line 159 of file vtkAMRResampleFilter.h.

Definition at line 160 of file vtkAMRResampleFilter.h.

Definition at line 163 of file vtkAMRResampleFilter.h.

Definition at line 164 of file vtkAMRResampleFilter.h.

Definition at line 165 of file vtkAMRResampleFilter.h.

Definition at line 166 of file vtkAMRResampleFilter.h.

Definition at line 167 of file vtkAMRResampleFilter.h.

Definition at line 168 of file vtkAMRResampleFilter.h.

Definition at line 169 of file vtkAMRResampleFilter.h.

Definition at line 170 of file vtkAMRResampleFilter.h.

std::vector< int > vtkAMRResampleFilter::BlocksToLoad [protected]

Definition at line 172 of file vtkAMRResampleFilter.h.


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