mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
BUG: inconsistent faceArea on processor boundaries (fixes #2683)
- was missing evaluateCoupled on the initial faceAreaNormals field (related to #2507)
This commit is contained in:
@ -196,6 +196,10 @@ void Foam::faBoundaryMesh::calcGeometry()
|
||||
(void)mesh_.edgeAreaNormals();
|
||||
(void)mesh_.pointAreaNormals();
|
||||
|
||||
(void)mesh_.areaCentres();
|
||||
(void)mesh_.faceAreaNormals();
|
||||
|
||||
|
||||
PstreamBuffers pBufs(Pstream::defaultCommsType);
|
||||
|
||||
if
|
||||
@ -788,6 +792,10 @@ void Foam::faBoundaryMesh::movePoints(const pointField& p)
|
||||
(void)mesh_.edgeAreaNormals();
|
||||
(void)mesh_.pointAreaNormals();
|
||||
|
||||
(void)mesh_.areaCentres();
|
||||
(void)mesh_.faceAreaNormals();
|
||||
|
||||
|
||||
PstreamBuffers pBufs(Pstream::defaultCommsType);
|
||||
|
||||
if
|
||||
|
||||
@ -317,18 +317,7 @@ bool Foam::faMesh::init(const bool doInit)
|
||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||
boundary_.calcGeometry();
|
||||
|
||||
// Ensure processor/processor information is properly synchronised
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
const_cast<areaVectorField&>(areaCentres()).boundaryFieldRef()
|
||||
.evaluateCoupled<processorFaPatch>();
|
||||
|
||||
// This roughly corresponds to what OpenFOAM-v2112 (and earlier) had,
|
||||
// but should nominally be unnecessary.
|
||||
//
|
||||
/// const_cast<areaVectorField&>(faceAreaNormals()).boundaryFieldRef()
|
||||
/// .evaluateCoupled<processorFaPatch>();
|
||||
}
|
||||
syncGeom();
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1010,7 +999,6 @@ bool Foam::faMesh::movePoints()
|
||||
|
||||
clearGeomNotAreas();
|
||||
|
||||
// To satisfy the motion interface for MeshObject, const cast is needed
|
||||
if (patchPtr_)
|
||||
{
|
||||
patchPtr_->movePoints(newPoints);
|
||||
@ -1024,6 +1012,8 @@ bool Foam::faMesh::movePoints()
|
||||
|
||||
// Note: Fluxes were dummy?
|
||||
|
||||
syncGeom();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -876,6 +876,12 @@ void Foam::faMesh::calcFaceCentres() const
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Parallel consistency, exchange on processor patches
|
||||
if (UPstream::parRun())
|
||||
{
|
||||
centres.boundaryFieldRef().evaluateCoupled<processorFaPatch>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1088,6 +1094,12 @@ void Foam::faMesh::calcFaceAreaNormals() const
|
||||
= edgeNormalsBoundary[patchi];
|
||||
}
|
||||
}
|
||||
|
||||
// Parallel consistency, exchange on processor patches
|
||||
if (UPstream::parRun())
|
||||
{
|
||||
faceNormals.boundaryFieldRef().evaluateCoupled<processorFaPatch>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -61,6 +61,8 @@ void Foam::faMeshTools::forceDemandDriven(faMesh& mesh)
|
||||
(void)mesh.pointAreaNormals();
|
||||
(void)mesh.faceCurvatures();
|
||||
(void)mesh.edgeTransformTensors();
|
||||
|
||||
mesh.syncGeom();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user