/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class Foam::foamToVtkReportFields Description Collection of simple static methods for reporting field names by category, which is used by foamToVTK. \*---------------------------------------------------------------------------*/ #ifndef foamToVtkReportFields_H #define foamToVtkReportFields_H #include "UPtrList.H" #include "Ostream.H" #include "areaFields.H" #include "volFields.H" #include "pointFields.H" #include "IOobjectList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ Class foamToVtkReportFields Declaration \*---------------------------------------------------------------------------*/ struct foamToVtkReportFields { template static void print ( const char* msg, Ostream& os, const UPtrList& flds ) { if (flds.size()) { os << msg; for (const GeoField& fld : flds) { os << ' ' << fld.name(); } os << endl; } } static void print ( const char* msg, Ostream& os, const wordList& fieldNames ) { if (fieldNames.size()) { os << msg; for (const word& fieldName : fieldNames) { os << ' ' << fieldName; } os << endl; } } template static void print ( const char* msg, Ostream& os, const IOobjectList& objects ) { print(msg, os, objects.sortedNames()); } //- Supported volume field types static void volume(Ostream& os, const IOobjectList& objects) { print ( " volScalar :", os, objects ); print ( " volVector :", os, objects ); print ( " volSphTensor :", os, objects ); print ( " volSymTensor :", os, objects ); print ( " volTensor :", os, objects ); } //- Supported dimensioned field types static void internal(Ostream& os, const IOobjectList& objects) { print ( " volScalar:Internal :", os, objects ); print ( " volVector:Internal :", os, objects ); print ( " volSphTensor:Internal :", os, objects ); print ( " volSymTensor:Internal :", os, objects ); print ( " volTensor:Internal :", os, objects ); } //- Supported point field types static void point(Ostream& os, const IOobjectList& objects) { } //- Supported area field types static void area(Ostream& os, const IOobjectList& objects) { print ( " areaScalar :", os, objects ); print ( " areaVector :", os, objects ); print ( " areaSphTensor :", os, objects ); print ( " areaSymTensor :", os, objects ); print ( " areaTensor :", os, objects ); } }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //