fvOptionAdjoint.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::fv::optionAdjoint
31 
32 Description
33  Similar to fv::option but with additional functionality to contribute to
34  the sensitivity deriavtives
35 
36 SourceFiles
37  fvOptionAdjoint.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef fvOptionAdjoint_H
42 #define fvOptionAdjoint_H
43 
44 #include "fvOption.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 namespace fv
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class optionAdjoint Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class optionAdjoint
60 :
61  public option
62 {
63 public:
64 
65  //- Runtime type information
66  TypeName("optionAdjoint");
67 
68 
69  // Constructors
70 
71  //- Construct from components
73  (
74  const word& name,
75  const word& modelType,
76  const dictionary& dict,
77  const fvMesh& mesh
78  );
79 
80  //- Return clone
82  {
84  return nullptr;
85  }
86 
87 
88  // Declare run-time constructor selection table
89 
91  (
92  autoPtr,
94  dictionary,
95  (
96  const word& name,
97  const word& modelType,
98  const dictionary& dict,
99  const fvMesh& mesh
100  ),
101  (name, modelType, dict, mesh)
102  );
103 
104 
105  // Selectors
106 
107  //- Return a reference to the selected fvOption model
109  (
110  const word& name,
111  const dictionary& dict,
112  const fvMesh& mesh
113  );
114 
115 
116  //- Destructor
117  virtual ~optionAdjoint() = default;
118 
119 
120  // Member Functions
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace fv
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
Foam::fv::optionAdjoint::dxdbMult
virtual tmp< volVectorField > dxdbMult(const incompressibleAdjointVars &)
Definition: fvOptionAdjoint.C:92
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fv::optionAdjoint::TypeName
TypeName("optionAdjoint")
Runtime type information.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::fv::option::name
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:30
Foam::incompressibleAdjointVars
Class including all adjoint fields for incompressible flows.
Definition: incompressibleAdjointVars.H:52
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:436
Foam::fv::optionAdjoint::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, optionAdjoint, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh))
Foam::fv::option
Finite volume options abstract base class. Provides a base set of controls, e.g.:
Definition: fvOption.H:69
Foam::fv::optionAdjoint
Similar to fv::option but with additional functionality to contribute to the sensitivity deriavtives.
Definition: fvOptionAdjoint.H:58
Foam::fv::optionAdjoint::clone
autoPtr< optionAdjoint > clone() const
Return clone.
Definition: fvOptionAdjoint.H:80
Foam::fv::optionAdjoint::~optionAdjoint
virtual ~optionAdjoint()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::fv::optionAdjoint::optionAdjoint
optionAdjoint(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: fvOptionAdjoint.C:47
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
incompressibleAdjointVars.H
fv
labelList fv(nPoints)
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::fv::optionAdjoint::New
static autoPtr< optionAdjoint > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvOption model.
Definition: fvOptionAdjoint.C:61
fvOption.H
Foam::fv::option::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:36