/*---------------------------------------------------------------------------*\ ========= | \\ / 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 . InNamespace Foam Description Read fields from disk for foamToEnsight SourceFiles readFields.C \*---------------------------------------------------------------------------*/ #ifndef readFields_H #define readFields_H #include "instantList.H" #include "IOobjectList.H" #include "fvMeshSubsetProxy.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { //- Get the field and subset it, or return nullptr template tmp getField(const IOobject* io, const fvMeshSubsetProxy& proxy) { if (io) { auto tfield = tmp::New(*io, proxy.baseMesh()); return proxy.interpolate(tfield); } return nullptr; } //- Get internal field and make it a zero-gradient volume field with subsetting template tmp getZeroGradField(const IOobject* io, const fvMeshSubsetProxy& proxy) { if (io) { auto tfield = tmp::New(*io, proxy.baseMesh()); return proxy.interpolateInternal(tfield); } return nullptr; } //- Check if fields are good to use (available at all times) // ignore special fields (_0 fields), // ignore fields that are not available for all time-steps label checkData ( const fvMesh& mesh, const instantList& timeDirs, wordList& objectNames ); } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //