Files
openfoam/applications/utilities/postProcessing/sampling/sampleSurface/surfaceWriters/vtk/vtk.H
2008-04-15 18:56:58 +01:00

154 lines
3.8 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::vtk
Description
SourceFiles
vtk.C
\*---------------------------------------------------------------------------*/
#ifndef vtk_H
#define vtk_H
#include "surfaceWriter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class vtk Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class vtk
:
public surfaceWriter<Type>
{
// Private Member Functions
void writeGeometry
(
const pointField& points,
const faceList& faces,
Ostream& os
) const;
void writeData
(
const fileName& fieldName,
const pointField& points,
const scalarField& values,
Ostream& os
) const;
void writeData
(
const fileName& fieldName,
const pointField& points,
const vectorField& values,
Ostream& os
) const;
void writeData
(
const fileName& fieldName,
const pointField& points,
const sphericalTensorField& values,
Ostream& os
) const;
void writeData
(
const fileName& fieldName,
const pointField& points,
const symmTensorField& values,
Ostream& os
) const;
void writeData
(
const fileName& fieldName,
const pointField& points,
const tensorField& values,
Ostream& os
) const;
public:
//- Runtime type information
TypeName("vtk");
// Constructors
//- Construct null
vtk();
// Destructor
virtual ~vtk();
// Member Functions
// Write
//- Writes single surface to file.
virtual void write
(
const fileName& samplePath,
const fileName& timeDir,
const fileName& surfaceName,
const pointField& points,
const faceList& faces,
const fileName& fieldName,
const Field<Type>& values
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "vtk.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //