gradingDescriptors.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) 2015 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::gradingDescriptors
29 
30 Description
31  List of gradingDescriptor for the sections of a block with additional IO
32  functionality
33 
34 SourceFiles
35  gradingDescriptors.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef gradingDescriptors_H
40 #define gradingDescriptors_H
41 
42 #include "gradingDescriptor.H"
43 #include "List.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // Forward Declarations
51 class gradingDescriptors;
52 Istream& operator>>(Istream& is, gradingDescriptors& gd);
53 
54 /*---------------------------------------------------------------------------*\
55  Class gradingDescriptors Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public List<gradingDescriptor>
61 {
62 public:
63 
64  // Constructors
65 
66  //- Default construct with a single default gradingDescriptor
68 
69  //- Construct with specified number of default gradingDescriptor
70  explicit gradingDescriptors(const label len);
71 
72  //- Construct from a single gradingDescriptor
73  explicit gradingDescriptors(const gradingDescriptor& gd);
74 
75 
76  // Member Functions
77 
78  //- Adjust expansion ratios.
79  // Trap negative value and treat as its inverse.
80  void correct();
81 
82  //- Normalize blockFractions and nDivFractions for the list
83  //- of gradingDescriptors, and call correct()
84  void normalise();
85 
86  //- Return the inverse gradingDescriptors with 1/expansionRatio
87  gradingDescriptors inv() const;
88 
89 
90  // IOstream Operators
91 
93 };
94 
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 } // End namespace Foam
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #endif
103 
104 // ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:56
gradingDescriptors inv() const
Return the inverse gradingDescriptors with 1/expansionRatio.
void correct()
Adjust expansion ratios.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
gradingDescriptors()
Default construct with a single default gradingDescriptor.
Istream & operator>>(Istream &, directionInfo &)
Handles the specification for grading within a section of a block.
friend Istream & operator>>(Istream &, gradingDescriptors &)
void normalise()
Normalize blockFractions and nDivFractions for the list of gradingDescriptors, and call correct() ...
List of gradingDescriptor for the sections of a block with additional IO functionality.
Namespace for OpenFOAM.