From 42e97e38e73ab8e8fc9064a2c964d904e39b277b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 8 Jun 2010 09:38:04 +0200 Subject: [PATCH 01/20] STYLE: fix (verbatim) documentation formatting ENH: log10/bound optional in uniformInterpolationTable (consistent w/ example) --- .../uniformInterpolationTable.C | 28 ++++++----- .../uniformInterpolationTable.H | 46 ++++++++----------- 2 files changed, 35 insertions(+), 39 deletions(-) diff --git a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C index 05c96b608f..dd05ffc675 100644 --- a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C +++ b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,8 +65,8 @@ Foam::uniformInterpolationTable::uniformInterpolationTable dict.lookup("data") >> *this; dict.lookup("x0") >> x0_; dict.lookup("dx") >> dx_; - dict.lookup("log10") >> log10_; - dict.lookup("bound") >> bound_; + dict.readIfPresent("log10", log10_); + dict.readIfPresent("bound", bound_); } checkTable(); @@ -94,13 +94,13 @@ Foam::uniformInterpolationTable::uniformInterpolationTable List(2, 0.0), x0_(readScalar(dict.lookup("x0"))), dx_(readScalar(dict.lookup("dx"))), - log10_(dict.lookup("log10")), - bound_(dict.lookup("bound")) + log10_(dict.lookupOrDefault("log10", false)), + bound_(dict.lookupOrDefault("bound", false)) { if (initialiseOnly) { - scalar xMax = readScalar(dict.lookup("xMax")); - label nIntervals = static_cast