sampledSetI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2025 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 \*---------------------------------------------------------------------------*/
25 
26 #include "sampledSet.H"
27 
28 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29 
30 inline const Foam::word& Foam::sampledSet::name() const
31 {
32  return name_;
33 }
34 
35 
37 {
38  return mesh_;
39 }
40 
41 
43 {
44  if (!coordsPtr_.valid())
45  {
46  setSamples();
47  }
48  return coordsPtr_();
49 }
50 
51 
53 {
54  return coords().size();
55 }
56 
57 
59 {
60  return coords().segments();
61 }
62 
63 
65 {
66  return coords().positions();
67 }
68 
69 
71 {
72  if (!cellsPtr_.valid())
73  {
74  setSamples();
75  }
76  return cellsPtr_;
77 }
78 
79 
81 {
82  if (!facesPtr_.valid())
83  {
84  setSamples();
85  }
86  return facesPtr_();
87 }
88 
89 
90 // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
91 
92 inline Foam::sampledSet::operator const coordSet&() const
93 {
94  return coords();
95 }
96 
97 
98 // ************************************************************************* //
Holds list of sampling positions.
Definition: coordSet.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
const labelList & cells() const
Access the cells.
Definition: sampledSetI.H:70
const polyMesh & mesh() const
Access the mesh.
Definition: sampledSetI.H:36
label size() const
Return the size.
Definition: sampledSetI.H:52
const coordSet & coords() const
Access the coordinate set.
Definition: sampledSetI.H:42
const labelList & segments() const
Return the size.
Definition: sampledSetI.H:58
const labelList & faces() const
Access the faces.
Definition: sampledSetI.H:80
const word & name() const
Access the name.
Definition: sampledSetI.H:30
const pointField & positions() const
Access the positions.
Definition: sampledSetI.H:64
A class for handling words, derived from string.
Definition: word.H:62
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