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

#include <vtkAMRBaseReader.h>

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

List of all members.

Public Types

typedef vtkOverlappingAMRAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkAMRBaseReaderNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void Initialize ()
virtual int GetNumberOfBlocks ()=0
virtual int GetNumberOfLevels ()=0
virtual void SetEnableCaching (int)
virtual int GetEnableCaching ()
virtual void EnableCachingOn ()
virtual void EnableCachingOff ()
bool IsCachingEnabled () const
virtual void SetController (vtkMultiProcessController *)
virtual vtkMultiProcessControllerGetController ()
virtual void SetMaxLevel (int)
virtual vtkDataArraySelectionGetCellDataArraySelection ()
virtual vtkDataArraySelectionGetPointDataArraySelection ()
int GetNumberOfPointArrays ()
int GetNumberOfCellArrays ()
const char * GetPointArrayName (int index)
const char * GetCellArrayName (int index)
int GetPointArrayStatus (const char *name)
int GetCellArrayStatus (const char *name)
void SetPointArrayStatus (const char *name, int status)
void SetCellArrayStatus (const char *name, int status)
virtual char * GetFileName ()
virtual void SetFileName (const char *fileName)=0

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkAMRBaseReaderSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkAMRBaseReader ()
virtual ~vtkAMRBaseReader ()
bool IsParallel ()
bool IsBlockMine (const int blockIdx)
vtkUniformGridGetAMRBlock (const int blockIdx)
void AssignAndLoadBlocks (vtkOverlappingAMR *amrds)
void LoadRequestedBlocks (vtkOverlappingAMR *amrds)
void LoadPointData (const int blockIdx, vtkUniformGrid *block)
void LoadCellData (const int blockIdx, vtkUniformGrid *block)
int GetBlockProcessId (const int blockIdx)
void SetupBlockRequest (vtkInformation *outputInfo)
virtual void ReadMetaData ()=0
virtual int GetBlockLevel (const int blockIdx)=0
virtual int FillMetaData ()=0
virtual vtkUniformGridGetAMRGrid (const int blockIdx)=0
void InitializeArraySelections ()
virtual void SetUpDataArraySelections ()=0
void GetAMRData (const int blockIdx, vtkUniformGrid *block, const char *fieldName)
virtual void GetAMRGridData (const int blockIdx, vtkUniformGrid *block, const char *field)=0
virtual int RequestData (vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector)
virtual int RequestInformation (vtkInformation *rqst, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int FillOutputPortInformation (int port, vtkInformation *info)

Static Protected Member Functions

static void SelectionModifiedCallback (vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)

Protected Attributes

vtkDataArraySelectionPointDataArraySelection
vtkDataArraySelectionCellDataArraySelection
vtkCallbackCommandSelectionObserver
bool InitialRequest
int MaxLevel
char * FileName
vtkMultiProcessControllerController
int EnableCaching
vtkAMRDataSetCacheCache
int NumBlocksFromFile
int NumBlocksFromCache
vtkOverlappingAMRMetadata
bool LoadedMetaData
std::vector< intBlockMap

Detailed Description

An abstract class that encapsulates common functionality for all AMR readers.

Definition at line 40 of file vtkAMRBaseReader.h.


Member Typedef Documentation

Reimplemented from vtkOverlappingAMRAlgorithm.

Reimplemented in vtkAMREnzoReader, and vtkAMRFlashReader.

Definition at line 44 of file vtkAMRBaseReader.h.


Constructor & Destructor Documentation

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

Member Function Documentation

static int vtkAMRBaseReader::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 vtkOverlappingAMRAlgorithm.

Reimplemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual int vtkAMRBaseReader::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 vtkOverlappingAMRAlgorithm.

Reimplemented in vtkAMREnzoReader, and vtkAMRFlashReader.

Reimplemented from vtkOverlappingAMRAlgorithm.

Reimplemented in vtkAMREnzoReader, and vtkAMRFlashReader.

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

Reimplemented from vtkOverlappingAMRAlgorithm.

Reimplemented in vtkAMREnzoReader, and vtkAMRFlashReader.

Reimplemented from vtkOverlappingAMRAlgorithm.

Reimplemented in vtkAMREnzoReader, and vtkAMRFlashReader.

void vtkAMRBaseReader::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 vtkOverlappingAMRAlgorithm.

Reimplemented in vtkAMREnzoReader, and vtkAMRFlashReader.

Initializes the AMR reader. All concrete instances must call this method in their constructor.

virtual void vtkAMRBaseReader::SetEnableCaching ( int  ) [virtual]

Set/Get Reader caching property

virtual int vtkAMRBaseReader::GetEnableCaching ( ) [virtual]

Set/Get Reader caching property

virtual void vtkAMRBaseReader::EnableCachingOn ( ) [virtual]

Set/Get Reader caching property

virtual void vtkAMRBaseReader::EnableCachingOff ( ) [virtual]

Set/Get Reader caching property

bool vtkAMRBaseReader::IsCachingEnabled ( ) const [inline]

Set/Get Reader caching property

Definition at line 56 of file vtkAMRBaseReader.h.

Set/Get a multiprocess-controller for reading in parallel. By default this parameter is set to NULL by the constructor.

Set/Get a multiprocess-controller for reading in parallel. By default this parameter is set to NULL by the constructor.

virtual void vtkAMRBaseReader::SetMaxLevel ( int  ) [virtual]

Set the level, up to which the blocks are loaded.

Get the data array selection tables used to configure which data arrays are loaded by the reader.

Get the data array selection tables used to configure which data arrays are loaded by the reader.

Get the number of point or cell arrays available in the input.

Get the number of point or cell arrays available in the input.

const char* vtkAMRBaseReader::GetPointArrayName ( int  index)

Get the name of the point or cell array with the given index in the input.

const char* vtkAMRBaseReader::GetCellArrayName ( int  index)

Get the name of the point or cell array with the given index in the input.

Get/Set whether the point or cell array with the given name is to be read.

int vtkAMRBaseReader::GetCellArrayStatus ( const char *  name)

Get/Set whether the point or cell array with the given name is to be read.

void vtkAMRBaseReader::SetPointArrayStatus ( const char *  name,
int  status 
)

Get/Set whether the point or cell array with the given name is to be read.

void vtkAMRBaseReader::SetCellArrayStatus ( const char *  name,
int  status 
)

Get/Set whether the point or cell array with the given name is to be read.

virtual char* vtkAMRBaseReader::GetFileName ( ) [virtual]

Set/Get the filename. Concrete instances of this class must implement the SetFileName method accordingly.

virtual void vtkAMRBaseReader::SetFileName ( const char *  fileName) [pure virtual]

Set/Get the filename. Concrete instances of this class must implement the SetFileName method accordingly.

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual int vtkAMRBaseReader::GetNumberOfBlocks ( ) [pure virtual]

Returns the total number of blocks. Implemented by concrete instances.

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual int vtkAMRBaseReader::GetNumberOfLevels ( ) [pure virtual]

Returns the total number of levels. Implemented by concrete instances.

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

bool vtkAMRBaseReader::IsParallel ( ) [protected]
bool vtkAMRBaseReader::IsBlockMine ( const int  blockIdx) [protected]

Determines if the block is owned by this process based on the the block index and total number of processes.

vtkUniformGrid* vtkAMRBaseReader::GetAMRBlock ( const int  blockIdx) [protected]

Loads the AMR block corresponding to the given index. The block is either loaded from the file, or, from the cache if caching is enabled.

This method assigns blocks to processes using block-cyclic distribution. It is the method that is used to load distributed AMR data by default.

This method loads all the blocks in the BlockMap for the given process. It assumes that the downstream module is doing an upstream request with the flag LOAD_REQUESTED_BLOCKS which indicates that the downstream filter has already assigned which blocks are needed for each process.

void vtkAMRBaseReader::GetAMRData ( const int  blockIdx,
vtkUniformGrid block,
const char *  fieldName 
) [protected]

Loads the AMR data corresponding to the given field name. NOTE: Currently, only cell-data are supported.

void vtkAMRBaseReader::LoadPointData ( const int  blockIdx,
vtkUniformGrid block 
) [protected]

A wrapper that loops over point arrays and load the point arrays that are enabled, i.e., selected for the given block. NOTE: This method is currently not implemented.

void vtkAMRBaseReader::LoadCellData ( const int  blockIdx,
vtkUniformGrid block 
) [protected]

A wrapper that loops over all cell arrays and loads the cell arrays that are enabled, i.e., selected for the given block. The data are either loaded from the file, or, from the cache if caching is enabled.

int vtkAMRBaseReader::GetBlockProcessId ( const int  blockIdx) [protected]

Returns the block process ID for the block corresponding to the given block index. If this reader instance is serial, i.e., there is no controller associated, the method returns 0. Otherwise, static block-cyclic-distribution is assumed and each block is assigned to a process according to blockIdxN, where N is the total number of processes.

void vtkAMRBaseReader::SetupBlockRequest ( vtkInformation outputInfo) [protected]

Initializes the request of blocks to be loaded. This method checks if an upstream request has been issued from a downstream module which specifies which blocks are to be loaded, otherwise, it uses the max level associated with this reader instance to determine which blocks are to be loaded.

virtual void vtkAMRBaseReader::ReadMetaData ( ) [protected, pure virtual]

Reads all the metadata from the file. Implemented by concrete classes.

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual int vtkAMRBaseReader::GetBlockLevel ( const int  blockIdx) [protected, pure virtual]

Returns the block level for the given block

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual int vtkAMRBaseReader::FillMetaData ( ) [protected, pure virtual]

Loads all the AMR metadata & constructs the LevelIdxPair12InternalIdx datastructure which maps (level,id) pairs to an internal linear index used to identify the corresponding block.

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual vtkUniformGrid* vtkAMRBaseReader::GetAMRGrid ( const int  blockIdx) [protected, pure virtual]

Loads the block according to the index w.r.t. the generated BlockMap.

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual void vtkAMRBaseReader::GetAMRGridData ( const int  blockIdx,
vtkUniformGrid block,
const char *  field 
) [protected, pure virtual]

Loads the block data

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

virtual int vtkAMRBaseReader::RequestData ( vtkInformation vtkNotUsedrequest,
vtkInformationVector **  vtkNotUsedinputVector,
vtkInformationVector outputVector 
) [protected, virtual]

Standard Pipeline methods, subclasses may override this method if needed.

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

Standard Pipeline methods, subclasses may override this method if needed.

Reimplemented from vtkUniformGridAMRAlgorithm.

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

Standard Pipeline methods, subclasses may override this method if needed.

Reimplemented from vtkOverlappingAMRAlgorithm.

Initializes the array selections. If this is an initial request, i.e., the first load from the file, all the arrays are deselected, and the IntialRequest ivar is set to false.

virtual void vtkAMRBaseReader::SetUpDataArraySelections ( ) [protected, pure virtual]

Initializes the PointDataArraySelection & CellDataArraySelection

Implemented in vtkAMREnzoReader, and vtkAMRFlashReader.

static void vtkAMRBaseReader::SelectionModifiedCallback ( vtkObject caller,
unsigned long  eid,
void *  clientdata,
void *  calldata 
) [static, protected]

Call-back registered with the SelectionObserver.


Member Data Documentation

Definition at line 217 of file vtkAMRBaseReader.h.

Definition at line 218 of file vtkAMRBaseReader.h.

Definition at line 219 of file vtkAMRBaseReader.h.

Definition at line 235 of file vtkAMRBaseReader.h.

Definition at line 236 of file vtkAMRBaseReader.h.

char* vtkAMRBaseReader::FileName [protected]

Definition at line 237 of file vtkAMRBaseReader.h.

Definition at line 238 of file vtkAMRBaseReader.h.

Definition at line 240 of file vtkAMRBaseReader.h.

Definition at line 241 of file vtkAMRBaseReader.h.

Definition at line 242 of file vtkAMRBaseReader.h.

Definition at line 243 of file vtkAMRBaseReader.h.

Definition at line 245 of file vtkAMRBaseReader.h.

Definition at line 246 of file vtkAMRBaseReader.h.

std::vector<int> vtkAMRBaseReader::BlockMap [protected]

Definition at line 250 of file vtkAMRBaseReader.h.


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