mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: include file tracking: missed out adding files to list of files to check
This commit is contained in:
@ -70,11 +70,52 @@ Foam::dlLibraryTable& Foam::functionEntries::codeStream::libs
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
const IOdictionary& d = static_cast<const IOdictionary&>(dict.topDict());
|
||||
const baseIOdictionary& d = static_cast<const baseIOdictionary&>
|
||||
(
|
||||
dict.topDict()
|
||||
);
|
||||
return const_cast<Time&>(d.time()).libs();
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionEntries::codeStream::doingMasterOnlyReading
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
const dictionary& topDict = dict.topDict();
|
||||
|
||||
if (isA<baseIOdictionary>(topDict))
|
||||
{
|
||||
const baseIOdictionary& d = static_cast<const baseIOdictionary&>
|
||||
(
|
||||
topDict
|
||||
);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "codeStream : baseIOdictionary:" << dict.name()
|
||||
<< " master-only-reading:" << d.globalObject()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
return d.globalObject();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "codeStream : not a baseIOdictionary:" << dict.name()
|
||||
<< " master-only-reading:" << regIOobject::masterOnlyReading
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// Fall back to regIOobject::masterOnlyReading
|
||||
return regIOobject::masterOnlyReading;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::functionEntries::codeStream::streamingFunctionType
|
||||
Foam::functionEntries::codeStream::getFunction
|
||||
(
|
||||
@ -96,7 +137,10 @@ Foam::functionEntries::codeStream::getFunction
|
||||
|
||||
// see if library is loaded
|
||||
void* lib = NULL;
|
||||
if (isA<IOdictionary>(parentDict.topDict()))
|
||||
|
||||
const dictionary& topDict = parentDict.topDict();
|
||||
|
||||
if (isA<baseIOdictionary>(topDict))
|
||||
{
|
||||
lib = libs(parentDict).findLibrary(libPath);
|
||||
}
|
||||
@ -111,7 +155,7 @@ Foam::functionEntries::codeStream::getFunction
|
||||
// avoid compilation if possible by loading an existing library
|
||||
if (!lib)
|
||||
{
|
||||
if (isA<IOdictionary>(parentDict.topDict()))
|
||||
if (isA<baseIOdictionary>(topDict))
|
||||
{
|
||||
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||
// of Time.
|
||||
@ -178,10 +222,10 @@ Foam::functionEntries::codeStream::getFunction
|
||||
}
|
||||
|
||||
//- Only block if we're not doing master-only reading. (flag set by
|
||||
// regIOobject::read, IOdictionary constructor)
|
||||
// regIOobject::read, baseIOdictionary constructor)
|
||||
if
|
||||
(
|
||||
!regIOobject::masterOnlyReading
|
||||
!doingMasterOnlyReading(topDict)
|
||||
&& regIOobject::fileModificationSkew > 0
|
||||
)
|
||||
{
|
||||
@ -246,7 +290,7 @@ Foam::functionEntries::codeStream::getFunction
|
||||
}
|
||||
}
|
||||
|
||||
if (isA<IOdictionary>(parentDict.topDict()))
|
||||
if (isA<baseIOdictionary>(topDict))
|
||||
{
|
||||
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||
// of Time.
|
||||
@ -282,7 +326,7 @@ Foam::functionEntries::codeStream::getFunction
|
||||
}
|
||||
|
||||
bool haveLib = lib;
|
||||
if (!regIOobject::masterOnlyReading)
|
||||
if (!doingMasterOnlyReading(topDict))
|
||||
{
|
||||
reduce(haveLib, andOp<bool>());
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -123,6 +123,10 @@ class codeStream
|
||||
//- Helper function: parent (of parent etc.) of dictionary up to the top
|
||||
static const dictionary& topDict(const dictionary&);
|
||||
|
||||
//- Helper function: access IOobject for master-only-reading
|
||||
// functionality
|
||||
static bool doingMasterOnlyReading(const dictionary& dict);
|
||||
|
||||
//- Helper function: access to dlLibraryTable of Time
|
||||
static dlLibraryTable& libs(const dictionary& dict);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user