fvMesh::updateMesh: Only store the old-time volumes if they are already present
i.e. if mesh-morphing is active
This commit is contained in:
@ -1588,6 +1588,10 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
<< mesh.faceNeighbour()
|
||||
<< mesh.boundaryMesh()
|
||||
|
||||
//*** Write the old-time volumes if present
|
||||
// << mesh.V0().field()
|
||||
// << mesh.V0().field()
|
||||
|
||||
<< zonePoints
|
||||
<< zoneFaces
|
||||
<< zoneFaceFlip
|
||||
@ -1632,6 +1636,10 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
|
||||
labelList domainAllNeighbour(fromNbr);
|
||||
PtrList<entry> patchEntries(fromNbr);
|
||||
|
||||
//*** Read the old-time volumes if present
|
||||
// scalarField V0(fromNbr);
|
||||
// scalarField V00(fromNbr);
|
||||
|
||||
CompactListList<label> zonePoints(fromNbr);
|
||||
CompactListList<label> zoneFaces(fromNbr);
|
||||
CompactListList<bool> zoneFaceFlip(fromNbr);
|
||||
@ -1681,6 +1689,10 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
|
||||
// Add patches; no parallel comms
|
||||
domainMesh.addFvPatches(patches, false);
|
||||
|
||||
//*** Set the old-time volumes if present
|
||||
// domainMesh.setV0().field() = V0;
|
||||
// domainMesh.setV00().field() = V00;
|
||||
|
||||
// Construct zones
|
||||
List<pointZone*> pZonePtrs(pointZoneNames.size());
|
||||
forAll(pZonePtrs, i)
|
||||
|
||||
@ -799,9 +799,12 @@ void Foam::fvMesh::updateMesh(const mapPolyMesh& mpm)
|
||||
|
||||
if (VPtr_)
|
||||
{
|
||||
// Grab old time volumes if the time has been incremented
|
||||
// This will update V0, V00
|
||||
storeOldVol(mpm.oldCellVolumes());
|
||||
// Cache old time volumes if they exist and the time has been
|
||||
// incremented. This will update V0, V00
|
||||
if (V0Ptr_)
|
||||
{
|
||||
storeOldVol(mpm.oldCellVolumes());
|
||||
}
|
||||
|
||||
// Few checks
|
||||
if (VPtr_ && (V().size() != mpm.nOldCells()))
|
||||
@ -854,10 +857,13 @@ void Foam::fvMesh::updateMesh(const mapDistributePolyMesh& mdpm)
|
||||
|
||||
// if (VPtr_)
|
||||
// {
|
||||
// // Grab old time volumes if the time has been incremented
|
||||
// // This will update V0, V00
|
||||
// storeOldVol(mdpm.oldCellVolumes());
|
||||
|
||||
// // Cache old time volumes if they exist and the time has been
|
||||
// // incremented. This will update V0, V00
|
||||
// if (V0Ptr_)
|
||||
// {
|
||||
// storeOldVol(mpm.oldCellVolumes());
|
||||
// }
|
||||
//
|
||||
// // Few checks
|
||||
// if (VPtr_ && (V().size() != mdpm.nOldCells()))
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user