diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx index 0d99f3e95b..47e919c9c3 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx @@ -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) { diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C index 624358b4a0..118e99fc91 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C +++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C @@ -465,7 +465,6 @@ void Foam::vtkPV3Foam::Update cout<< " 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); diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H index c6dd65af9e..4e203eacec 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H +++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H @@ -71,6 +71,8 @@ SourceFiles #include "PrimitivePatchInterpolation.H" #include "volPointInterpolation.H" +#undef VTKPV3FOAM_DUALPORT + // * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * // class vtkDataArraySelection; diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 8c351510e7..fd89f0f608 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -529,7 +529,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry) } else { - IOWarningIn("dictionary::add(entry*)", (*this)) + IOWarningIn("dictionary::add(entry*, bool)", (*this)) << "problem replacing entry "<< entryPtr->keyword() << " in dictionary " << name() << endl; @@ -558,7 +558,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry) } else { - IOWarningIn("dictionary::add(entry* entryPtr)", (*this)) + IOWarningIn("dictionary::add(entry*, bool)", (*this)) << "attempt to add entry "<< entryPtr->keyword() << " which already exists in dictionary " << name() << endl; @@ -574,11 +574,13 @@ void Foam::dictionary::add(const entry& e, bool mergeEntry) add(e.clone(*this).ptr(), mergeEntry); } + void Foam::dictionary::add(const keyType& k, const word& w, bool overwrite) { add(new primitiveEntry(k, token(w)), overwrite); } + void Foam::dictionary::add ( const keyType& k, @@ -589,16 +591,19 @@ void Foam::dictionary::add add(new primitiveEntry(k, token(s)), overwrite); } + void Foam::dictionary::add(const keyType& k, const label l, bool overwrite) { add(new primitiveEntry(k, token(l)), overwrite); } + void Foam::dictionary::add(const keyType& k, const scalar s, bool overwrite) { add(new primitiveEntry(k, token(s)), overwrite); } + void Foam::dictionary::add ( const keyType& k, @@ -628,6 +633,7 @@ void Foam::dictionary::set(const entry& e) set(e.clone(*this).ptr()); } + void Foam::dictionary::set(const keyType& k, const dictionary& d) { set(new dictionaryEntry(k, *this, d)); @@ -770,7 +776,7 @@ bool Foam::dictionary::merge(const dictionary& dict) bool changed = false; - forAllConstIter(IDLList, *this, iter) + forAllConstIter(IDLList, dict, iter) { HashTable::iterator fnd = hashedEntries_.find(iter().keyword());