utilities: Fix warnings about readUpdate enumeration comparisons

This commit is contained in:
Will Bainbridge
2023-11-08 14:56:25 +00:00
parent 03ec16135a
commit 02c28dda6a
3 changed files with 6 additions and 5 deletions

View File

@ -121,7 +121,7 @@ int main(int argc, char *argv[])
// Check for new mesh // Check for new mesh
if (mesh.readUpdate() != polyMesh::UNCHANGED) if (mesh.readUpdate() != fvMesh::UNCHANGED)
{ {
Info<< "Detected changed mesh. Recreating singleCell mesh." << endl; Info<< "Detected changed mesh. Recreating singleCell mesh." << endl;
scMesh.clear(); // remove any registered objects scMesh.clear(); // remove any registered objects

View File

@ -147,7 +147,7 @@ int Foam::vtkPVFoam::setTime(int nRequest, const double requestTimes[])
if if
( (
meshPtr_->readUpdate(fvMesh::stitchType::nonGeometric) meshPtr_->readUpdate(fvMesh::stitchType::nonGeometric)
!= polyMesh::UNCHANGED != fvMesh::UNCHANGED
) )
{ {
meshChanged_ = true; meshChanged_ = true;

View File

@ -806,16 +806,15 @@ Foam::fvMesh::readUpdateState Foam::fvMesh::readUpdate
} }
// Return the corresponding fvMesh read update state // Return the corresponding fvMesh read update state
switch(state) switch (state)
{ {
case polyMesh::UNCHANGED: case polyMesh::UNCHANGED:
return UNCHANGED; return UNCHANGED;
case polyMesh::POINTS_MOVED: case polyMesh::POINTS_MOVED:
return return
stitcher_.valid() stitcher_.valid()
&& stitcher_->stitches()
&& stitch != stitchType::none && stitch != stitchType::none
&& state != polyMesh::UNCHANGED && stitcher_->stitches()
? STITCHED ? STITCHED
: POINTS_MOVED; : POINTS_MOVED;
case polyMesh::TOPO_CHANGE: case polyMesh::TOPO_CHANGE:
@ -823,6 +822,8 @@ Foam::fvMesh::readUpdateState Foam::fvMesh::readUpdate
case polyMesh::TOPO_PATCH_CHANGE: case polyMesh::TOPO_PATCH_CHANGE:
return TOPO_PATCH_CHANGE; return TOPO_PATCH_CHANGE;
} }
return UNCHANGED;
} }