ensightPart.C
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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2016 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "ensightPart.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35  defineTypeNameAndDebug(ensightPart, 0);
36 }
37 
38 
39 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
40 
41 // TODO - move elsewhere
42 #if 0
43 bool Foam::ensightPart::isFieldDefined
44 (
45  const List<scalar>& field
46  // const labelUList& addr = cellIds() or faceIds()
47 ) const
48 {
49  forAll(addr, elemI)
50  {
51  const label id = addr[i];
52 
53  if (id >= field.size() || std::isnan(field[id]))
54  {
55  return false;
56  }
57  }
58  return true;
59 }
60 #endif
61 
62 
63 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
64 
65 Foam::ensightPart::ensightPart(const string& description)
66 :
67  name_(description)
68 {}
69 
70 
71 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
72 
73 Foam::ensightGeoFile& Foam::operator<<
74 (
75  ensightGeoFile& os,
76  const ensightPart& part
77 )
78 {
79  part.write(os);
80  return os;
81 }
82 
83 
84 // ************************************************************************* //
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:290
Foam::ensightGeoFile
Specialized Ensight output with extra geometry file header.
Definition: ensightGeoFile.H:48
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::ensightFile::write
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
Definition: ensightFile.C:157
field
rDeltaTY field()
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ensightPart
Base class for ensightPartCells and ensightPartFaces.
Definition: ensightPart.H:56
ensightPart.H
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)