Commit 8ba4e3c3 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: make search of time instances in IOobject optional (issue #245)

- Still needs more attention.

--
STYLE: fix minor typos in documentation
parent 5c15769d
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -417,7 +417,7 @@ Foam::fileName Foam::IOobject::path
}
Foam::fileName Foam::IOobject::localFilePath() const
Foam::fileName Foam::IOobject::localFilePath(const bool search) const
{
if (instance().isAbsolute())
{
......@@ -443,7 +443,7 @@ Foam::fileName Foam::IOobject::localFilePath() const
}
else
{
if (!isDir(path))
if (!isDir(path) && search)
{
word newInstancePath = time().findInstancePath
(
......@@ -471,7 +471,7 @@ Foam::fileName Foam::IOobject::localFilePath() const
}
Foam::fileName Foam::IOobject::globalFilePath() const
Foam::fileName Foam::IOobject::globalFilePath(const bool search) const
{
if (instance().isAbsolute())
{
......@@ -536,8 +536,8 @@ Foam::fileName Foam::IOobject::globalFilePath() const
}
}
// Check for approximately same time
if (!isDir(path))
// Check for approximately same (local) time
if (!isDir(path) && search)
{
word newInstancePath = time().findInstancePath
(
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -400,7 +400,7 @@ public:
fileName path
(
const word& instance,
const fileName& local = ""
const fileName& local = fileName::null
) const;
//- Return complete path + object name
......@@ -409,11 +409,15 @@ public:
return path()/name();
}
//- Helper for filePath that searches locally
fileName localFilePath() const;
//- Helper for filePath that searches locally.
// When search is false, simply use the current instance,
// otherwise search previous instances.
fileName localFilePath(const bool search=true) const;
//- Helper for filePath that searches up if in parallel
fileName globalFilePath() const;
// When search is false, simply use the current instance,
// otherwise search previous instances.
fileName globalFilePath(const bool search=true) const;
// Reading
......
......@@ -27,8 +27,8 @@ Class
Description
IOdictionary is derived from dictionary and IOobject to give the dictionary
automatic IO functionality via the objectRegistry. To facilitate IO,
IOdictioanry is provided with a constructor from IOobject and writeData and
write functions.
IOdictionary is provided with a constructor from IOobject and with
readData/writeData functions.
SourceFiles
IOdictionary.C
......@@ -47,7 +47,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class IOdictionary Declaration
Class IOdictionary Declaration
\*---------------------------------------------------------------------------*/
class IOdictionary
......
......@@ -28,8 +28,8 @@ Description
baseIOdictionary is derived from dictionary and IOobject to give the
dictionary automatic IO functionality via the objectRegistry.
To facilitate IO,
IOdictioanry is provided with a constructor from IOobject and writeData and
write functions.
baseIOdictionary is provided with a constructor from IOobject and with
readData/writeData functions.
SourceFiles
baseIOdictionary.C
......@@ -49,7 +49,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class baseIOdictionary Declaration
Class baseIOdictionary Declaration
\*---------------------------------------------------------------------------*/
class baseIOdictionary
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment