ENH: checkMesh: -allRegions. See #2072

This commit is contained in:
mattijs
2021-04-21 17:22:41 +01:00
committed by Mark Olesen
parent c410edf928
commit 1177dbd111
5 changed files with 872 additions and 780 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2016 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -280,4 +281,35 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::volRatio
}
Foam::polyMesh::readUpdateState Foam::polyMeshTools::combine
(
const polyMesh::readUpdateState& state0,
const polyMesh::readUpdateState& state1
)
{
if
(
(
state0 == polyMesh::UNCHANGED
&& state1 != polyMesh::UNCHANGED
)
|| (
state0 == polyMesh::POINTS_MOVED
&& (state1 != polyMesh::UNCHANGED && state1 != polyMesh::POINTS_MOVED)
)
|| (
state0 == polyMesh::TOPO_CHANGE
&& state1 == polyMesh::TOPO_PATCH_CHANGE
)
)
{
return state1;
}
else
{
return state0;
}
}
// ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2013 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -92,6 +93,13 @@ public:
const scalarField& vol
);
//- Combine readUpdateState. topo change trumps geom-only
// change etc.
static polyMesh::readUpdateState combine
(
const polyMesh::readUpdateState& state0,
const polyMesh::readUpdateState& state1
);
};