regularisationRadius.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) 2021 PCOpt/NTUA
9  Copyright (C) 2021 FOSS GP
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 
28 Class
29  Foam::regularisationRadius
30 
31 Description
32  Base class for selecting the regulatisation radius
33 
34 
35 SourceFiles
36  regularisationRadius.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef regularisationRadius_H
41 #define regularisationRadius_H
42 
43 #include "fvMatrices.H"
44 #include "runTimeSelectionTables.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class regularisationRadius Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57 
58 private:
59 
60  // Private Member Functions
61 
62  //- No copy construct
64 
65  //- No copy assignment
66  void operator=(const regularisationRadius&) = delete;
67 
68 
69 protected:
70 
71  // Protected data
72 
73  const fvMesh& mesh_;
74 
75  const dictionary dict_;
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("regularisationRadius");
82 
83 
84  // Declare run-time constructor selection table
85 
87  (
88  autoPtr,
90  dictionary,
91  (
92  const fvMesh& mesh,
93  const dictionary& dict,
94  bool adjustWallThickness
95  ),
96  (mesh, dict, adjustWallThickness)
97  );
98 
99 
100  // Constructors
101 
102  //- Construct from components
104  (
105  const fvMesh& mesh,
106  const dictionary& dict,
107  bool adjustWallThickness
108  );
109 
110 
111  // Selectors
112 
113  //- Construct and return the selected regularisationRadius
114  // Default to isotropic
116  (
117  const fvMesh& mesh,
118  const dictionary& dict,
119  bool adjustWallThickness
120  );
121 
122 
123  //- Destructor
124  virtual ~regularisationRadius() = default;
125 
126 
127  // Member Functions
128 
129  //- Term including the regulatisation of the field
130  virtual void addRegularisationTerm
131  (
132  fvScalarMatrix& matrix,
133  bool isTopoField
134  ) const = 0;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
Base class for selecting the regulatisation radius.
dictionary dict
declareRunTimeSelectionTable(autoPtr, regularisationRadius, dictionary,(const fvMesh &mesh, const dictionary &dict, bool adjustWallThickness),(mesh, dict, adjustWallThickness))
static autoPtr< regularisationRadius > New(const fvMesh &mesh, const dictionary &dict, bool adjustWallThickness)
Construct and return the selected regularisationRadius.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual void addRegularisationTerm(fvScalarMatrix &matrix, bool isTopoField) const =0
Term including the regulatisation of the field.
TypeName("regularisationRadius")
Runtime type information.
dynamicFvMesh & mesh
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:64
virtual ~regularisationRadius()=default
Destructor.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Macros to ease declaration of run-time selection tables.
Namespace for OpenFOAM.