fvMeshStitcher: Stitch when necessary for postProcessing
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
|
||||
// OpenFOAM includes
|
||||
#include "fvMesh.H"
|
||||
#include "fvMeshStitcher.H"
|
||||
#include "Time.H"
|
||||
#include "patchZones.H"
|
||||
#include "collatedFileOperation.H"
|
||||
@ -132,7 +133,6 @@ int Foam::vtkPVFoam::setTime(int nRequest, const double requestTimes[])
|
||||
<< ", nearestIndex = " << nearestIndex << endl;
|
||||
}
|
||||
|
||||
|
||||
// See what has changed
|
||||
if (timeIndex_ != nearestIndex)
|
||||
{
|
||||
@ -144,7 +144,7 @@ int Foam::vtkPVFoam::setTime(int nRequest, const double requestTimes[])
|
||||
|
||||
if (meshPtr_)
|
||||
{
|
||||
if (meshPtr_->readUpdate() != polyMesh::UNCHANGED)
|
||||
if (meshPtr_->readUpdate(false) != polyMesh::UNCHANGED)
|
||||
{
|
||||
meshChanged_ = true;
|
||||
}
|
||||
@ -155,6 +155,12 @@ int Foam::vtkPVFoam::setTime(int nRequest, const double requestTimes[])
|
||||
}
|
||||
}
|
||||
|
||||
// Stitch if necessary
|
||||
if (meshPtr_)
|
||||
{
|
||||
meshPtr_->stitcher().reconnect(reader_->GetInterpolateVolFields());
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< " selectedTime="
|
||||
@ -456,9 +462,7 @@ void Foam::vtkPVFoam::updateFoamMesh()
|
||||
{
|
||||
InfoInFunction << endl
|
||||
<< " Creating OpenFOAM mesh for region " << meshRegion_
|
||||
<< " at time=" << dbPtr_().timeName()
|
||||
<< endl;
|
||||
|
||||
<< " at time=" << dbPtr_().timeName() << endl;
|
||||
}
|
||||
|
||||
meshPtr_ = new fvMesh
|
||||
@ -483,6 +487,12 @@ void Foam::vtkPVFoam::updateFoamMesh()
|
||||
}
|
||||
}
|
||||
|
||||
// Stitch if necessary
|
||||
if (meshPtr_)
|
||||
{
|
||||
meshPtr_->stitcher().reconnect(reader_->GetInterpolateVolFields());
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
printMemory();
|
||||
@ -506,6 +516,7 @@ void Foam::vtkPVFoam::Update
|
||||
lagrangianOutput->Print(cout);
|
||||
printMemory();
|
||||
}
|
||||
|
||||
reader_->UpdateProgress(0.1);
|
||||
|
||||
// Set up mesh parts selection(s)
|
||||
|
||||
@ -749,9 +749,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Update
|
||||
//- Update information for selection dialogs
|
||||
void updateInfo();
|
||||
|
||||
//- Update
|
||||
void Update
|
||||
(
|
||||
vtkMultiBlockDataSet* output,
|
||||
@ -773,11 +774,10 @@ public:
|
||||
// sets to "constant" on error
|
||||
int setTime(int count, const double requestTimes[]);
|
||||
|
||||
|
||||
//- The current time index
|
||||
int timeIndex() const
|
||||
{
|
||||
return timeIndex_;
|
||||
return timeIndex_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user