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 Istream;
52 class gradingDescriptors;
53 Istream& operator>>(Istream& is, gradingDescriptors& gd);
54 
55 /*---------------------------------------------------------------------------*\
56  Class gradingDescriptors Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 :
61  public List<gradingDescriptor>
62 {
63 public:
64 
65  // Constructors
66 
67  //- Default construct with a single default gradingDescriptor
69 
70  //- Construct with specified number of default gradingDescriptor
71  explicit gradingDescriptors(const label len);
72 
73  //- Construct from a single gradingDescriptor
74  explicit gradingDescriptors(const gradingDescriptor& gd);
75 
76 
77  // Member Functions
78 
79  //- Adjust expansion ratios.
80  // Trap negative value and treat as its inverse.
81  void correct();
82 
83  //- Normalize blockFractions and nDivFractions for the list
84  //- of gradingDescriptors, and call correct()
85  void normalise();
86 
87  //- Return the inverse gradingDescriptors with 1/expansionRatio
88  gradingDescriptors inv() const;
89 
90 
91  // IOstream Operators
92 
94 };
95 
96 
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98 
99 } // End namespace Foam
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 #endif
104 
105 // ************************************************************************* //
gradingDescriptor.H
List.H
Foam::gradingDescriptors::operator>>
friend Istream & operator>>(Istream &, gradingDescriptors &)
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:230
Foam::gradingDescriptors
List of gradingDescriptor for the sections of a block with additional IO functionality.
Definition: gradingDescriptors.H:58
Foam::gradingDescriptors::gradingDescriptors
gradingDescriptors()
Default construct with a single default gradingDescriptor.
Definition: gradingDescriptors.C:33
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::gradingDescriptors::inv
gradingDescriptors inv() const
Return the inverse gradingDescriptors with 1/expansionRatio.
Definition: gradingDescriptors.C:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::gradingDescriptor
Handles the specification for grading within a section of a block.
Definition: gradingDescriptor.H:72
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:63
Foam::gradingDescriptors::correct
void correct()
Adjust expansion ratios.
Definition: gradingDescriptors.C:56
Foam::gradingDescriptors::normalise
void normalise()
Definition: gradingDescriptors.C:65