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-2019 PCOpt/NTUA
9  Copyright (C) 2013-2019 FOSS GP
10  Copyright (C) 2019 OpenCFD Ltd.
11 -------------------------------------------------------------------------------
12 License
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 
29 Class
30  Foam::primalSolver
31 
32 Description
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"
42 #include "runTimeSelectionTables.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class primalSolver Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class primalSolver
54 :
55  public solver
56 {
57 private:
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 
68 public:
69 
70 
71  // Static Data Members
72 
73  //- Run-time type information
74  TypeName("primalSolver");
75 
76 
77  // Declare run-time constructor selection table
78 
80  (
81  autoPtr,
84  (
85  fvMesh& mesh,
86  const word& managerType,
87  const dictionary& dict
88  ),
89  (mesh, managerType, dict)
90  );
91 
92 
93  // Constructors
94 
95  //- Construct from mesh and dictionary
97  (
98  fvMesh& mesh,
99  const word& managerType,
100  const dictionary& dict
101  );
102 
103 
104  // Selectors
105 
106  //- Return a reference to the selected primal solver
108  (
109  fvMesh& mesh,
110  const word& managerType,
111  const dictionary& dict
112  );
113 
114 
115  //- Destructor
116  virtual ~primalSolver() = default;
117 
118 
119  // Member Functions
120 
121  virtual bool readDict(const dictionary& dict);
122 
123 
124  // Evolution
125 
126  //- update boundary conditions
127  virtual void correctBoundaryConditions();
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::primalSolver::~primalSolver
virtual ~primalSolver()=default
Destructor.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
solver.H
Foam::primalSolver::New
static autoPtr< primalSolver > New(fvMesh &mesh, const word &managerType, const dictionary &dict)
Return a reference to the selected primal solver.
Definition: primalSolver.C:59
Foam::primalSolver::TypeName
TypeName("primalSolver")
Run-time type information.
Foam::solver
Base class for solution control classes.
Definition: solver.H:51
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::primalSolver::correctBoundaryConditions
virtual void correctBoundaryConditions()
update boundary conditions
Definition: primalSolver.C:97
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::solver::mesh
const fvMesh & mesh() const
Return the solver mesh.
Definition: solver.C:96
Foam::primalSolver::readDict
virtual bool readDict(const dictionary &dict)
Definition: primalSolver.C:86
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::primalSolver::declareRunTimeNewSelectionTable
declareRunTimeNewSelectionTable(autoPtr, primalSolver, primalSolver,(fvMesh &mesh, const word &managerType, const dictionary &dict),(mesh, managerType, dict))
Foam::primalSolver
Base class for primal solvers.
Definition: primalSolver.H:52
Foam::solver::dict
virtual const dictionary & dict() const
Return the solver dictionary.
Definition: solver.C:113