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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::gradingDescriptors
29
30Description
31 List of gradingDescriptor for the sections of a block with additional IO
32 functionality
33
34SourceFiles
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
47namespace Foam
48{
49
50// Forward Declarations
51class Istream;
52class gradingDescriptors;
53Istream& operator>>(Istream& is, gradingDescriptors& gd);
54
55/*---------------------------------------------------------------------------*\
56 Class gradingDescriptors Declaration
57\*---------------------------------------------------------------------------*/
60:
61 public List<gradingDescriptor>
62{
63public:
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
94};
95
96
97// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99} // End namespace Foam
100
101// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102
103#endif
104
105// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
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
Handles the specification for grading within a section of a block.
List of gradingDescriptor for the sections of a block with additional IO functionality.
void correct()
Adjust expansion ratios.
friend Istream & operator>>(Istream &, gradingDescriptors &)
gradingDescriptors()
Default construct with a single default gradingDescriptor.
gradingDescriptors inv() const
Return the inverse gradingDescriptors with 1/expansionRatio.
Namespace for OpenFOAM.
Istream & operator>>(Istream &, directionInfo &)