Commit 32cf800f authored by Berk Geveci's avatar Berk Geveci Committed by George Zagaris

Update the XML readers and writers to work with pipeline changes.

The XML readers and writers, both parallel and serial, now work
with the pipeline changes. Now, all writers work with pieces
even though the structured ones can handle asking for a sub-
extent.

Change-Id: I9f757ba12a3b9fb84e141506dacadad608eb8b99
parent 1a0b4e9d
......@@ -7,6 +7,7 @@ vtk_module(vtkFiltersParallelGeometry
TEST_DEPENDS
vtkIOXML
vtkIOParallel
vtkIOParallelXML
vtkCommonDataModel
vtkParallelMPI
vtkTestingCore
......
......@@ -7,9 +7,6 @@ set(Module_SRCS
vtkPImageWriter.cxx
vtkPOpenFOAMReader.cxx
vtkPSLACReader.cxx
vtkXMLPHierarchicalBoxDataWriter.cxx
vtkXMLPMultiBlockDataWriter.cxx
vtkXMLPUniformGridAMRWriter.cxx
)
vtk_module_library(vtkIOParallel ${Module_SRCS})
set(Module_SRCS
vtkXMLPDataSetWriter.cxx
vtkXMLPDataWriter.cxx
vtkXMLPImageDataWriter.cxx
vtkXMLPPolyDataWriter.cxx
vtkXMLPRectilinearGridWriter.cxx
vtkXMLPStructuredDataWriter.cxx
vtkXMLPStructuredGridWriter.cxx
vtkXMLPUnstructuredDataWriter.cxx
vtkXMLPUnstructuredGridWriter.cxx
vtkXMLPHierarchicalBoxDataWriter.cxx
vtkXMLPMultiBlockDataWriter.cxx
vtkXMLPUniformGridAMRWriter.cxx
)
set_source_files_properties(
vtkXMLPDataWriter
vtkXMLPStructuredDataWriter
vtkXMLPUnstructuredDataWriter
ABSTRACT
)
vtk_module_library(vtkIOParallelXML ${Module_SRCS})
add_test(NAME ${vtk-module}Cxx-testParallelXMLWriters
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:pvtkpython> ${CMAKE_CURRENT_SOURCE_DIR}/testParallelXMLWriters.py
${VTK_MPI_POSTFLAGS})
\ No newline at end of file
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetTempDir
VTK_TEMP_DIR = vtkGetTempDir()
contr = vtk.vtkMultiProcessController.GetGlobalController()
if not contr:
nranks = 1
rank = 0
else:
nranks = contr.GetNumberOfProcesses()
rank = contr.GetLocalProcessId()
pf = vtk.vtkProgrammableFilter()
def execute():
info = pf.GetOutputInformation(0)
et = vtk.vtkExtentTranslator()
et.SetWholeExtent(info.Get(vtk.vtkStreamingDemandDrivenPipeline.WHOLE_EXTENT()))
et.SetPiece(info.Get(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_PIECE_NUMBER()))
et.SetNumberOfPieces(info.Get(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_NUMBER_OF_PIECES()))
et.PieceToExtent()
output = pf.GetOutput()
input = pf.GetInput()
output.ShallowCopy(input)
output.Crop(et.GetExtent())
pf.SetExecuteMethod(execute)
def GetSource(dataType):
s = vtk.vtkRTAnalyticSource()
if dataType == 'ImageData':
return s
elif dataType == 'UnstructuredGrid':
dst = vtk.vtkDataSetTriangleFilter()
dst.SetInputConnection(s.GetOutputPort())
return dst
elif dataType == 'RectilinearGrid':
s.Update()
input = s.GetOutput()
rg = vtk.vtkRectilinearGrid()
rg.SetExtent(input.GetExtent())
dims = input.GetDimensions()
spacing = input.GetSpacing()
x = vtk.vtkFloatArray()
x.SetNumberOfTuples(dims[0])
for i in range(dims[0]):
x.SetValue(i, spacing[0]*i)
y = vtk.vtkFloatArray()
y.SetNumberOfTuples(dims[1])
for i in range(dims[1]):
y.SetValue(i, spacing[1]*i)
z = vtk.vtkFloatArray()
z.SetNumberOfTuples(dims[2])
for i in range(dims[2]):
z.SetValue(i, spacing[2]*i)
rg.SetXCoordinates(x)
rg.SetYCoordinates(y)
rg.SetZCoordinates(z)
rg.GetPointData().ShallowCopy(input.GetPointData())
pf.SetInputData(rg)
return pf
elif dataType == 'StructuredGrid':
s.Update()
input = s.GetOutput()
sg = vtk.vtkStructuredGrid()
sg.SetExtent(input.GetExtent())
pts = vtk.vtkPoints()
sg.SetPoints(pts)
npts = input.GetNumberOfPoints()
for i in xrange(npts):
pts.InsertNextPoint(input.GetPoint(i))
sg.GetPointData().ShallowCopy(input.GetPointData())
pf.SetInputData(sg)
return pf
def TestDataType(dataType, reader, writer, ext, numTris):
s = GetSource(dataType)
filename = VTK_TEMP_DIR + "/%s.p%s" % (dataType, ext)
writer.SetInputConnection(s.GetOutputPort())
npieces = 16
writer.SetNumberOfPieces(npieces)
pperrank = npieces / nranks
start = pperrank * rank
end = start + pperrank - 1
writer.SetStartPiece(start)
writer.SetEndPiece(end)
writer.SetFileName(filename)
#writer.SetDataModeToAscii()
writer.Write()
if contr:
contr.Barrier()
reader.SetFileName(filename)
cf = vtk.vtkContourFilter()
cf.SetValue(0, 130)
cf.SetInputConnection(reader.GetOutputPort())
cf.UpdateInformation()
cf.GetOutputInformation(0).Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_NUMBER_OF_PIECES(), nranks)
cf.GetOutputInformation(0).Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_PIECE_NUMBER(), rank)
cf.Update()
ntris = cf.GetOutput().GetNumberOfCells()
da = vtk.vtkIntArray()
da.InsertNextValue(ntris)
da2 = vtk.vtkIntArray()
da2.SetNumberOfTuples(1)
contr.AllReduce(da, da2, vtk.vtkCommunicator.SUM_OP)
if rank == 0:
print da2.GetValue(0)
import os
os.remove(filename)
for i in range(npieces):
os.remove(VTK_TEMP_DIR + "/%s_%d.%s" % (dataType, i, ext))
assert da2.GetValue(0) == numTris
TestDataType('ImageData', vtk.vtkXMLPImageDataReader(), vtk.vtkXMLPImageDataWriter(), 'vti', 4924)
TestDataType('RectilinearGrid', vtk.vtkXMLPRectilinearGridReader(), vtk.vtkXMLPRectilinearGridWriter(), 'vtr', 4924)
TestDataType('StructuredGrid', vtk.vtkXMLPStructuredGridReader(), vtk.vtkXMLPStructuredGridWriter(), 'vts', 4924)
TestDataType('UnstructuredGrid', vtk.vtkXMLPUnstructuredGridReader(), vtk.vtkXMLPUnstructuredGridWriter(), 'vtu', 11856)
vtk_module(vtkIOParallelXML
GROUPS
StandAlone
DEPENDS
vtkIOXML
vtkParallelCore
PRIVATE_DEPENDS
vtksys
)
......@@ -118,20 +118,9 @@ int vtkXMLPDataSetWriter::WriteInternal()
writer->SetGhostLevel(this->GetGhostLevel());
writer->SetStartPiece(this->GetStartPiece());
writer->SetEndPiece(this->GetEndPiece());
writer->SetWriteSummaryFile(this->WriteSummaryFile);
writer->AddObserver(vtkCommand::ProgressEvent, this->ProgressObserver);
// Decide whether to write the summary file.
int writeSummary = 0;
if(this->WriteSummaryFileInitialized)
{
writeSummary = this->WriteSummaryFile;
}
else if(this->StartPiece == 0)
{
writeSummary = 1;
}
writer->SetWriteSummaryFile(writeSummary);
// Try to write.
int result = writer->Write();
......
......@@ -26,10 +26,10 @@
#ifndef __vtkXMLPDataSetWriter_h
#define __vtkXMLPDataSetWriter_h
#include "vtkIOXMLModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLPDataWriter.h"
class VTKIOXML_EXPORT vtkXMLPDataSetWriter : public vtkXMLPDataWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPDataSetWriter : public vtkXMLPDataWriter
{
public:
vtkTypeMacro(vtkXMLPDataSetWriter,vtkXMLPDataWriter);
......
......@@ -17,9 +17,13 @@
#include "vtkCallbackCommand.h"
#include "vtkDataSet.h"
#include "vtkErrorCode.h"
#include "vtkMultiProcessController.h"
#include <vtksys/ios/sstream>
vtkCxxSetObjectMacro(vtkXMLPDataWriter,
Controller,
vtkMultiProcessController);
//----------------------------------------------------------------------------
vtkXMLPDataWriter::vtkXMLPDataWriter()
......@@ -28,8 +32,7 @@ vtkXMLPDataWriter::vtkXMLPDataWriter()
this->EndPiece = 0;
this->NumberOfPieces = 1;
this->GhostLevel = 0;
this->WriteSummaryFileInitialized = 0;
this->WriteSummaryFile = 0;
this->WriteSummaryFile = 1;
this->PathName = 0;
this->FileNameBase = 0;
......@@ -40,6 +43,9 @@ vtkXMLPDataWriter::vtkXMLPDataWriter()
this->ProgressObserver = vtkCallbackCommand::New();
this->ProgressObserver->SetCallback(&vtkXMLPDataWriter::ProgressCallbackFunction);
this->ProgressObserver->SetClientData(this);
this->Controller = 0;
this->SetController(vtkMultiProcessController::GetGlobalController());
}
//----------------------------------------------------------------------------
......@@ -49,6 +55,7 @@ vtkXMLPDataWriter::~vtkXMLPDataWriter()
delete [] this->FileNameBase;
delete [] this->FileNameExtension;
delete [] this->PieceFileNameExtension;
this->SetController(0);
this->ProgressObserver->Delete();
}
......@@ -66,7 +73,6 @@ void vtkXMLPDataWriter::PrintSelf(ostream& os, vtkIndent indent)
//----------------------------------------------------------------------------
void vtkXMLPDataWriter::SetWriteSummaryFile(int flag)
{
this->WriteSummaryFileInitialized = 1;
vtkDebugMacro(<< this->GetClassName() << " ("
<< this << "): setting WriteSummaryFile to " << flag);
if(this->WriteSummaryFile != flag)
......@@ -91,13 +97,12 @@ int vtkXMLPDataWriter::WriteInternal()
// Decide whether to write the summary file.
int writeSummary = 0;
if(this->WriteSummaryFileInitialized)
{
writeSummary = this->WriteSummaryFile;
}
else if(this->StartPiece == 0)
if(this->WriteSummaryFile)
{
writeSummary = 1;
if (!this->Controller || this->Controller->GetLocalProcessId() == 0)
{
writeSummary = this->WriteSummaryFile;
}
}
// Write the summary file if requested.
......
......@@ -22,12 +22,13 @@
#ifndef __vtkXMLPDataWriter_h
#define __vtkXMLPDataWriter_h
#include "vtkIOXMLModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLWriter.h"
class vtkCallbackCommand;
class vtkMultiProcessController;
class VTKIOXML_EXPORT vtkXMLPDataWriter : public vtkXMLWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPDataWriter : public vtkXMLWriter
{
public:
vtkTypeMacro(vtkXMLPDataWriter,vtkXMLWriter);
......@@ -51,13 +52,21 @@ public:
vtkGetMacro(GhostLevel, int);
// Description:
// Get/Set whether this instance of the writer should write the
// summary file that refers to all of the pieces' individual files.
// Default is yes only for piece 0 writer.
// Get/Set whether the writer should write the summary file that
// refers to all of the pieces' individual files.
// This is on by default. Note that only the first process writes
// the summary file.
virtual void SetWriteSummaryFile(int flag);
vtkGetMacro(WriteSummaryFile, int);
vtkBooleanMacro(WriteSummaryFile, int);
// Description:
// Controller used to communicate data type of blocks.
// By default, the global controller is used. If you want another
// controller to be used, set it with this.
virtual void SetController(vtkMultiProcessController*);
vtkGetObjectMacro(Controller, vtkMultiProcessController);
protected:
vtkXMLPDataWriter();
~vtkXMLPDataWriter();
......@@ -74,8 +83,8 @@ protected:
char* CreatePieceFileName(int index, const char* path=0);
void SplitFileName();
int WritePieces();
int WritePiece(int index);
virtual int WritePieces();
virtual int WritePiece(int index);
// Callback registered with the ProgressObserver.
static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
......@@ -88,7 +97,6 @@ protected:
int NumberOfPieces;
int GhostLevel;
int WriteSummaryFile;
int WriteSummaryFileInitialized;
char* PathName;
char* FileNameBase;
......@@ -98,6 +106,8 @@ protected:
// The observer to report progress from the internal writer.
vtkCallbackCommand* ProgressObserver;
vtkMultiProcessController* Controller;
private:
vtkXMLPDataWriter(const vtkXMLPDataWriter&); // Not implemented.
void operator=(const vtkXMLPDataWriter&); // Not implemented.
......
......@@ -22,8 +22,9 @@
#define __vtkXMLPHierarchicalBoxDataWriter_h
#include "vtkXMLPUniformGridAMRWriter.h"
#include "vtkIOParallelXMLModule.h" // For export macro
class VTKIOPARALLEL_EXPORT vtkXMLPHierarchicalBoxDataWriter :
class VTKIOPARALLELXML_EXPORT vtkXMLPHierarchicalBoxDataWriter :
public vtkXMLPUniformGridAMRWriter
{
public:
......
......@@ -26,12 +26,12 @@
#ifndef __vtkXMLPImageDataWriter_h
#define __vtkXMLPImageDataWriter_h
#include "vtkIOXMLModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLPStructuredDataWriter.h"
class vtkImageData;
class VTKIOXML_EXPORT vtkXMLPImageDataWriter : public vtkXMLPStructuredDataWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPImageDataWriter : public vtkXMLPStructuredDataWriter
{
public:
static vtkXMLPImageDataWriter* New();
......
......@@ -23,13 +23,13 @@
#ifndef __vtkXMLPMultiBlockDataWriter_h
#define __vtkXMLPMultiBlockDataWriter_h
#include "vtkIOParallelModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLMultiBlockDataWriter.h"
class vtkCompositeDataSet;
class vtkMultiProcessController;
class VTKIOPARALLEL_EXPORT vtkXMLPMultiBlockDataWriter : public vtkXMLMultiBlockDataWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPMultiBlockDataWriter : public vtkXMLMultiBlockDataWriter
{
public:
static vtkXMLPMultiBlockDataWriter* New();
......@@ -114,5 +114,3 @@ private:
};
#endif
......@@ -26,12 +26,12 @@
#ifndef __vtkXMLPPolyDataWriter_h
#define __vtkXMLPPolyDataWriter_h
#include "vtkIOXMLModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLPUnstructuredDataWriter.h"
class vtkPolyData;
class VTKIOXML_EXPORT vtkXMLPPolyDataWriter : public vtkXMLPUnstructuredDataWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPPolyDataWriter : public vtkXMLPUnstructuredDataWriter
{
public:
static vtkXMLPPolyDataWriter* New();
......
......@@ -27,12 +27,12 @@
#ifndef __vtkXMLPRectilinearGridWriter_h
#define __vtkXMLPRectilinearGridWriter_h
#include "vtkIOXMLModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLPStructuredDataWriter.h"
class vtkRectilinearGrid;
class VTKIOXML_EXPORT vtkXMLPRectilinearGridWriter : public vtkXMLPStructuredDataWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPRectilinearGridWriter : public vtkXMLPStructuredDataWriter
{
public:
static vtkXMLPRectilinearGridWriter* New();
......
......@@ -20,6 +20,8 @@
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkCommunicator.h"
#include "vtkMultiProcessController.h"
//----------------------------------------------------------------------------
vtkXMLPStructuredDataWriter::vtkXMLPStructuredDataWriter()
......@@ -37,6 +39,14 @@ void vtkXMLPStructuredDataWriter::PrintSelf(ostream& os, vtkIndent indent)
this->Superclass::PrintSelf(os,indent);
}
//----------------------------------------------------------------------------
int vtkXMLPStructuredDataWriter::WriteInternal()
{
int retVal = this->Superclass::WriteInternal();
this->Extents.clear();
return retVal;
}
//----------------------------------------------------------------------------
void vtkXMLPStructuredDataWriter::WritePrimaryElementAttributes(ostream &os, vtkIndent indent)
{
......@@ -49,43 +59,129 @@ void vtkXMLPStructuredDataWriter::WritePrimaryElementAttributes(ostream &os, vtk
//----------------------------------------------------------------------------
void vtkXMLPStructuredDataWriter::WritePPieceAttributes(int index)
{
vtkDataSet* input = this->GetInputAsDataSet();
int* extent = input->GetInformation()->Get(vtkDataObject::DATA_EXTENT());
this->WriteVectorAttribute("Extent", 6, extent);
if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError)
if (this->Extents.find(index) != this->Extents.end())
{
return;
this->WriteVectorAttribute("Extent", 6, &this->Extents[index][0]);
if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError)
{
return;
}
}
this->Superclass::WritePPieceAttributes(index);
}
//----------------------------------------------------------------------------
vtkXMLWriter* vtkXMLPStructuredDataWriter::CreatePieceWriter(int vtkNotUsed(index))
vtkXMLWriter* vtkXMLPStructuredDataWriter::CreatePieceWriter(int index)
{
// int extent[6];
// vtkInformation* inInfo = this->GetExecutive()->GetInputInformation(0, 0);
// // TODO (berk)
// // Need to fix this
// vtkExtentTranslator* et = 0; vtkExtentTranslator::SafeDownCast(
// inInfo->Get(vtkStreamingDemandDrivenPipeline::EXTENT_TRANSLATOR()));
// et->SetNumberOfPieces(this->GetNumberOfPieces());
// et->SetWholeExtent(inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()));
// et->SetPiece(index);
// et->SetGhostLevel(0);
// et->PieceToExtent();
// et->GetExtent(extent);
// TODO (berk)
// We need to ask for a piece from the input somehow. Maybe RequestUpdateExtent
// is enough but needs to be tested.
vtkXMLStructuredDataWriter* pWriter = this->CreateStructuredPieceWriter();
// pWriter->SetWriteExtent(extent);
pWriter->SetNumberOfPieces(this->NumberOfPieces);
pWriter->SetWritePiece(index);
pWriter->SetGhostLevel(this->GhostLevel);
return pWriter;
}
//----------------------------------------------------------------------------
int vtkXMLPStructuredDataWriter::WritePieces()
{
int result = this->Superclass::WritePieces();
// The code below gathers extens from all processes to write in the
// meta-file. Note that the extent of each piece was already stored by
// each writer in WritePiece(). This is gathering it all to root node.
if (result)
{
if (this->Controller)
{
// Even though the logic is pretty straightforward, we need to
// do a fair amount of work to use GatherV. Each rank simply
// serializes its extents to 7 int blocks - piece number and 6
// extent values. Then we gather this all to root.
int rank = this->Controller->GetLocalProcessId();
int nRanks = this->Controller->GetNumberOfProcesses();
int nPiecesTotal = 0;
vtkIdType nPieces = this->Extents.size();
vtkIdType* offsets = 0;
vtkIdType* nPiecesAll = 0;
vtkIdType* recvLengths = 0;
if (rank == 0)
{
nPiecesAll = new vtkIdType[nRanks];
recvLengths = new vtkIdType[nRanks];
offsets = new vtkIdType[nRanks];
}
this->Controller->Gather(&nPieces, nPiecesAll, 1, 0);
if (rank == 0)
{
for (int i=0; i<nRanks; i++)
{
offsets[i] = nPiecesTotal*7;
nPiecesTotal += nPiecesAll[i];
recvLengths[i] = nPiecesAll[i]*7;
}
}
int* sendBuffer = 0;
int sendSize = nPieces*7;
if (nPieces > 0)
{
sendBuffer = new int[sendSize];
ExtentsType::iterator iter = this->Extents.begin();
for (int count = 0; iter != this->Extents.end(); iter++, count++)
{
sendBuffer[count*7] = iter->first;
memcpy(&sendBuffer[count*7+1], &iter->second[0], 6*sizeof(int));
}
}
int* recvBuffer = 0;
if (rank == 0)
{
recvBuffer = new int[nPiecesTotal*7];
}
this->Controller->GatherV(sendBuffer, recvBuffer, sendSize,
recvLengths, offsets, 0);
if (rank == 0)
{
// Add all received values to Extents.
// These are later written in WritePPieceAttributes()
for (int i=1; i<nRanks; i++)
{
for (int j=0; j<nPiecesAll[i]; j++)
{
int* buffer = recvBuffer + offsets[i] + j*7;
this->Extents[*buffer] =
std::vector<int>(buffer+1, buffer+7);
}
}
}
delete[] nPiecesAll;
delete[] recvBuffer;
delete[] offsets;
delete[] recvLengths;
delete[] sendBuffer;
}
}
return result;
}
//----------------------------------------------------------------------------
int vtkXMLPStructuredDataWriter::WritePiece(int index)
{
int result = this->Superclass::WritePiece(index);
if (result)
{
// Store the extent of this piece in Extents. This is later used
// in WritePPieceAttributes to write the summary file.
vtkDataSet* input = this->GetInputAsDataSet();
int* ext = input->GetInformation()->Get(vtkDataObject::DATA_EXTENT());
this->Extents[index] = std::vector<int>(ext, ext+6);
}
return result;
}
//----------------------------------------------------------------------------
int vtkXMLPStructuredDataWriter::ProcessRequest(vtkInformation* request,
vtkInformationVector** inputVector,
......@@ -123,7 +219,7 @@ int vtkXMLPStructuredDataWriter::RequestUpdateExtent(
// piece information.
vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo,
this->StartPiece, this->GetNumberOfPieces(), 0);
this->StartPiece, this->GetNumberOfPieces(), this->GhostLevel);
return 1;
}
......@@ -20,12 +20,15 @@
#ifndef __vtkXMLPStructuredDataWriter_h
#define __vtkXMLPStructuredDataWriter_h
#include "vtkIOXMLModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLPDataWriter.h"
#include <map> // for keeping track of extents
#include <vector> // for keeping track of extents
class vtkXMLStructuredDataWriter;
class VTKIOXML_EXPORT vtkXMLPStructuredDataWriter : public vtkXMLPDataWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPStructuredDataWriter : public vtkXMLPDataWriter
{
public:
vtkTypeMacro(vtkXMLPStructuredDataWriter,vtkXMLPDataWriter);
......@@ -49,9 +52,17 @@ protected:
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
virtual int WriteInternal();
virtual int WritePieces();
virtual int WritePiece(int index);
private:
vtkXMLPStructuredDataWriter(const vtkXMLPStructuredDataWriter&); // Not implemented.
void operator=(const vtkXMLPStructuredDataWriter&); // Not implemented.
typedef std::map<int, std::vector<int> > ExtentsType;
ExtentsType Extents;
};
#endif
......@@ -27,12 +27,12 @@
#ifndef __vtkXMLPStructuredGridWriter_h
#define __vtkXMLPStructuredGridWriter_h
#include "vtkIOXMLModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro
#include "vtkXMLPStructuredDataWriter.h"
class vtkStructuredGrid;
class VTKIOXML_EXPORT vtkXMLPStructuredGridWriter : public vtkXMLPStructuredDataWriter
class VTKIOPARALLELXML_EXPORT vtkXMLPStructuredGridWriter : public vtkXMLPStructuredDataWriter
{
public:
static vtkXMLPStructuredGridWriter* New();
......
......@@ -26,12 +26,12 @@
#ifndef __vtkXMLPUniformGridAMRWriter_h
#define __vtkXMLPUniformGridAMRWriter_h
#include "vtkIOParallelModule.h" // For export macro
#include "vtkIOParallelXMLModule.h" // For export macro