Loading...
Searching...
No Matches
primalSolver.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) 2007-2023 PCOpt/NTUA
9 Copyright (C) 2013-2023 FOSS GP
10 Copyright (C) 2019 OpenCFD Ltd.
11-------------------------------------------------------------------------------
12License
13 This file is part of OpenFOAM.
14
15 OpenFOAM is free software: you can redistribute it and/or modify it
16 under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27
28
29Class
30 Foam::primalSolver
31
32Description
33 Base class for primal solvers
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef primalSolver_H
38#define primalSolver_H
39
40#include "fvMesh.H"
41#include "solver.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class primalSolver Declaration
51\*---------------------------------------------------------------------------*/
52
53class primalSolver
54:
55 public solver
56{
57private:
58
59 // Private Member Functions
60
61 //- No copy construct
62 primalSolver(const primalSolver&) = delete;
63
64 //- No copy assignment
65 void operator=(const primalSolver&) = delete;
66
67
68public:
69
70
71 // Static Data Members
72
73 //- Run-time type information
74 TypeName("primalSolver");
75
76
77 // Declare run-time constructor selection table
80 (
81 autoPtr,
82 primalSolver,
83 primalSolver,
84 (
85 fvMesh& mesh,
86 const word& managerType,
87 const dictionary& dict,
88 const word& solverName
89 ),
91 );
92
93
94 // Constructors
95
96 //- Construct from mesh and dictionary
97 primalSolver
98 (
99 fvMesh& mesh,
100 const word& managerType,
101 const dictionary& dict,
102 const word& solverName
103 );
104
105
106 // Selectors
107
108 //- Return a reference to the selected primal solver
110 (
111 fvMesh& mesh,
112 const word& managerType,
113 const dictionary& dict,
114 const word& solverName
115 );
116
117
118 //- Destructor
119 virtual ~primalSolver() = default;
120
121
122 // Member Functions
123
124 virtual bool readDict(const dictionary& dict);
125
126
127 // Evolution
128
129 //- update boundary conditions
130 virtual void correctBoundaryConditions();
131};
132
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136} // End namespace Foam
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140#endif
141
142// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
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
virtual bool readDict(const dictionary &dict)
TypeName("primalSolver")
Run-time type information.
virtual ~primalSolver()=default
Destructor.
static autoPtr< primalSolver > New(fvMesh &mesh, const word &managerType, const dictionary &dict, const word &solverName)
Return a reference to the selected primal solver.
virtual void correctBoundaryConditions()
update boundary conditions
declareRunTimeNewSelectionTable(autoPtr, primalSolver, primalSolver,(fvMesh &mesh, const word &managerType, const dictionary &dict, const word &solverName),(mesh, managerType, dict, solverName))
const word & managerType() const
Return the manager type.
Definition solverI.H:72
const dictionary & dict() const
Return the solver dictionary.
Definition solverI.H:54
const fvMesh & mesh() const
Return the solver mesh.
Definition solverI.H:24
const word & solverName() const
Return the solver name.
Definition solverI.H:30
solver(const solver &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeNewSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection for derived classes.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68