ENH: distributedTriSurfaceMesh: support distributed running

This commit is contained in:
mattijs
2022-10-26 17:14:38 +01:00
parent 7a67c1e72b
commit 2c7a7b27a3
2 changed files with 29 additions and 7 deletions

View File

@ -2642,11 +2642,16 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io)
bounds().reduce();
const fileName actualFile(triSurfaceMesh::checkFile(io, true));
// Try and find out where the triSurface was loaded from. On slave this
// might give empty filename.
const fileName actualFile(triSurfaceMesh::findFile(io, true));
if
(
actualFile != io.localFilePath(triSurfaceMesh::typeName)
(
actualFile.empty()
|| actualFile != io.localFilePath(triSurfaceMesh::typeName)
)
&& (distType_ == INDEPENDENT || distType_ == DISTRIBUTED)
)
{
@ -2779,11 +2784,16 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
bounds().reduce();
const fileName actualFile(triSurfaceMesh::checkFile(io, dict, true));
// Try and find out where the triSurface was loaded from. On slave this
// might give empty filename.
const fileName actualFile(triSurfaceMesh::findFile(io, dict, true));
if
(
actualFile != io.localFilePath(triSurfaceMesh::typeName)
(
actualFile.empty()
|| actualFile != io.localFilePath(triSurfaceMesh::typeName)
)
&& (distType_ == INDEPENDENT || distType_ == DISTRIBUTED)
)
{