ensightPartCells.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 | Copyright (C) 2011-2017 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::ensightPartCells
26 
27 Description
28  An implementation of ensightPart to hold volume mesh cells.
29 
30 SourceFiles
31  ensightPartCells.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ensightPartCells_H
36 #define ensightPartCells_H
37 
38 #include "ensightPart.H"
39 #include "typeInfo.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class ensightPartCells Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class ensightPartCells
51 :
52  public ensightPart
53 {
54  // Private Member Functions
55 
56  //- Disallow default bitwise assignment
57  void operator=(const ensightPartCells&);
58 
59  //- Classify the cell types, set elemLists.
60  void classify
61  (
62  const polyMesh&,
63  const labelUList& idLabels = labelUList::null()
64  );
65 
66  //- Track points used
67  virtual localPoints calcLocalPoints() const;
68 
69  //- Track the points used
70  // virtual void makeLocalPointMap();
71 
72  //- Element connectivity
73  virtual void writeConnectivity
74  (
76  const word& key,
77  const labelUList& idList,
78  const labelUList& pointMap
79  ) const;
80 
81 
82 protected:
83 
84  //- Addressable ensight element types
85  enum elemType
86  {
92  };
93 
94 
95  // Static data members
96 
97  static const polyMesh* const polyMeshNullPtr_;
98 
99  static const List<word> elemTypes_;
100 
101 
102  // Protected data
103 
104  //- Mesh referenced
105  const polyMesh& mesh_;
106 
107 
108 public:
109 
110  //- Runtime type information
111  TypeName("ensightCells");
112 
113  // Constructors
114 
115  //- Construct empty part with number and description
116  ensightPartCells(label partNumber, const string& partDescription);
117 
118  //- Construct from polyMesh without zones
119  ensightPartCells(label partNumber, const polyMesh&);
120 
121  //- Construct from polyMesh and list of (non-zoned) cells
123  (
124  label partNumber,
125  const polyMesh&,
126  const labelUList&
127  );
128 
129  //- Construct from polyMesh and cellZone
131  (
132  label partNumber,
133  const polyMesh&,
134  const cellZone&
135  );
136 
137  //- Construct as copy
139 
140  //- Reconstruct part characteristics (eg, element types) from Istream
141  // A part reconstructed in this manner can be used when writing fields,
142  // but cannot be used to write a new geometry
143  // \sa Foam::ensightPart::reconstruct
145 
146  //- Reconstruct part characteristics on freestore from Istream
148  {
150  }
151 
152 
153  //- Destructor
154  virtual ~ensightPartCells();
155 
156 
157  // Member Functions
158 
159  //- Write geometry
160  virtual void writeGeometry(ensightGeoFile&) const;
161 
162  //- Static listing of the element types
163  virtual const List<word>& elementTypes() const
164  {
165  return elemTypes_;
166  }
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
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:59
static autoPtr< ensightPartCells > New(Istream &is)
Reconstruct part characteristics on freestore from Istream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Specialized Ensight output with extra geometry file header.
Track the points used by the part and map global to local indices.
Definition: ensightPart.H:105
An implementation of ensightPart to hold volume mesh cells.
TypeName("ensightCells")
Runtime type information.
virtual const List< word > & elementTypes() const
Static listing of the element types.
A class for handling words, derived from string.
Definition: word.H:59
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:61
elemType
Addressable ensight element types.
Base class for ensightPartCells and ensightPartFaces.
Definition: ensightPart.H:65
static const UList< T > & null()
Return a null UList.
Definition: UListI.H:51
A subset of mesh cells.
Definition: cellZone.H:61
static const polyMesh *const polyMeshNullPtr_
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual void writeGeometry(ensightGeoFile &) const
Write geometry.
static const List< word > elemTypes_
ensightPartCells(label partNumber, const string &partDescription)
Construct empty part with number and description.
virtual ~ensightPartCells()
Destructor.
const polyMesh & mesh_
Mesh referenced.
Namespace for OpenFOAM.