Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkExodusIIWriter Class Reference

#include <vtkExodusIIWriter.h>

Inheritance diagram for vtkExodusIIWriter:

Inheritance graph
[legend]
Collaboration diagram for vtkExodusIIWriter:

Collaboration graph
[legend]
List of all members.

Detailed Description

Write Exodus II files.

This is a vtkWriter that writes it's vtkUnstructuredGrid input out to an Exodus II file. Go to http://endo.sandia.gov/SEACAS/ for more information about the Exodus II format.

Exodus files contain much information that is not captured in a vtkUnstructuredGrid, such as time steps, information lines, node sets, and side sets. This information can be stored in a vtkModelMetadata object.

The vtkExodusReader and vtkPExodusReader can create a vtkModelMetadata object and embed it in a vtkUnstructuredGrid in a series of field arrays. This writer searches for these field arrays and will use the metadata contained in them when creating the new Exodus II file.

You can also explicitly give the vtkExodusIIWriter a vtkModelMetadata object to use when writing the file.

In the absence of the information provided by vtkModelMetadata, if this writer is not part of a parallel application, we will use reasonable defaults for all the values in the output Exodus file. If you don't provide a block ID element array, we'll create a block for each cell type that appears in the unstructured grid.

However if this writer is part of a parallel application (hence writing out a distributed Exodus file), then we need at the very least a list of all the block IDs that appear in the file. And we need the element array of block IDs for the input unstructured grid.

In the absense of a vtkModelMetadata object, you can also provide time step information which we will include in the output Exodus file.

Warning:
If the input floating point field arrays and point locations are all floats or all doubles, this class will operate more efficiently. Mixing floats and doubles will slow you down, because Exodus II requires that we write only floats or only doubles.

We use the terms "point" and "node" interchangeably. Also, we use the terms "element" and "cell" interchangeably.

Definition at line 84 of file vtkExodusIIWriter.h.

Public Types

typedef vtkWriter Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetInput (vtkUnstructuredGrid *ug)
vtkUnstructuredGridGetInput ()
virtual void SetModelMetadata (vtkModelMetadata *)
virtual vtkModelMetadataGetModelMetadata ()
vtkModelMetadataGetOrCreateModelMetadata ()
virtual void SetFileName (const char *)
virtual char * GetFileName ()
virtual void SetStoreDoubles (int)
virtual int GetStoreDoubles ()
virtual void SetGhostLevel (int)
virtual int GetGhostLevel ()
virtual void SetBlockIdArrayName (const char *)
virtual char * GetBlockIdArrayName ()
virtual void SetWriteOutBlockIdArray (int)
virtual int GetWriteOutBlockIdArray ()
virtual void WriteOutBlockIdArrayOn ()
virtual void WriteOutBlockIdArrayOff ()
virtual void SetGlobalNodeIdArrayName (const char *)
virtual char * GetGlobalNodeIdArrayName ()
virtual void SetWriteOutGlobalNodeIdArray (int)
virtual int GetWriteOutGlobalNodeIdArray ()
virtual void WriteOutGlobalNodeIdArrayOn ()
virtual void WriteOutGlobalNodeIdArrayOff ()
virtual void SetGlobalElementIdArrayName (const char *)
virtual char * GetGlobalElementIdArrayName ()
virtual void SetWriteOutGlobalElementIdArray (int)
virtual int GetWriteOutGlobalElementIdArray ()
virtual void WriteOutGlobalElementIdArrayOn ()
virtual void WriteOutGlobalElementIdArrayOff ()
void SetTimeStepValues (int NumberOfTimeSteps, float *v)
float * GetTimeStepValues ()
int GetNumberOfTimeSteps ()
void SetCurrentTimeStep (int ts)
int GetCurrentTimeStep ()
void SetAllBlockIds (int numEntries, int *blockIds)
virtual void SetErrorStatus (int)
virtual int GetErrorStatus ()

Static Public Member Functions

static vtkExodusIIWriterNew ()
static int IsTypeOf (const char *type)
static vtkExodusIIWriterSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkExodusIIWriter ()
 ~vtkExodusIIWriter ()
virtual int FillInputPortInformation (int port, vtkInformation *info)
void WriteData ()
 vtkExodusIIWriter (const vtkExodusIIWriter &)
void operator= (const vtkExodusIIWriter &)
virtual void SetMyFileName (const char *)
virtual char * GetMyFileName ()
virtual void SetMyRank (int)
virtual int GetMyRank ()


Member Typedef Documentation

typedef vtkWriter vtkExodusIIWriter::Superclass
 

Reimplemented from vtkWriter.

Definition at line 88 of file vtkExodusIIWriter.h.


Constructor & Destructor Documentation

vtkExodusIIWriter::vtkExodusIIWriter  )  [protected]
 

vtkExodusIIWriter::~vtkExodusIIWriter  )  [protected]
 

vtkExodusIIWriter::vtkExodusIIWriter const vtkExodusIIWriter  )  [protected]
 


Member Function Documentation

static vtkExodusIIWriter* vtkExodusIIWriter::New  )  [static]
 

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

Reimplemented from vtkAlgorithm.

virtual const char* vtkExodusIIWriter::GetClassName  )  [virtual]
 

Reimplemented from vtkWriter.

static int vtkExodusIIWriter::IsTypeOf const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkWriter.

virtual int vtkExodusIIWriter::IsA const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkWriter.

static vtkExodusIIWriter* vtkExodusIIWriter::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkWriter.

void vtkExodusIIWriter::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 vtkWriter.

void vtkExodusIIWriter::SetInput vtkUnstructuredGrid ug  ) 
 

Specify input which will be written out to the Exodus II file.

vtkUnstructuredGrid* vtkExodusIIWriter::GetInput  ) 
 

Reimplemented from vtkWriter.

virtual void vtkExodusIIWriter::SetModelMetadata vtkModelMetadata  )  [virtual]
 

Specify the vtkModelMetadata object which contains the Exodus file model information (metadata) absent in the vtkUnstructuredGrid. If you have this object, you don't need to set any other values before writing. (Just the FileName and the Input.) Note that the vtkExodusReader can create and attach a vtkModelMetadata object to it's output. If this has happened, the ExodusIIWriter will find it and use it.

virtual vtkModelMetadata* vtkExodusIIWriter::GetModelMetadata  )  [virtual]
 

vtkModelMetadata* vtkExodusIIWriter::GetOrCreateModelMetadata  ) 
 

By default, ModelMetadata is NULL until the Write() method is called, at which point the vtkExodusIIWriter will create a default metadata object. If you would like to obtain the metadata and modify it, rather than creating it yourself, you may call this function. If the metadata already exists (because it has been set by a call to SetModelMetadata or because it has been packed into the FieldData of the input mesh), that metadata will be returned. Otherwise, the vtkExodusIIWriter will create metadata using the input mesh as needed, set the metadata to that object, and return it.

virtual void vtkExodusIIWriter::SetFileName const char *   )  [virtual]
 

Name for the output file. If writing in parallel, the number of processes and the process rank will be appended to the name, so each process is writing out a separate file. If not set, this class will make up a file name.

virtual char* vtkExodusIIWriter::GetFileName  )  [virtual]
 

virtual void vtkExodusIIWriter::SetStoreDoubles int   )  [virtual]
 

If StoreDoubles is ON, the floating point fields in the Exodus file will be double precision fields. The default is determined by the input vtkUnstructuredGrid. If the field data appears to be doubles, then StoreDoubles will be ON, otherwise StoreDoubles will be OFF.

virtual int vtkExodusIIWriter::GetStoreDoubles  )  [virtual]
 

virtual void vtkExodusIIWriter::SetGhostLevel int   )  [virtual]
 

We never write out ghost cells. This variable is here to satisfy the behavior of ParaView on invoking a parallel writer.

virtual int vtkExodusIIWriter::GetGhostLevel  )  [virtual]
 

virtual void vtkExodusIIWriter::SetBlockIdArrayName const char *   )  [virtual]
 

Exodus files group cells into blocks. There are no blocks in a vtkUnstructuredGrid, but you may have stored block IDs in a cell array. If so provide that name here. If you don't provide it, we'll look for an array named "BlockId", and we'll assume it's a vtkIntArray. If we find no block ID array, and this is not a multi-process application, we will create one Exodus block for every cell type found in the vtkUnstructuredGrid.

virtual char* vtkExodusIIWriter::GetBlockIdArrayName  )  [virtual]
 

virtual void vtkExodusIIWriter::SetWriteOutBlockIdArray int   )  [virtual]
 

By default, the integer array containing the global Block Ids of the cells is not included when the new Exodus II file is written out. If you do want to include this array, set WriteOutBlockIdArray to ON.

virtual int vtkExodusIIWriter::GetWriteOutBlockIdArray  )  [virtual]
 

virtual void vtkExodusIIWriter::WriteOutBlockIdArrayOn  )  [virtual]
 

virtual void vtkExodusIIWriter::WriteOutBlockIdArrayOff  )  [virtual]
 

virtual void vtkExodusIIWriter::SetGlobalNodeIdArrayName const char *   )  [virtual]
 

The name of a point array that gives the global node IDs. We will look for an array called "GlobalNodeId" if you don't provide a different name here. It must be an integer array. This array is optional.

virtual char* vtkExodusIIWriter::GetGlobalNodeIdArrayName  )  [virtual]
 

virtual void vtkExodusIIWriter::SetWriteOutGlobalNodeIdArray int   )  [virtual]
 

By default, the integer array containing the global Node Ids is not included when the new Exodus II file is written out. If you do want to include this array, set WriteOutGlobalNodeIdArray to ON.

virtual int vtkExodusIIWriter::GetWriteOutGlobalNodeIdArray  )  [virtual]
 

virtual void vtkExodusIIWriter::WriteOutGlobalNodeIdArrayOn  )  [virtual]
 

virtual void vtkExodusIIWriter::WriteOutGlobalNodeIdArrayOff  )  [virtual]
 

virtual void vtkExodusIIWriter::SetGlobalElementIdArrayName const char *   )  [virtual]
 

The name of a cell array that gives the global cell IDs. We will look for an array called "GlobalElementId" if you don't provide a different name here. It must be an integer array. This array is optional.

virtual char* vtkExodusIIWriter::GetGlobalElementIdArrayName  )  [virtual]
 

virtual void vtkExodusIIWriter::SetWriteOutGlobalElementIdArray int   )  [virtual]
 

By default, the integer array containing the global Element Ids is not included when the new Exodus II file is written out. If you do want to include this array, set WriteOutGlobalElementIdArray to ON.

virtual int vtkExodusIIWriter::GetWriteOutGlobalElementIdArray  )  [virtual]
 

virtual void vtkExodusIIWriter::WriteOutGlobalElementIdArrayOn  )  [virtual]
 

virtual void vtkExodusIIWriter::WriteOutGlobalElementIdArrayOff  )  [virtual]
 

void vtkExodusIIWriter::SetTimeStepValues int  NumberOfTimeSteps,
float *  v
 

If there is no vtkModelMetadata object, then you can input time step values here. We copy your array. This is not required, the writer can use sensible defaults. If you only give one time step value (say 1.0), we'll increment each successive time step by that amount (2.0, 3.0, ...).

float* vtkExodusIIWriter::GetTimeStepValues  )  [inline]
 

Definition at line 198 of file vtkExodusIIWriter.h.

int vtkExodusIIWriter::GetNumberOfTimeSteps  )  [inline]
 

Definition at line 199 of file vtkExodusIIWriter.h.

void vtkExodusIIWriter::SetCurrentTimeStep int  ts  ) 
 

You can set the time step index for the next write with SetCurrentTimeStep. If this is not set, the writer will use the time step index found in the vtkModelMetadata object, or else a sensible default (one more than the last time step written). (You may want to set a different time step index when you have a vtkModelMetadata object if, for example, you are writing out only every tenth time step. The input to the writer may be time step 10, but you want it written out as time step 1.) The first index is 0.

int vtkExodusIIWriter::GetCurrentTimeStep  )  [inline]
 

Definition at line 211 of file vtkExodusIIWriter.h.

void vtkExodusIIWriter::SetAllBlockIds int  numEntries,
int *  blockIds
 

Provide a list of all blockIds that appear in the file. If this is a distributed file, and there is no vtkModelMetadata, we need all block Ids that appear in any of the files. We make a copy of your array of IDs.

virtual void vtkExodusIIWriter::SetErrorStatus int   )  [virtual]
 

The writer will set the ErrorStatus to a non-zero value each time a serious error occurs. Usually this would be a problem with memory allocation, invalid values in the input file's metadata, or an inability to write the output file.

virtual int vtkExodusIIWriter::GetErrorStatus  )  [virtual]
 

virtual int vtkExodusIIWriter::FillInputPortInformation int  port,
vtkInformation info
[protected, 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 vtkAlgorithm.

void vtkExodusIIWriter::WriteData  )  [protected, virtual]
 

Implements vtkWriter.

void vtkExodusIIWriter::operator= const vtkExodusIIWriter  )  [protected]
 

virtual void vtkExodusIIWriter::SetMyFileName const char *   )  [protected, virtual]
 

virtual char* vtkExodusIIWriter::GetMyFileName  )  [protected, virtual]
 

virtual void vtkExodusIIWriter::SetMyRank int   )  [protected, virtual]
 

Get/Set the rank of the writer in a set of parallel processes so that it may determine which piece of the dataset it is responsible for writing.

virtual int vtkExodusIIWriter::GetMyRank  )  [protected, virtual]
 


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 23:42:45 2008 for VTK by  doxygen 1.4.3-20050530