PDRmeshArrays.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) 2019 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::PDRmeshArrays
28
29Description
30 OpenFOAM/PDRblock addressing information
31
32 Provides mapping for a rectilinear OpenFOAM mesh in terms of
33 i-j-k indices for faces and cells.
34
35 The mesh points are first binned according to their i-j-k locations.
36 Next the faces are classified according to their lowest x/y/z
37 coordinates and the face orientation as x/y/z.
38 Orientation in the sense +x or -x is not noted.
39 The cell faces are then examined to determine the appropriate i-j-k
40 location.
41
42SourceFiles
43 PDRmeshmeshArraysIO.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef PDRmeshArrays_H
48#define PDRmeshArrays_H
49
50#include "labelVector.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57// Forward Declarations
58class PDRblock;
59class polyMesh;
60class Time;
61
62/*---------------------------------------------------------------------------*\
63 Class PDRmeshArrays Declaration
64\*---------------------------------------------------------------------------*/
66class PDRmeshArrays
67{
68public:
69
70 //- Relative tolerance when matching grid points. Default = 0.02
71 static scalar gridPointRelTol;
72
73 //- The cell i-j-k addressing range
75
76 //- The face i-j-k addressing range
78
79 //- For each cell, the corresponding i-j-k address.
81
82 //- For each face, the corresponding i-j-k address.
84
85 //- For each face, the x/y/z orientation
87
88
89 // Constructors
90
91 //- Default construct
92 PDRmeshArrays() = default;
93
94
95 //- Destructor
96 ~PDRmeshArrays() = default;
97
98
99 // Member Functions
100
101 //- The number of cells
102 label nCells() const
103 {
104 return cellIndex.size();
105 }
106
107 //- The number of faces
108 label nFaces() const
109 {
110 return faceIndex.size();
111 }
112
113
114 //- Determine i-j-k indices for faces/cells
115 void classify(const polyMesh& mesh, const PDRblock& pdrBlock);
116
117 //- Read OpenFOAM mesh and determine i-j-k indices for faces/cells
118 void read(const Time& runTime, const PDRblock& pdrBlock);
119};
120
121
122// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124} // End namespace Foam
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128#endif
129
130// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation....
Definition: PDRblock.H:156
OpenFOAM/PDRblock addressing information.
Definition: PDRmeshArrays.H:66
label nCells() const
The number of cells.
List< labelVector > cellIndex
For each cell, the corresponding i-j-k address.
Definition: PDRmeshArrays.H:79
void read(const Time &runTime, const PDRblock &pdrBlock)
Read OpenFOAM mesh and determine i-j-k indices for faces/cells.
List< direction > faceOrient
For each face, the x/y/z orientation.
Definition: PDRmeshArrays.H:85
~PDRmeshArrays()=default
Destructor.
void classify(const polyMesh &mesh, const PDRblock &pdrBlock)
Determine i-j-k indices for faces/cells.
static scalar gridPointRelTol
Relative tolerance when matching grid points. Default = 0.02.
Definition: PDRmeshArrays.H:70
labelVector cellDims
The cell i-j-k addressing range.
Definition: PDRmeshArrays.H:73
List< labelVector > faceIndex
For each face, the corresponding i-j-k address.
Definition: PDRmeshArrays.H:82
label nFaces() const
The number of faces.
PDRmeshArrays()=default
Default construct.
labelVector faceDims
The face i-j-k addressing range.
Definition: PDRmeshArrays.H:76
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
dynamicFvMesh & mesh
engineTime & runTime
Namespace for OpenFOAM.