Kmesh.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-2020 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::Kmesh
26 
27 Description
28  Calculate the wavenumber vector field corresponding to the
29  space vector field of a finite volume mesh;
30 
31 SourceFiles
32  Kmesh.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef Kmesh_H
37 #define Kmesh_H
38 
39 #include "fvMesh.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class Kmesh Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class Kmesh
51 :
52  public vectorField
53 {
54  // Private Data
55 
56  //- Dimensions of box
57  vector l_;
58 
59  //- Multi-dimensional addressing array
60  labelList nn_;
61 
62  //- Maximum wavenumber
63  scalar kmax_;
64 
65 
66  // Private functions
67 
68  //- Return the linear index from the i-j-k indices
69  static inline label index
70  (
71  const label i,
72  const label j,
73  const label k,
74  const labelList& nn
75  );
76 
77 
78 public:
79 
80  // Constructors
81 
82  //- Construct from fvMesh
83  Kmesh(const fvMesh&);
84 
85 
86  // Member Functions
87 
88  // Access
89 
90  const vector& sizeOfBox() const
91  {
92  return l_;
93  }
94 
95  const labelList& nn() const
96  {
97  return nn_;
98  }
99 
100  scalar max() const
101  {
102  return kmax_;
103  }
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
label k
Boltzmann constant.
Kmesh(const fvMesh &)
Construct from fvMesh.
Definition: Kmesh.C:47
Calculate the wavenumber vector field corresponding to the space vector field of a finite volume mesh...
Definition: Kmesh.H:49
const vector & sizeOfBox() const
Definition: Kmesh.H:89
scalar max() const
Definition: Kmesh.H:99
const labelList & nn() const
Definition: Kmesh.H:94
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
Namespace for OpenFOAM.