Loading...
Searching...
No Matches
betaMax.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) 2020-2023 PCOpt/NTUA
9 Copyright (C) 2020-2023 FOSS GP
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
27
28Class
29 Foam::betaMax
30
31Description
32 Base class for selecting the betaMax value, i.e. the value multiplying the
33 Brinkman penalisation term, for topology optimisation.
34
35SourceFiles
36 betaMax.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef betaMax_H
41#define betaMax_H
42
43#include "fvMesh.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
50/*---------------------------------------------------------------------------*\
51 Class betaMax Declaration
52\*---------------------------------------------------------------------------*/
53
54class betaMax
55{
56private:
57
58 // Private Member Functions
59
60 //- No copy construct
61 betaMax(const betaMax&) = delete;
62
63 //- No copy assignment
64 void operator=(const betaMax&) = delete;
65
66
67protected:
68
69 // Protected Data
70
71 //- Reference to mesh
72 const fvMesh& mesh_;
74 //- betaMax value
75 scalar value_;
76
77
78 // Protected Member Functions
79
80 //- Compute the characteristic length
81 scalar computeLength(const dictionary& dict) const;
82
83 //- Mark all common inlet - processor edges
84 boolList markProcessorEdges(const polyPatch& patch) const;
85
86
87public:
88
89 //- Runtime type information
90 TypeName("betaMax");
91
92
93 // Declare run-time constructor selection table
94
96 (
97 autoPtr,
98 betaMax,
100 (
101 const fvMesh& mesh,
102 const dictionary& dict
103 ),
105 );
106
107
108 // Constructors
109
110 //- Construct from components
111 betaMax
112 (
113 const fvMesh& mesh,
114 const dictionary& dict
115 );
116
117
118 // Selectors
119
120 //- Construct and return the selected betaMax model
121 static autoPtr<betaMax> New
122 (
123 const fvMesh& mesh,
124 const dictionary& dict
125 );
126
127
128 //- Destructor
129 virtual ~betaMax() = default;
130
131
132 // Member Functions
133
134 //- Get value
135 virtual scalar value() const;
136};
137
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141} // End namespace Foam
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145#endif
146
147// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
const fvMesh & mesh_
Reference to mesh.
Definition betaMax.H:73
virtual scalar value() const
Get value.
Definition betaMax.C:248
TypeName("betaMax")
Runtime type information.
virtual ~betaMax()=default
Destructor.
declareRunTimeSelectionTable(autoPtr, betaMax, dictionary,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
scalar value_
betaMax value
Definition betaMax.H:78
static autoPtr< betaMax > New(const fvMesh &mesh, const dictionary &dict)
Construct and return the selected betaMax model.
Definition betaMax.C:220
boolList markProcessorEdges(const polyPatch &patch) const
Mark all common inlet - processor edges.
Definition betaMax.C:123
scalar computeLength(const dictionary &dict) const
Compute the characteristic length.
Definition betaMax.C:37
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
dynamicFvMesh & mesh
Namespace for OpenFOAM.
List< bool > boolList
A List of bools.
Definition List.H:60
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68