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