mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -1210,12 +1210,13 @@ int main(int argc, char *argv[])
|
||||
<< endl;
|
||||
|
||||
label nSide = 0;
|
||||
|
||||
forAll(zoneSidePatch, zoneI)
|
||||
{
|
||||
if (oneD)
|
||||
{
|
||||
// Always add empty patches, one per zone.
|
||||
word patchName = faceZones[zoneI].name() + "_" + "side";
|
||||
// Reuse single empty patch.
|
||||
word patchName = "oneDEmptPatch";
|
||||
|
||||
zoneSidePatch[zoneI] = addPatch<emptyPolyPatch>
|
||||
(
|
||||
|
||||
@ -228,6 +228,8 @@ Foam::Time::Time
|
||||
|
||||
objectRegistry(*this),
|
||||
|
||||
libs_(),
|
||||
|
||||
controlDict_
|
||||
(
|
||||
IOobject
|
||||
@ -257,9 +259,10 @@ Foam::Time::Time
|
||||
graphFormat_("raw"),
|
||||
runTimeModifiable_(true),
|
||||
|
||||
libs_(controlDict_, "libs"),
|
||||
functionObjects_(*this)
|
||||
{
|
||||
libs_.open(controlDict_, "libs");
|
||||
|
||||
// Explicitly set read flags on objectRegistry so anything constructed
|
||||
// from it reads as well (e.g. fvSolution).
|
||||
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
||||
@ -313,6 +316,8 @@ Foam::Time::Time
|
||||
|
||||
objectRegistry(*this),
|
||||
|
||||
libs_(),
|
||||
|
||||
controlDict_
|
||||
(
|
||||
IOobject
|
||||
@ -343,9 +348,11 @@ Foam::Time::Time
|
||||
graphFormat_("raw"),
|
||||
runTimeModifiable_(true),
|
||||
|
||||
libs_(controlDict_, "libs"),
|
||||
functionObjects_(*this)
|
||||
{
|
||||
libs_.open(controlDict_, "libs");
|
||||
|
||||
|
||||
// Explicitly set read flags on objectRegistry so anything constructed
|
||||
// from it reads as well (e.g. fvSolution).
|
||||
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
||||
@ -401,6 +408,8 @@ Foam::Time::Time
|
||||
|
||||
objectRegistry(*this),
|
||||
|
||||
libs_(),
|
||||
|
||||
controlDict_
|
||||
(
|
||||
IOobject
|
||||
@ -430,9 +439,10 @@ Foam::Time::Time
|
||||
graphFormat_("raw"),
|
||||
runTimeModifiable_(true),
|
||||
|
||||
libs_(controlDict_, "libs"),
|
||||
functionObjects_(*this)
|
||||
{}
|
||||
{
|
||||
libs_.open(controlDict_, "libs");
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -75,6 +75,10 @@ class Time
|
||||
//- file-change monitor for all registered files
|
||||
mutable autoPtr<fileMonitor> monitorPtr_;
|
||||
|
||||
//- Any loaded dynamic libraries. Make sure to construct before
|
||||
// reading controlDict.
|
||||
dlLibraryTable libs_;
|
||||
|
||||
//- The controlDict
|
||||
IOdictionary controlDict_;
|
||||
|
||||
@ -166,9 +170,6 @@ private:
|
||||
//- Is runtime modification of dictionaries allowed?
|
||||
Switch runTimeModifiable_;
|
||||
|
||||
//- Any loaded dynamic libraries
|
||||
dlLibraryTable libs_;
|
||||
|
||||
//- Function objects executed at start and on ++, +=
|
||||
mutable functionObjectList functionObjects_;
|
||||
|
||||
|
||||
@ -131,11 +131,7 @@ bool Foam::functionEntries::codeStream::execute
|
||||
|
||||
// see if library is loaded
|
||||
void* lib = NULL;
|
||||
if
|
||||
(
|
||||
isA<IOdictionary>(topDict(parentDict))
|
||||
&& parentDict.dictName() != Time::controlDictName
|
||||
)
|
||||
if (isA<IOdictionary>(topDict(parentDict)))
|
||||
{
|
||||
lib = libs(parentDict).findLibrary(libPath);
|
||||
}
|
||||
@ -150,11 +146,7 @@ bool Foam::functionEntries::codeStream::execute
|
||||
// avoid compilation if possible by loading an existing library
|
||||
if (!lib)
|
||||
{
|
||||
if
|
||||
(
|
||||
isA<IOdictionary>(topDict(parentDict))
|
||||
&& parentDict.dictName() != Time::controlDictName
|
||||
)
|
||||
if (isA<IOdictionary>(topDict(parentDict)))
|
||||
{
|
||||
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||
// of Time.
|
||||
@ -223,11 +215,7 @@ bool Foam::functionEntries::codeStream::execute
|
||||
// all processes must wait for compile to finish
|
||||
reduce(create, orOp<bool>());
|
||||
|
||||
if
|
||||
(
|
||||
isA<IOdictionary>(topDict(parentDict))
|
||||
&& parentDict.dictName() != Time::controlDictName
|
||||
)
|
||||
if (isA<IOdictionary>(topDict(parentDict)))
|
||||
{
|
||||
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||
// of Time.
|
||||
|
||||
@ -25,6 +25,12 @@ License
|
||||
|
||||
#include "dlLibraryTable.H"
|
||||
#include "OSspecific.H"
|
||||
#include "long.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(Foam::dlLibraryTable, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -55,7 +61,11 @@ Foam::dlLibraryTable::~dlLibraryTable()
|
||||
// bug in dlclose - does not call static destructors of
|
||||
// loaded library when actually unloading the library.
|
||||
// See https://bugzilla.novell.com/show_bug.cgi?id=680125 and 657627.
|
||||
// Seems related to using a non-system compiler!
|
||||
if (debug)
|
||||
{
|
||||
Info<< "dlLibraryTable::~dlLibraryTable() : closing " << iter()
|
||||
<< " with handle " << long(iter.key()) << endl;
|
||||
}
|
||||
dlClose(iter.key());
|
||||
}
|
||||
}
|
||||
@ -73,6 +83,12 @@ bool Foam::dlLibraryTable::open
|
||||
{
|
||||
void* functionLibPtr = dlOpen(functionLibName);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "dlLibraryTable::open : opened " << functionLibName
|
||||
<< " resulting in handle " << long(functionLibPtr) << endl;
|
||||
}
|
||||
|
||||
if (!functionLibPtr)
|
||||
{
|
||||
if (verbose)
|
||||
@ -107,6 +123,12 @@ bool Foam::dlLibraryTable::close
|
||||
void* libPtr = findLibrary(functionLibName);
|
||||
if (libPtr)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "dlLibraryTable::close : closing " << functionLibName
|
||||
<< " with handle " << long(libPtr) << endl;
|
||||
}
|
||||
|
||||
erase(libPtr);
|
||||
|
||||
if (!dlClose(libPtr))
|
||||
|
||||
@ -63,6 +63,9 @@ class dlLibraryTable
|
||||
|
||||
public:
|
||||
|
||||
// Declare name of the class and its debug switch
|
||||
ClassName("dlLibraryTable");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
Reference in New Issue
Block a user