Commit 11622be6 authored by Robert Maynard's avatar Robert Maynard

ENH: Added in support for AMR Datasets.

Currently we only convert files that have a single mesh to an AMR dataset. If we ever encounter a dataset with multiple AMR meshes we will have to revis this code.
parent 8e3eae36
......@@ -14,6 +14,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${AVT_DATABASE_SOURCE_DIR}/Database
${AVT_DATABASE_SOURCE_DIR}/Ghost
${AVT_DATABASE_SOURCE_DIR}/Formats
${VISIT_COMMON_INCLUDES}
${AVT_DBATTS_SOURCE_DIR}/MetaData
......@@ -30,5 +31,5 @@ ${VTK_INCLUDE_DIRS}
ADD_PARAVIEW_PLUGIN(AVTAlgorithms "1.0"
SERVER_MANAGER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(AVTAlgorithms visitcommon avtdatabase_ser avtpipeline_ser visit_vtk)
TARGET_LINK_LIBRARIES(AVTAlgorithms visitcommon avtdatabase_ser avtpipeline_ser visit_vtk)
......@@ -33,23 +33,28 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _vtkAvtSTMDFileFormatAlgorithm_h
#define _vtkAvtSTMDFileFormatAlgorithm_h
#include "vtkMultiBlockDataSetAlgorithm.h"
#include "vtkCompositeDataSetAlgorithm.h"
#include "vtkAvtAlgorithmsExport.h"
#include "vtkStdString.h"
#include "avtMeshMetaData.h"
class vtkDataSet;
class vtkDataSet;
class vtkDataArray;
class vtkHierarchicalBoxDataSet;
class vtkMultiBlockDataSet;
//BTX
class avtSTMDFileFormat;
class avtDatabaseMetaData;
class avtVariableCache;
//ETX
class AVTALGORITHMS_EXPORT vtkAvtSTMDFileFormatAlgorithm : public vtkMultiBlockDataSetAlgorithm
class AVTALGORITHMS_EXPORT vtkAvtSTMDFileFormatAlgorithm : public vtkCompositeDataSetAlgorithm
{
public:
static vtkAvtSTMDFileFormatAlgorithm *New();
vtkTypeMacro(vtkAvtSTMDFileFormatAlgorithm,vtkMultiBlockDataSetAlgorithm);
vtkTypeMacro(vtkAvtSTMDFileFormatAlgorithm,vtkCompositeDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
protected:
......@@ -60,6 +65,11 @@ protected:
virtual bool InitializeAVTReader();
virtual void CleanupAVTReader();
//needed since we have to change the type we output
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **,
vtkInformationVector *);
// convenience method
virtual int RequestInformation(vtkInformation* request,
vtkInformationVector** inputVector,
......@@ -72,17 +82,24 @@ protected:
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
//BTX
avtSTMDFileFormat *AvtFile;
avtDatabaseMetaData *MetaData;
//ETX
private:
virtual int FillOutputPortInformation(int, vtkInformation *info);
//BTX
//BTX
int FillAMR( vtkHierarchicalBoxDataSet *amr, const avtMeshMetaData &meshMetaData,
const int &domain);
void FillMultiBlock( vtkMultiBlockDataSet *block, const avtMeshMetaData &meshMetaData );
void AssignProperties( vtkDataSet *data, const vtkStdString &meshName, const int &domain);
bool ValidAMR( const avtMeshMetaData &meshMetaData );
//ETX
bool IsEvenlySpacedDataArray(vtkDataArray *data);
avtSTMDFileFormat *AvtFile;
avtDatabaseMetaData *MetaData;
avtVariableCache *Cache;
int OutputType;
private:
vtkAvtSTMDFileFormatAlgorithm(const vtkAvtSTMDFileFormatAlgorithm&);
void operator = (const vtkAvtSTMDFileFormatAlgorithm&);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment