Loading...
Searching...
No Matches
ensightOutputVolField.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2022 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26InNamespace
27 Foam::ensightOutput
28
29Description
30 A collection of functions for writing volField content in ensight format.
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef Foam_ensightOutput_volField_H
35#define Foam_ensightOutput_volField_H
36
37#include "ensightOutput.H"
38#include "ensightFaces.H"
39#include "ensightCells.H"
40#include "volFields.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46
47// Forward Declarations
48class ensightMesh;
49
50namespace ensightOutput
51{
52
53/*---------------------------------------------------------------------------*\
54 Namespace ensightOutput
55\*---------------------------------------------------------------------------*/
56
57//- Write volume field component-wise
58template<class Type>
60(
63
66
69
71 const ensightMesh& ensMesh
72);
73
74//- Write volume field component-wise
75template<class Type>
77(
80
83
85 const ensightMesh& ensMesh
86)
87{
89 return ensightOutput::writeVolField<Type>(scratch, os, vf, ensMesh);
90}
91
92//- Write volume field component-wise, optionally forcing interpolation
93template<class Type>
95(
98
101
104
106 const ensightMesh& ensMesh,
107
109 const bool nodeValues
110);
111
112//- Write volume field component-wise, optionally forcing interpolation
113template<class Type>
114bool writeVolField
115(
116 //! Output file (must be valid on master)
118
121
123 const ensightMesh& ensMesh,
124
126 const bool nodeValues
127)
128{
131 (
132 scratch, os, vf, ensMesh, nodeValues
133 );
134}
135
136//- Write point field component-wise
137template<class Type>
139(
145
148
150 const ensightMesh& ensMesh
151);
152
153//- Write point field component-wise
154template<class Type>
156(
159
162
164 const ensightMesh& ensMesh
165)
166{
168 return ensightOutput::writePointField<Type>(scratch, os, pf, ensMesh);
169}
170
171
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174} // End namespace ensightOutput
175} // End namespace Foam
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179#ifdef NoRepository
180 #include "ensightOutputVolField.txx"
181#endif
182
183#endif
184
185// ************************************************************************* //
Generic GeometricField class.
A variant of OFstream with specialised handling for Ensight writing of strings, integers and floats (...
Definition ensightFile.H:50
Encapsulation of volume meshes for writing in ensight format. It manages cellZones,...
Definition ensightMesh.H:79
OBJstream os(runTime.globalPath()/outputName)
A collection of functions for writing ensight file content.
DynamicList< float > floatBufferType
The list type used for component-wise buffering.
bool writePointField(ensightOutput::floatBufferType &scratch, ensightFile &os, const GeometricField< Type, pointPatchField, pointMesh > &pf, const ensightMesh &ensMesh)
Write point field component-wise.
bool writeVolField(ensightOutput::floatBufferType &scratch, ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh)
Write volume field component-wise.
Namespace for OpenFOAM.