Make sure that Mesquite-Library is only linked at Run-time

--HG--
branch : bgschaid/foam3FixesBranch
This commit is contained in:
Bernhard F.W. Gschaider 2013-12-30 22:32:32 +01:00
parent 3e6bfe9aea
commit 55a09fdd2a
2 changed files with 17 additions and 2 deletions

View file

@ -21,5 +21,4 @@ LIB_LIBS = \
-ltetFiniteElement \ -ltetFiniteElement \
-ltetMotionSolver \ -ltetMotionSolver \
-lfvMotionSolver \ -lfvMotionSolver \
-lRBFMotionSolver \ -lRBFMotionSolver
-lmesquiteMotionSolver

View file

@ -31,6 +31,22 @@ License
Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
{ {
wordList libNames(1);
libNames[0]=word("mesquiteMotionSolver");
forAll(libNames,i) {
const word libName("lib"+libNames[i]+".so");
bool ok=dlLibraryTable::open(libName);
if(!ok) {
WarningIn("dynamicFvMesh::New(const IOobject& io)")
<< "Loading of dynamic mesh library " << libName
<< " unsuccesful. Some dynamic mesh methods may not be "
<< " available"
<< endl;
}
}
// Enclose the creation of the dynamicMesh to ensure it is // Enclose the creation of the dynamicMesh to ensure it is
// deleted before the dynamicFvMesh is created otherwise the dictionary // deleted before the dynamicFvMesh is created otherwise the dictionary
// is entered in the database twice // is entered in the database twice