Commit 83337970 authored by Mark Olesen's avatar Mark Olesen
Browse files

#undef VTKPV3FOAM_DUALPORT to disable dual-port output for paraview reader

parent b1a15105
......@@ -50,6 +50,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
output0_ = NULL;
#ifdef VTKPV3FOAM_DUALPORT
// Add second output for the Lagrangian
this->SetNumberOfOutputPorts(2);
vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New();
......@@ -57,6 +58,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
this->GetExecutive()->SetOutputData(1, lagrangian);
lagrangian->Delete();
#endif
TimeStepRange[0] = 0;
TimeStepRange[1] = 0;
......@@ -319,15 +321,6 @@ int vtkPV3FoamReader::RequestData
)
);
vtkMultiBlockDataSet* lagrangianOutput = vtkMultiBlockDataSet::SafeDownCast
(
outputVector->GetInformationObject(1)->Get
(
vtkMultiBlockDataSet::DATA_OBJECT()
)
);
if (Foam::vtkPV3Foam::debug)
{
cout<< "update output with "
......@@ -376,7 +369,21 @@ int vtkPV3FoamReader::RequestData
#else
foamData_->Update(output, lagrangianOutput);
#ifdef VTKPV3FOAM_DUALPORT
foamData_->Update
(
output,
vtkMultiBlockDataSet::SafeDownCast
(
outputVector->GetInformationObject(1)->Get
(
vtkMultiBlockDataSet::DATA_OBJECT()
)
);
);
#else
foamData_->Update(output, output);
#endif
if (ShowPatchNames)
{
......
......@@ -465,7 +465,6 @@ void Foam::vtkPV3Foam::Update
cout<< "<beg> Foam::vtkPV3Foam::Update - output with "
<< output->GetNumberOfBlocks() << " and "
<< lagrangianOutput->GetNumberOfBlocks() << " blocks\n";
output->Print(cout);
lagrangianOutput->Print(cout);
printMemory();
......@@ -504,8 +503,10 @@ void Foam::vtkPV3Foam::Update
reader_->UpdateProgress(0.7);
}
#ifdef VTKPV3FOAM_DUALPORT
// restart port1 at block=0
blockNo = 0;
#endif
convertMeshLagrangian(lagrangianOutput, blockNo);
reader_->UpdateProgress(0.8);
......
......@@ -71,6 +71,8 @@ SourceFiles
#include "PrimitivePatchInterpolation.H"
#include "volPointInterpolation.H"
#undef VTKPV3FOAM_DUALPORT
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
class vtkDataArraySelection;
......
Supports Markdown
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