dictionary cosmetics

- partial revert for commit d21869b580
  * only add extra newlines for a top-level dictionary that is output as such

- make "#inputMode merge" the default instead of "#inputMode error"
  * this corresponds to a very common usage case
This commit is contained in:
Mark Olesen
2009-03-18 13:15:17 +01:00
parent 36613fa5af
commit 0bada1e31b
10 changed files with 69 additions and 150 deletions

View File

@ -162,10 +162,7 @@ bool Foam::solution::read()
relaxationFactors_ = dict.subDict("relaxationFactors");
}
if (relaxationFactors_.found("default"))
{
relaxationFactors_.lookup("default") >> defaultRelaxationFactor_;
}
relaxationFactors_.readIfPresent("default", defaultRelaxationFactor_);
if (dict.found("solvers"))
{
@ -227,7 +224,7 @@ Foam::scalar Foam::solution::relaxationFactor(const word& name) const
{
FatalIOErrorIn
(
"Foam::solution::relaxationFactor(const word& name)",
"Foam::solution::relaxationFactor(const word&)",
relaxationFactors_
) << "Cannot find relaxationFactor for '" << name
<< "' or a suitable default value."
@ -242,7 +239,7 @@ const Foam::dictionary& Foam::solution::solverDict(const word& name) const
{
if (debug)
{
InfoIn("solution::solverDict(const word& name)")
InfoIn("solution::solverDict(const word&)")
<< "Lookup solver for " << name << endl;
}
@ -254,7 +251,7 @@ const Foam::dictionary& Foam::solution::solver(const word& name) const
{
if (debug)
{
InfoIn("solution::solver(const word& name)")
InfoIn("solution::solver(const word&)")
<< "Lookup solver for " << name << endl;
}