/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- 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 . Namespace Foam::vtk Description Namespace for handling VTK output. Contains classes and functions for writing VTK file content. Namespace Foam::vtk::legacy Description Namespace for legacy VTK output constants and functions. SourceFiles foamVtkOutput.C foamVtkOutputTemplates.C \*---------------------------------------------------------------------------*/ #ifndef Foam_vtk_output_H #define Foam_vtk_output_H #include "autoPtr.H" #include "bitSet.H" #include "Enum.H" #include "foamVtkCore.H" #include "foamVtkFormatter.H" #include "floatScalar.H" #include "symmTensor.H" #include "IOstream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward Declarations class instant; class globalIndex; namespace vtk { // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // General Functions //- Return a default asciiFormatter autoPtr newFormatter ( std::ostream& os, unsigned prec = IOstream::defaultPrecision() ); //- Return a new formatter based on the specified format type autoPtr newFormatter ( std::ostream& os, const enum formatType fmtType, unsigned prec = IOstream::defaultPrecision() ); //- Write an identity list of labels. // The output does not include the payload size. void writeIdentity(vtk::formatter& fmt, const label len, label start=0); //- Write a list of uint8_t values. // The output does not include the payload size. void writeList(vtk::formatter& fmt, const UList& values); //- Component-wise write of a value (N times) template inline void write(vtk::formatter& fmt, const Type& val, const label n=1); //- Component-wise write of a value (N times) in parallel // The value and count may differ on each processor template inline void writeValueParallel ( vtk::formatter& fmt, const Type& val, const label count=1 ); //- Write a list of values. // The output does not include the payload size. template void writeList(vtk::formatter& fmt, const UList& values); //- Write a list of values. // The output does not include the payload size. template void writeList(vtk::formatter& fmt, const FixedList& values); //- Write a list of values via indirect addressing. // The output does not include the payload size. template void writeList ( vtk::formatter& fmt, const UList& values, const labelUList& addressing ); //- Write a list of values via indirect addressing. // The output does not include the payload size. template void writeList ( vtk::formatter& fmt, const UList& values, const bitSet& selected ); //- Write a list of values and a list of values via indirect addressing. // The output does not include the payload size. template void writeLists ( vtk::formatter& fmt, const UList& values1, const UList& values2, const labelUList& addressing ); //- Write a list of values. // The output does not include the payload size. template void writeListParallel ( vtk::formatter& fmt, const UList& values ); //- Write a list of values, with constant per-processor offset // The output does not include the payload size. void writeListParallel ( vtk::formatter& fmt, const UList