foamRun, foamMultiRun: Pre-load the solver libraries before the mesh/meshes are constructed

to ensure that any solver-specific patch types are available before mesh construction.
This commit is contained in:
Henry Weller
2023-03-07 13:18:33 +00:00
parent cbd9903de4
commit 67e692b5a8
5 changed files with 26 additions and 5 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,7 +37,13 @@ Foam::regionSolvers::regionSolvers(const Time& runTime)
forAllConstIter(dictionary, regionSolversDict, iter)
{
append(Pair<word>(iter().keyword(), iter().stream()));
const word regionName(iter().keyword());
const word solverName(iter().stream());
// Load the solver library
solver::load(solverName);
append(Pair<word>(regionName, solverName));
}
}
else
@ -45,6 +51,7 @@ Foam::regionSolvers::regionSolvers(const Time& runTime)
// Partial backward-compatibility
// Converts the regions entry in the regionProperties dictionary into
// the regionSolvers list
// Only supports fluid and solid regions
typeIOobject<IOdictionary> regionPropertiesHeader
(

View File

@ -98,6 +98,11 @@ int main(int argc, char *argv[])
<< "solver not specified in the controlDict or on the command-line"
<< exit(FatalError);
}
else
{
// Load the solver library
solver::load(solverName);
}
// Create the default single region mesh
#include "createMesh.H"