foamPostProcess: Load the modular solver library before constructing the mesh
to ensure all the solver specific patch types are available when the mesh is constructed.
This commit is contained in:
@ -259,6 +259,30 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const instantList timeDirs = timeSelector::select0(runTime, args);
|
const instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
|
// Either the solver name is specified...
|
||||||
|
word solverName;
|
||||||
|
|
||||||
|
// ...or the fields are specified on the command-line
|
||||||
|
// or later inferred from the function arguments
|
||||||
|
HashSet<word> requiredFields;
|
||||||
|
|
||||||
|
if (args.optionReadIfPresent("solver", solverName))
|
||||||
|
{
|
||||||
|
libs.open("lib" + solverName + ".so");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Initialise the set of selected fields from the command-line options
|
||||||
|
if (args.optionFound("fields"))
|
||||||
|
{
|
||||||
|
args.optionLookup("fields")() >> requiredFields;
|
||||||
|
}
|
||||||
|
if (args.optionFound("field"))
|
||||||
|
{
|
||||||
|
requiredFields.insert(word(args.optionLookup("field")()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
word regionName = fvMesh::defaultRegion;
|
word regionName = fvMesh::defaultRegion;
|
||||||
|
|
||||||
if (args.optionReadIfPresent("region", regionName))
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
@ -285,30 +309,6 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Either the solver name is specified...
|
|
||||||
word solverName;
|
|
||||||
|
|
||||||
// ...or the fields are specified on the command-line
|
|
||||||
// or later inferred from the function arguments
|
|
||||||
HashSet<word> requiredFields;
|
|
||||||
|
|
||||||
if (args.optionReadIfPresent("solver", solverName))
|
|
||||||
{
|
|
||||||
libs.open("lib" + solverName + ".so");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Initialise the set of selected fields from the command-line options
|
|
||||||
if (args.optionFound("fields"))
|
|
||||||
{
|
|
||||||
args.optionLookup("fields")() >> requiredFields;
|
|
||||||
}
|
|
||||||
if (args.optionFound("field"))
|
|
||||||
{
|
|
||||||
requiredFields.insert(word(args.optionLookup("field")()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Construct functionObjectList
|
// Construct functionObjectList
|
||||||
autoPtr<functionObjectList> functionsPtr
|
autoPtr<functionObjectList> functionsPtr
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user