VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkAMRResampleFilter Class Reference

#include <vtkAMRResampleFilter.h>

Inherits vtkMultiBlockDataSetAlgorithm.

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 int * GetNumberOfSamples ()
 
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 double * GetMin ()
 
virtual void GetMin (double &, double &, double &)
 
virtual void GetMin (double[3])
 
virtual void SetMax (double, double, double)
 
virtual void SetMax (double[3])
 
virtual double * GetMax ()
 
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 double * GetBiasVector ()
 
virtual void GetBiasVector (double &, double &, double &)
 
virtual void GetBiasVector (double[3])
 
virtual void SetController (vtkMultiProcessController *)
 
virtual vtkMultiProcessController * GetController ()
 
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 vtkObjectBase * NewInstanceInternal () 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)
 
vtkUniformGrid * GetReferenceGrid (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

vtkOverlappingAMR * AMRMetaData
 
vtkMultiBlockDataSet * ROI
 
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
 
vtkMultiProcessController * Controller
 
bool UseBiasVector
 
double BiasVector [3]
 
int NumberOfBlocksTestedForLevel
 
int NumberOfBlocksTested
 
int NumberOfBlocksVisSkipped
 
int NumberOfTimesFoundOnDonorLevel
 
int NumberOfTimesLevelUp
 
int NumberOfTimesLevelDown
 
int NumberOfFailedPoints
 
double AverageLevel
 
std::vector< int > BlocksToLoad
 

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

typedef vtkMultiBlockDataSetAlgorithm vtkAMRResampleFilter::Superclass

Definition at line 58 of file vtkAMRResampleFilter.h.

Constructor & Destructor Documentation

vtkAMRResampleFilter::vtkAMRResampleFilter ( )
protected
virtual vtkAMRResampleFilter::~vtkAMRResampleFilter ( )
protectedvirtual

Member Function Documentation

static vtkAMRResampleFilter* vtkAMRResampleFilter::New ( )
static
static int vtkAMRResampleFilter::IsTypeOf ( const char *  type)
static
virtual int vtkAMRResampleFilter::IsA ( const char *  type)
virtual
static vtkAMRResampleFilter* vtkAMRResampleFilter::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkAMRResampleFilter::NewInstanceInternal ( ) const
protectedvirtual
vtkAMRResampleFilter* vtkAMRResampleFilter::NewInstance ( ) const
void vtkAMRResampleFilter::PrintSelf ( ostream &  oss,
vtkIndent  indent 
)
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.

virtual int* vtkAMRResampleFilter::GetNumberOfSamples ( )
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 &  ,
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

virtual int vtkAMRResampleFilter::GetTransferToNodes ( )
virtual

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

virtual int vtkAMRResampleFilter::GetDemandDrivenMode ( )
virtual

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

virtual int vtkAMRResampleFilter::GetNumberOfPartitions ( )
virtual

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

virtual double* vtkAMRResampleFilter::GetBiasVector ( )
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 &  ,
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

virtual void vtkAMRResampleFilter::SetController ( vtkMultiProcessController *  )
virtual

Set & Get macro for the multi-process controller

virtual vtkMultiProcessController* vtkAMRResampleFilter::GetController ( )
virtual

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.

virtual int vtkAMRResampleFilter::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
virtual
virtual int vtkAMRResampleFilter::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
virtual
virtual int vtkAMRResampleFilter::FillOutputPortInformation ( int  port,
vtkInformation *  info 
)
virtual
virtual int vtkAMRResampleFilter::RequestUpdateExtent ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
virtual

Performs upstream requests to the reader

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

void vtkAMRResampleFilter::TransferToCellCenters ( vtkUniformGrid *  g,
vtkOverlappingAMR *  amrds 
)
protected

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

void vtkAMRResampleFilter::TransferToGridNodes ( vtkUniformGrid *  g,
vtkOverlappingAMR *  amrds 
)
protected

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

void vtkAMRResampleFilter::TransferSolution ( vtkUniformGrid *  g,
vtkOverlappingAMR *  amrds 
)
protected

Transfers the solution

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

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

bool vtkAMRResampleFilter::IsBlockWithinBounds ( double *  grd)
protected

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

void vtkAMRResampleFilter::ComputeAMRBlocksToLoad ( vtkOverlappingAMR *  metadata)
protected

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.

void vtkAMRResampleFilter::ComputeAndAdjustRegionParameters ( vtkOverlappingAMR *  amrds,
double  h[3] 
)
protected

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.

vtkUniformGrid* vtkAMRResampleFilter::GetReferenceGrid ( vtkOverlappingAMR *  amrds)
protected

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

vtkOverlappingAMR* vtkAMRResampleFilter::AMRMetaData
protected

Definition at line 146 of file vtkAMRResampleFilter.h.

vtkMultiBlockDataSet* vtkAMRResampleFilter::ROI
protected

Definition at line 147 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfSamples[3]
protected

Definition at line 148 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::GridNumberOfSamples[3]
protected

Definition at line 149 of file vtkAMRResampleFilter.h.

double vtkAMRResampleFilter::Min[3]
protected

Definition at line 150 of file vtkAMRResampleFilter.h.

double vtkAMRResampleFilter::Max[3]
protected

Definition at line 151 of file vtkAMRResampleFilter.h.

double vtkAMRResampleFilter::GridMin[3]
protected

Definition at line 152 of file vtkAMRResampleFilter.h.

double vtkAMRResampleFilter::GridMax[3]
protected

Definition at line 153 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::LevelOfResolution
protected

Definition at line 154 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfPartitions
protected

Definition at line 155 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::TransferToNodes
protected

Definition at line 156 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::DemandDrivenMode
protected

Definition at line 157 of file vtkAMRResampleFilter.h.

vtkMultiProcessController* vtkAMRResampleFilter::Controller
protected

Definition at line 158 of file vtkAMRResampleFilter.h.

bool vtkAMRResampleFilter::UseBiasVector
protected

Definition at line 159 of file vtkAMRResampleFilter.h.

double vtkAMRResampleFilter::BiasVector[3]
protected

Definition at line 160 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfBlocksTestedForLevel
protected

Definition at line 163 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfBlocksTested
protected

Definition at line 164 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfBlocksVisSkipped
protected

Definition at line 165 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfTimesFoundOnDonorLevel
protected

Definition at line 166 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfTimesLevelUp
protected

Definition at line 167 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfTimesLevelDown
protected

Definition at line 168 of file vtkAMRResampleFilter.h.

int vtkAMRResampleFilter::NumberOfFailedPoints
protected

Definition at line 169 of file vtkAMRResampleFilter.h.

double vtkAMRResampleFilter::AverageLevel
protected

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: