From c0b11a52987ea9134b82714a08dcad52ba9a0428 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 18 Jan 2019 09:03:07 +0100 Subject: [PATCH] ENH: additional constructor for vtk::outputOptions --- src/fileFormats/vtk/output/foamVtkOutputOptions.C | 1 - src/fileFormats/vtk/output/foamVtkOutputOptions.H | 12 ++++++++---- src/fileFormats/vtk/output/foamVtkOutputOptionsI.H | 13 ++++++++++++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/fileFormats/vtk/output/foamVtkOutputOptions.C b/src/fileFormats/vtk/output/foamVtkOutputOptions.C index 8a8c30a060..12211f7981 100644 --- a/src/fileFormats/vtk/output/foamVtkOutputOptions.C +++ b/src/fileFormats/vtk/output/foamVtkOutputOptions.C @@ -25,7 +25,6 @@ License #include "foamVtkOutputOptions.H" - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // Foam::vtk::outputOptions& diff --git a/src/fileFormats/vtk/output/foamVtkOutputOptions.H b/src/fileFormats/vtk/output/foamVtkOutputOptions.H index 976c5413b7..b3156760e1 100644 --- a/src/fileFormats/vtk/output/foamVtkOutputOptions.H +++ b/src/fileFormats/vtk/output/foamVtkOutputOptions.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,6 +34,7 @@ Description SourceFiles foamVtkOutputOptions.C + foamVtkOutputOptionsI.H \*---------------------------------------------------------------------------*/ @@ -51,7 +52,7 @@ namespace vtk { /*---------------------------------------------------------------------------*\ - Class outputOptions Declaration + Class vtk::outputOptions Declaration \*---------------------------------------------------------------------------*/ class outputOptions @@ -79,10 +80,13 @@ public: //- Construct null - XML insitu ASCII format with default precision inline outputOptions(); - //- Construct with specified format. - // This constructor should remain non-explicit. + //- Construct with specified format and default (ASCII) precision + // \note This constructor should remain non-explicit. inline outputOptions(enum formatType fmtType); + //- Construct with specified format and (ASCII) write precision + inline outputOptions(enum formatType fmtType, unsigned prec); + // Selectors diff --git a/src/fileFormats/vtk/output/foamVtkOutputOptionsI.H b/src/fileFormats/vtk/output/foamVtkOutputOptionsI.H index 36a0a3c7b2..616a6c28a8 100644 --- a/src/fileFormats/vtk/output/foamVtkOutputOptionsI.H +++ b/src/fileFormats/vtk/output/foamVtkOutputOptionsI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,6 +44,17 @@ inline Foam::vtk::outputOptions::outputOptions {} +inline Foam::vtk::outputOptions::outputOptions +( + enum formatType fmtType, + unsigned prec +) +: + fmtType_(fmtType), + precision_(prec) +{} + + // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // inline Foam::autoPtr