ensightOutputCloud.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-2019 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 InNamespace
27  Foam::ensightOutput
28 
29 Description
30  A collection of functions for writing clouds as ensight file content.
31 
32 SourceFiles
33  ensightOutputCloud.C
34  ensightOutputCloudTemplates.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef ensightOutputCloud_H
39 #define ensightOutputCloud_H
40 
41 #include "ensightFile.H"
42 #include "autoPtr.H"
43 #include "IOField.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // Forward declarations
51 class fvMesh;
52 
53 namespace ensightOutput
54 {
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 
59 //- Write cloud positions
61 (
62  const fvMesh& mesh,
63  const word& cloudName,
64  bool exists,
65  autoPtr<ensightFile>& output,
67 );
68 
69 
70 //- Write cloud field, returning true if the field is non-empty.
71 template<class Type>
72 bool writeCloudField
73 (
74  const IOField<Type>& field,
75  ensightFile& os,
77 );
78 
79 
80 //- Read cloud field from IOobject (if exists == true) and write,
81 //- always returning true.
82 template<class Type>
83 bool writeCloudField
84 (
85  const IOobject& io,
86  bool exists,
87  autoPtr<ensightFile>& output,
89 );
90 
91 
92 } // End namespace ensightOutput
93 } // End namespace Foam
94 
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 #ifdef NoRepository
100 #endif
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 #endif
105 
106 // ************************************************************************* //
Foam::UPstream::commsTypes::blocking
Foam::exists
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
Definition: MSwindows.C:625
cloudName
const word cloudName(propsDict.get< word >("cloud"))
Foam::ensightOutput::writeCloudPositions
bool writeCloudPositions(const fvMesh &mesh, const word &cloudName, bool exists, autoPtr< ensightFile > &output, Pstream::commsTypes comm=Pstream::commsTypes::blocking)
Write cloud positions.
Definition: ensightOutputCloud.C:79
ensightFile.H
field
rDeltaTY field()
ensightOutputCloudTemplates.C
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:66
IOField.H
Foam::ensightOutput::writeCloudField
bool writeCloudField(const IOField< Type > &field, ensightFile &os, Pstream::commsTypes comm=Pstream::commsTypes::blocking)
Write cloud field, returning true if the field is non-empty.
Definition: ensightOutputCloudTemplates.C:35
autoPtr.H