diff --git a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.C index 111cca4e5..767538191 100644 --- a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -431,15 +431,12 @@ Foam::autoPtr Foam::decompositionMethod::New const dictionary& decompositionDict ) { - loadExternalLibraries(); + word methodName(decompositionDict.lookup("method")); - word decompositionMethodTypeName(decompositionDict.lookup("method")); - - Info<< "Selecting decompositionMethod " - << decompositionMethodTypeName << endl; + Info<< "Selecting decompositionMethod " << methodName << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(decompositionMethodTypeName); + dictionaryConstructorTablePtr_->find(methodName); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -448,7 +445,7 @@ Foam::autoPtr Foam::decompositionMethod::New "decompositionMethod::New" "(const dictionary& decompositionDict)" ) << "Unknown decompositionMethod " - << decompositionMethodTypeName << endl << endl + << methodName << endl << endl << "Valid decompositionMethods are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -464,15 +461,13 @@ Foam::autoPtr Foam::decompositionMethod::New const polyMesh& mesh ) { - loadExternalLibraries(); - - word decompositionMethodTypeName(decompositionDict.lookup("method")); + word methodName(decompositionDict.lookup("method")); Info<< "Selecting decompositionMethod " - << decompositionMethodTypeName << endl; + << methodName << endl; dictionaryMeshConstructorTable::iterator cstrIter = - dictionaryMeshConstructorTablePtr_->find(decompositionMethodTypeName); + dictionaryMeshConstructorTablePtr_->find(methodName); if (cstrIter == dictionaryMeshConstructorTablePtr_->end()) { @@ -482,7 +477,7 @@ Foam::autoPtr Foam::decompositionMethod::New "(const dictionary& decompositionDict, " "const polyMesh& mesh)" ) << "Unknown decompositionMethod " - << decompositionMethodTypeName << endl << endl + << methodName << endl << endl << "Valid decompositionMethods are : " << endl << dictionaryMeshConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -491,30 +486,6 @@ Foam::autoPtr Foam::decompositionMethod::New return autoPtr(cstrIter()(decompositionDict, mesh)); } -void Foam::decompositionMethod::loadExternalLibraries() -{ - wordList libNames(3); - - libNames[0] = word("scotchDecomp"); - libNames[1] = word("metisDecomp"); - libNames[2] = word("parMetisDecomp"); - - forAll (libNames,i) - { - const word libName("lib"+libNames[i]+".so"); - - bool ok = dlLibraryTable::open(libName); - - if (!ok) - { - WarningIn("decompositionMethod::loadExternalLibraries()") - << "Loading of decomposition library " << libName - << " unsuccesful. Some decomposition methods may not be " - << "available" - << endl; - } - } -} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H b/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H index 9bf99744a..ef329ebe3 100644 --- a/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H +++ b/src/decompositionMethods/decompositionMethods/decompositionMethod/decompositionMethod.H @@ -113,10 +113,6 @@ private: //- Disallow default bitwise assignment void operator=(const decompositionMethod&); - //- Load missing libraries to avoid compile-time linking - // to external dependencies - static void loadExternalLibraries(); - public: