ENH: blockMesh: Added switch to disable face correspondence checking

To disable face correspondence checking set

    checkFaceCorrespondence off;

in blockMeshDict.  This is necessary in the rare cases where adjacent block
faces do not need to correspond because they are geometrically collapsed,
e.g. to form a pole/axis.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2711
This commit is contained in:
Henry Weller
2017-10-09 21:33:02 +01:00
committed by Andrew Heather
parent 0f45c29feb
commit c96ff47d98
3 changed files with 15 additions and 4 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,6 +40,10 @@ Foam::blockMesh::blockMesh(const IOdictionary& dict, const word& regionName)
:
meshDict_(dict),
verboseOutput(meshDict_.lookupOrDefault("verbose", true)),
checkFaceCorrespondence_
(
meshDict_.lookupOrDefault("checkFaceCorrespondence", true)
),
geometry_
(
IOobject

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -71,6 +71,9 @@ class blockMesh
//- Switch for verbose output
bool verboseOutput;
//- Switch checking face consistency (defaults to true)
bool checkFaceCorrespondence_;
//- Optional searchable geometry to project face-points to
searchableSurfaces geometry_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -212,7 +212,11 @@ void Foam::blockMesh::calcMergeInfo()
const List<FixedList<label, 4>>& blockNfaceFaces =
blocks[blockNlabel].boundaryPatches()[blockNfaceLabel];
if (blockPfaceFaces.size() != blockNfaceFaces.size())
if
(
checkFaceCorrespondence_
&& blockPfaceFaces.size() != blockNfaceFaces.size()
)
{
FatalErrorInFunction
<< "Inconsistent number of faces between block pair "