adjointSolverI.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 
29 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30 
32 {
33  return primalSolverName_;
34 }
35 
36 
38 {
39  return mesh_.lookupObject<primalSolver>(primalSolverName_);
40 }
41 
42 
44 {
45  return
46  const_cast<primalSolver&>
47  (
48  mesh_.lookupObject<primalSolver>(primalSolverName_)
49  );
50 }
51 
52 
55 {
56  return objectiveManager_;
57 }
58 
59 
61 {
62  return objectiveManager_;
63 }
64 
65 
67 {
68  return isConstraint_;
69 }
70 
71 
73 {
74  return isDoubleSidedConstraint_;
75 }
76 
77 
78 // ************************************************************************* //
const word primalSolverName_
Name of primal solver.
Definition: adjointSolver.H:79
const word & primalSolverName() const
Return the primal solver name.
bool isConstraint()
Is the solving referring to a constraint.
Base class for primal solvers.
Definition: primalSolver.H:46
Class for managing objective functions.
bool isDoubleSidedConstraint()
Is the solving referring to a double-sided constraint.
const objectiveManager & getObjectiveManager() const
Return a const reference to the objective manager.
A class for handling words, derived from Foam::string.
Definition: word.H:63
const primalSolver & getPrimalSolver() const
Return a const-reference to the primal solver corresponding to this adjoint solver.