Radial2.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) 2024 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::Function2s::Radial
26 
27 Description
28  Function2 which returns a Function1 of the magnitude of the two-dimensional
29  vector with components equal to the input arguments.
30 
31  Example
32  \verbatim
33  <name>
34  {
35  type radial;
36  value table
37  (
38  (0.00 (0 0 0))
39  (0.35 (0 0 1))
40  (0.71 (0 0 0))
41  );
42  }
43  \endverbatim
44 
45 SourceFiles
46  Radial.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef Radial2_H
51 #define Radial2_H
52 
53 #include "Function1.H"
54 #include "Function2.H"
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 namespace Function2s
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class Radial Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 template<class Type>
68 class Radial
69 :
70  public FieldFunction2<Type, Radial<Type>>
71 {
72  // Private Data
73 
74  //- Function of the radius
76 
77 
78 public:
79 
80  // Runtime type information
81  TypeName("radial");
82 
83 
84  // Constructors
85 
86  //- Construct from name and dictionary
87  Radial
88  (
89  const word& name,
90  const unitConversions& units,
91  const dictionary& dict
92  );
93 
94  //- Copy constructor
95  Radial(const Radial<Type>& se);
96 
97 
98  //- Destructor
99  virtual ~Radial();
100 
101 
102  // Member Functions
103 
104  //- Return value
105  virtual inline Type value(const scalar x, const scalar y) const;
106 
107  //- Write data to dictionary stream
108  virtual void write(Ostream& os, const unitConversions& units) const;
109 
110 
111  // Member Operators
112 
113  //- Disallow default bitwise assignment
114  void operator=(const Radial<Type>&) = delete;
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Function2s
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #include "Radial2I.H"
126 
127 #ifdef NoRepository
128  #include "Radial2.C"
129 #endif
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
scalar y
const word & name() const
Return the name of the entry.
Definition: Function2.C:78
Function2 which returns a Function1 of the magnitude of the two-dimensional vector with components eq...
Definition: Radial2.H:70
virtual void write(Ostream &os, const unitConversions &units) const
Write data to dictionary stream.
Definition: Radial2.C:65
Radial(const word &name, const unitConversions &units, const dictionary &dict)
Construct from name and dictionary.
Definition: Radial2.C:32
virtual Type value(const scalar x, const scalar y) const
Return value.
Definition: Radial2I.H:33
void operator=(const Radial< Type > &)=delete
Disallow default bitwise assignment.
virtual ~Radial()
Destructor.
Definition: Radial2.C:57
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
const HashTable< unitConversion > & units()
Get the table of unit conversions.
dictionary dict