foamVtuCellsI.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-2025 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 \*---------------------------------------------------------------------------*/
27 
28 #include "foamVtuCells.H"
29 
30 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
31 
34 {
35  return output_;
36 }
37 
38 
39 inline bool Foam::vtk::vtuCells::is_hdf() const noexcept
40 {
41  return (output_ == contentType::HDF);
42 }
43 
44 
46 {
47  return decomposeRequest_;
48 }
49 
50 
51 inline bool Foam::vtk::vtuCells::empty() const noexcept
52 {
53  return cellTypes_.empty();
54 }
55 
56 
57 inline Foam::label Foam::vtk::vtuCells::size() const noexcept
58 {
59  return cellTypes_.size();
60 }
61 
62 
63 inline const Foam::List<uint8_t>&
65 {
66  return cellTypes_;
67 }
68 
69 
70 inline const Foam::labelList&
72 {
73  return vertLabels_;
74 }
75 
76 
77 inline const Foam::labelList&
79 {
80  return vertOffset_;
81 }
82 
83 
84 inline const Foam::labelList&
86 {
87  return faceLabels_;
88 }
89 
90 
91 inline const Foam::labelList&
93 {
94  return faceOffset_;
95 }
96 
97 
98 inline const Foam::labelList&
100 {
101  return polyFaceOffset_;
102 }
103 
104 
105 inline const Foam::labelList&
107 {
108  return maps_.additionalIds();
109 }
110 
111 
112 inline bool Foam::vtk::vtuCells::useCellMap() const noexcept
113 {
114  return
115  (
116  (nAddCells() > 0)
117  || (selectionMode() == selectionModeType::SUBSET_MESH)
118  );
119 }
120 
121 
122 inline const Foam::labelList&
124 {
125  return maps_.cellMap();
126 }
127 
128 
130 {
131  return (!maps_.pointMap().empty());
132 }
133 
134 
135 inline const Foam::labelUList&
137 {
138  return maps_.pointMap();
139 }
140 
141 
142 // ************************************************************************* //
const labelList & cellMap() const noexcept
The mesh cell ids for all cells (regular and decomposed).
const labelList & vertOffsets() const noexcept
The "offsets" into the connectivity list vertLabels()
Definition: foamVtuCellsI.H:71
const labelList & polyFaceOffsets() const noexcept
Offsets into the polyhedral face ids (HDF only)
Definition: foamVtuCellsI.H:92
const labelList & faceLabels() const noexcept
The polyhedral "faces" or "FaceConnectivity".
Definition: foamVtuCellsI.H:78
bool usePointMap() const noexcept
The pointMap is available and non-identity [FUTURE USE].
bool decomposeRequested() const noexcept
Query the polyhedral decompose requested flag.
Definition: foamVtuCellsI.H:38
enum contentType content() const noexcept
The output content type.
Definition: foamVtuCellsI.H:26
contentType
Types of content that the storage may represent.
const labelList & addPointCellLabels() const noexcept
Additional point addressing (from added point to original cell)
Definition: foamVtuCellsI.H:99
const direction noexcept
Definition: scalarImpl.H:265
bool is_hdf() const noexcept
Test for hdf content type.
Definition: foamVtuCellsI.H:32
bool empty() const noexcept
True if no cellTypes are populated.
Definition: foamVtuCellsI.H:44
const labelList & vertLabels() const noexcept
The cell "connectivity" (legacy: "CELLS")
Definition: foamVtuCellsI.H:64
label size() const noexcept
The size of populated cellTypes (the number of cells)
Definition: foamVtuCellsI.H:50
const labelUList & pointMap() const noexcept
The mesh point ids [FUTURE USE].
const labelList & faceOffsets() const noexcept
The "facesoffset" or the "FaceOffsets".
Definition: foamVtuCellsI.H:85
bool useCellMap() const noexcept
The cellMap is non-identity for a SUBSET_MESH or when there are decomposed cells. ...
const List< uint8_t > & cellTypes() const noexcept
The cell "types" (legacy: "CELL_TYPES")
Definition: foamVtuCellsI.H:57