STYLE: mark compatibility change in motionSolver keyword

- was "solver" in 1612 and "motionSolver" for later versions
This commit is contained in:
Mark Olesen
2018-10-16 10:21:33 +02:00
parent 873b2f0a9f
commit 8a923518a5

View File

@ -107,12 +107,10 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
{ {
const word solverName const word solverName
( (
solverDict.found("motionSolver") solverDict.getCompat<word>("motionSolver", {{"solver", 1612}})
? solverDict.lookup("motionSolver")
: solverDict.lookup("solver")
); );
Info<< "Selecting motion solver: " << solverName << endl; Info<< "Selecting motion solver: " << solverName << nl;
const_cast<Time&>(mesh.time()).libs().open const_cast<Time&>(mesh.time()).libs().open
( (
@ -135,7 +133,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
FatalErrorInFunction FatalErrorInFunction
<< "Unknown solver type " << "Unknown solver type "
<< solverName << nl << nl << solverName << nl << nl
<< "Valid solver types :" << endl << "Valid solver types :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
} }
@ -237,10 +235,8 @@ bool Foam::motionSolver::read()
return true; return true;
} }
else
{
return false; return false;
}
} }