mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improve findInstance handling for optional files
- previously would always return "constant" as the instance for
an optional dir/file that wasn't found.
However, this meant retesting to screen out false positives.
Now support an additional parameter
'bool constant_fallback = ...'
to return "constant" or an empty word.
The method signature changes slightly with a new optional bool
parameter:
//! Return \c "constant" instead of \c "" if the search failed
const bool constant_fallback = true
ENH: code consolidation for findInstancePath
- relocate from Time to TimePaths and provide an additional static
version that is reused in fileOperations
BUG: distributedTriSurfaceMesh:::findLocalInstance broken (#3135)
- was not checking the parent at all.
COMP: remove unused findInstancePath(const fileName&, ..) method
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -314,11 +314,7 @@ boundBox procBounds
|
||||
{
|
||||
fileName pointsInstance
|
||||
(
|
||||
procDb.findInstance
|
||||
(
|
||||
polyMesh::meshDir(regionName),
|
||||
"points"
|
||||
)
|
||||
procDb.findInstance(polyMesh::meshDir(regionName), "points")
|
||||
);
|
||||
|
||||
if (pointsInstance != procDb.timeName())
|
||||
@ -343,11 +339,7 @@ boundBox procBounds
|
||||
IOobject
|
||||
(
|
||||
"points",
|
||||
procDb.findInstance
|
||||
(
|
||||
polyMesh::meshDir(regionName),
|
||||
"points"
|
||||
),
|
||||
pointsInstance,
|
||||
polyMesh::meshDir(regionName),
|
||||
procDb,
|
||||
IOobject::MUST_READ,
|
||||
|
||||
Reference in New Issue
Block a user