From 559ca6d585383dd73cf7cb38107e2d607818a30c Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 12 Apr 2015 17:50:01 +0100 Subject: [PATCH] DataEntry: Base the name of the coefficients sub-dicts on the entry name rather than the type name This allows for more than one of these data types to be specified in a dictionary Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1652 e.g. csvFile; Coeffs { nHeaderLine 4; refColumn 0; // reference column index componentColumns (1 2 3); // component column indices separator ","; // optional (defaults to ",") mergeSeparators no; // merge multiple separators fileName "fileXYZ"; // name of csv data file outOfBounds clamp; // optional out-of-bounds handling interpolationScheme linear; // optional interpolation scheme } --- .../primitives/functions/DataEntry/CSV/CSV.C | 21 +++++++++++++++---- .../primitives/functions/DataEntry/CSV/CSV.H | 6 +++--- .../functions/DataEntry/CSV/CSVIO.C | 4 ++-- .../functions/DataEntry/DataEntry/DataEntry.C | 3 +-- .../functions/DataEntry/TableFile/TableFile.C | 6 +++--- .../functions/DataEntry/TableFile/TableFile.H | 4 ++-- .../DataEntry/TableFile/TableFileIO.C | 4 ++-- 7 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.C b/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.C index 53428cb1..15aebc08 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.C +++ b/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,20 @@ License namespace Foam { - // doesn't recognize specialization otherwise + template<> + label CSV