Merge branch 'olesenm'

This commit is contained in:
andy
2009-03-24 13:38:19 +00:00
4 changed files with 30 additions and 14 deletions

View File

@ -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)
{

View File

@ -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);

View File

@ -71,6 +71,8 @@ SourceFiles
#include "PrimitivePatchInterpolation.H"
#include "volPointInterpolation.H"
#undef VTKPV3FOAM_DUALPORT
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
class vtkDataArraySelection;

View File

@ -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<entry>, *this, iter)
forAllConstIter(IDLList<entry>, dict, iter)
{
HashTable<entry*>::iterator fnd = hashedEntries_.find(iter().keyword());