mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more fault-tolerance in makeFaMesh decomposition
- if the volume faceProcAddressing is missing, it is not readily possible to determine equivalent area procAddressing. Instead of throwing an error, be more fault-tolerant by having it create with READ_IF_PRESENT and then detect and warn if there are problems.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -15,9 +15,21 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// Embed do-while to support early termination
|
||||
if (doDecompose && Pstream::parRun())
|
||||
do
|
||||
{
|
||||
faMeshReconstructor reconstructor(aMesh);
|
||||
faMeshReconstructor reconstructor(aMesh, IOobjectOption::READ_IF_PRESENT);
|
||||
|
||||
if (!reconstructor.good())
|
||||
{
|
||||
Info<< "Missing volume proc-addressing, "
|
||||
"cannot generate area proc-addressing." << nl
|
||||
<< "Also skip decomposing area fields...."
|
||||
<< endl;
|
||||
break;
|
||||
}
|
||||
|
||||
reconstructor.writeAddressing();
|
||||
|
||||
Info<< "Wrote proc-addressing" << nl << endl;
|
||||
@ -77,7 +89,7 @@ if (doDecompose && Pstream::parRun())
|
||||
areaFieldsCache.decomposeAllFields(fieldDecomposer, true);
|
||||
Info<< endl;
|
||||
}
|
||||
}
|
||||
} while (false);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user