objectiveIncompressible.C
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 
32 #include "createZeroField.H"
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 
37 namespace Foam
38 {
39 
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 
42 defineTypeNameAndDebug(objectiveIncompressible, 0);
43 defineRunTimeSelectionTable(objectiveIncompressible, dictionary);
45 (
46  objective,
47  objectiveIncompressible,
48  objective
49 );
50 
51 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52 
53 objectiveIncompressible::objectiveIncompressible
54 (
55  const fvMesh& mesh,
56  const dictionary& dict,
57  const word& adjointSolverName,
58  const word& primalSolverName
59 )
60 :
61  objective(mesh, dict, adjointSolverName, primalSolverName),
62 
63  vars_
64  (
65  mesh.lookupObject<incompressiblePrimalSolver>(primalSolverName).
66  getIncoVars()
67  ),
68 
69  // Initialize pointers to nullptr.
70  // Not all of them are required for each objective function.
71  // Each child should allocate whatever is needed.
72 
73  // Field adjoint Eqs
74  dJdvPtr_(nullptr),
75  dJdpPtr_(nullptr),
76  dJdTPtr_(nullptr),
77  dJdTMvar1Ptr_(nullptr),
78  dJdTMvar2Ptr_(nullptr),
79 
80  // Adjoint boundary conditions
81  bdJdvPtr_(nullptr),
82  bdJdvnPtr_(nullptr),
83  bdJdvtPtr_(nullptr),
84  bdJdpPtr_(nullptr),
85  bdJdTPtr_(nullptr),
86  bdJdTMvar1Ptr_(nullptr),
87  bdJdTMvar2Ptr_(nullptr)
88 {
89  weight_ = dict.get<scalar>("weight");
90  computeMeanFields_ = vars_.computeMeanFields();
91 }
92 
93 
94 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
95 
97 (
98  const fvMesh& mesh,
99  const dictionary& dict,
100  const word& adjointSolverName,
101  const word& primalSolverName
102 )
103 {
104  const word modelType(dict.get<word>("type"));
105 
106  Info<< "Creating objective function : " << dict.dictName()
107  << " of type " << modelType << endl;
108 
109  auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
110 
111  if (!cstrIter.found())
112  {
114  (
115  dict,
116  "objectiveIncompressible",
117  modelType,
118  *dictionaryConstructorTablePtr_
119  ) << exit(FatalIOError);
120  }
121 
123  (
124  cstrIter()(mesh, dict, adjointSolverName, primalSolverName)
125  );
126 }
127 
128 
129 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
130 
132 {
133  if (dJdvPtr_.empty())
134  {
135  // If pointer is not set, set it to a zero field
136  dJdvPtr_.reset
137  (
138  createZeroFieldPtr<vector>
139  (
140  mesh_,
141  ("dJdv_"+type()),
142  dimensionSet(0, 3, -2, 0, 0, 0, 0)
143  )
144  );
145  }
146  return dJdvPtr_();
147 }
148 
149 
151 {
152  if (dJdpPtr_.empty())
153  {
154  // If pointer is not set, set it to a zero field
155  dJdpPtr_.reset
156  (
157  createZeroFieldPtr<scalar>
158  (
159  mesh_,
160  ("dJdp_"+type()),
161  dimensionSet(0, 3, -2, 0, 0, 0, 0)
162  )
163  );
164  }
165  return dJdpPtr_();
166 }
167 
168 
170 {
171  if (dJdTPtr_.empty())
172  {
173  // If pointer is not set, set it to a zero field
174  dJdTPtr_.reset
175  (
176  createZeroFieldPtr<scalar>
177  (
178  mesh_,
179  ("dJdT_"+type()),
180  dimensionSet(0, 3, -2, 0, 0, 0, 0)
181  )
182  );
183  }
184  return dJdTPtr_();
185 }
186 
187 
189 {
190  if (dJdTMvar1Ptr_.empty())
191  {
192  // If pointer is not set, set it to a zero field
193  dJdTMvar1Ptr_.reset
194  (
195  createZeroFieldPtr<scalar>
196  (
197  mesh_,
198  ("dJdTMvar1_"+type()),
199  dimensionSet(0, 0, -2, 0, 0, 0, 0)
200  )
201  );
202  }
203  return dJdTMvar1Ptr_();
204 }
205 
206 
208 {
209  if (dJdTMvar2Ptr_.empty())
210  {
211  // If pointer is not set, set it to a zero field
212  dJdTMvar2Ptr_.reset
213  (
214  createZeroFieldPtr<scalar>
215  (
216  mesh_,
217  ("dJdTMvar2_"+type()),
218  dimensionSet(0, 3, -2, 0, 0, 0, 0)
219  )
220  );
221  }
222  return dJdTMvar2Ptr_();
223 }
224 
225 
227 (
228  const label patchI
229 )
230 {
231  if (bdJdvPtr_.empty())
232  {
233  bdJdvPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
234  }
235  return bdJdvPtr_()[patchI];
236 }
237 
238 
240 (
241  const label patchI
242 )
243 {
244  if (bdJdvnPtr_.empty())
245  {
246  bdJdvnPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
247  }
248  return bdJdvnPtr_()[patchI];
249 }
250 
251 
253 (
254  const label patchI
255 )
256 {
257  if (bdJdvtPtr_.empty())
258  {
259  bdJdvtPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
260  }
261  return bdJdvtPtr_()[patchI];
262 }
263 
264 
266 (
267  const label patchI
268 )
269 {
270  if (bdJdpPtr_.empty())
271  {
272  bdJdpPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
273  }
274  return bdJdpPtr_()[patchI];
275 }
276 
277 
279 (
280  const label patchI
281 )
282 {
283  if (bdJdTPtr_.empty())
284  {
285  bdJdTPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
286  }
287  return bdJdTPtr_()[patchI];
288 }
289 
290 
292 (
293  const label patchI
294 )
295 {
296  if (bdJdTMvar1Ptr_.empty())
297  {
298  bdJdTMvar1Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
299  }
300  return bdJdTMvar1Ptr_()[patchI];
301 }
302 
303 
305 (
306  const label patchI
307 )
308 {
309  if (bdJdTMvar2Ptr_.empty())
310  {
311  bdJdTMvar2Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
312  }
313  return bdJdTMvar2Ptr_()[patchI];
314 }
315 
316 
318 {
319  if (bdJdvPtr_.empty())
320  {
321  bdJdvPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
322  }
323  return bdJdvPtr_();
324 }
325 
326 
328 {
329  if (bdJdvnPtr_.empty())
330  {
331  bdJdvnPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
332  }
333  return bdJdvnPtr_();
334 }
335 
336 
338 {
339  if (bdJdvtPtr_.empty())
340  {
341  bdJdvtPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
342  }
343  return bdJdvtPtr_();
344 }
345 
346 
348 {
349  if (bdJdpPtr_.empty())
350  {
351  bdJdpPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
352  }
353  return bdJdpPtr_();
354 }
355 
356 
358 {
359  if (bdJdTPtr_.empty())
360  {
361  bdJdTPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
362  }
363  return bdJdTPtr_();
364 }
365 
366 
368 {
369  if (bdJdTMvar1Ptr_.empty())
370  {
371  bdJdTMvar1Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
372  }
373  return bdJdTMvar1Ptr_();
374 }
375 
376 
378 {
379  if (bdJdTMvar2Ptr_.empty())
380  {
381  bdJdTMvar2Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
382  }
383  return bdJdTMvar2Ptr_();
384 }
385 
386 
388 {
389  // Objective function value
390  J();
391 
392  // Update mean values here since they might be used in the
393  // subsequent functions
395 
396  // volFields
397  update_dJdv();
398  update_dJdp();
399  update_dJdT();
402  update_dJdb();
405 
406  // boundaryFields
421 }
422 
423 
425 {
426  if (!nullified_)
427  {
428  if (hasdJdv())
429  {
430  dJdvPtr_() == dimensionedVector(dJdvPtr_().dimensions(), Zero);
431  }
432  if (hasdJdp())
433  {
434  dJdpPtr_() == dimensionedScalar(dJdpPtr_().dimensions(), Zero);
435  }
436  if (hasdJdT())
437  {
438  dJdTPtr_() == dimensionedScalar(dJdTPtr_().dimensions(), Zero);
439  }
440  if (hasdJdTMVar1())
441  {
442  dJdTMvar1Ptr_() ==
443  dimensionedScalar(dJdTMvar1Ptr_().dimensions(), Zero);
444  }
445  if (hasdJdTMVar2())
446  {
447  dJdTMvar2Ptr_() ==
448  dimensionedScalar(dJdTMvar2Ptr_().dimensions(), Zero);
449  }
450  if (hasBoundarydJdv())
451  {
452  bdJdvPtr_() == vector::zero;
453  }
454  if (hasBoundarydJdvn())
455  {
456  bdJdvnPtr_() == scalar(0);
457  }
458  if (hasBoundarydJdvt())
459  {
461  }
462  if (hasBoundarydJdp())
463  {
464  bdJdpPtr_() == vector::zero;
465  }
466  if (hasBoundarydJdT())
467  {
468  bdJdTPtr_() == scalar(0);
469  }
470  if (hasBoundarydJdTMVar1())
471  {
472  bdJdTMvar1Ptr_() == scalar(0);
473  }
474  if (hasBoundarydJdTMVar2())
475  {
476  bdJdTMvar2Ptr_() == scalar(0);
477  }
478 
479  // Nullify geometric fields and sets nullified_ to true
481  }
482 }
483 
484 
486 {
488 }
489 
490 
491 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
492 
493 } // End namespace Foam
494 
495 // ************************************************************************* //
Foam::objectiveIncompressible::bdJdTPtr_
autoPtr< boundaryScalarField > bdJdTPtr_
Adjoint outlet temperature.
Definition: objectiveIncompressible.H:91
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Foam::fvPatchField< vector >
Foam::objective::nullify
virtual void nullify()
Nullify adjoint contributions.
Definition: objective.C:538
Foam::objectiveIncompressible::write
virtual void write() const
Write objective function history.
Definition: objectiveIncompressible.C:485
Foam::objectiveIncompressible::dJdv
const volVectorField & dJdv()
Contribution to field adjoint momentum eqs.
Definition: objectiveIncompressible.C:131
incompressiblePrimalSolver.H
Foam::objectiveIncompressible::J
virtual scalar J()=0
Return the objective function value.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::objectiveIncompressible::update_boundarydJdTMvar1
virtual void update_boundarydJdTMvar1()
Definition: objectiveIncompressible.H:275
Foam::objectiveIncompressible::hasBoundarydJdvn
bool hasBoundarydJdvn() const
Definition: objectiveIncompressibleI.H:69
Foam::Zero
static constexpr const zero Zero
Global zero.
Definition: zero.H:128
Foam::objectiveIncompressible::hasBoundarydJdp
bool hasBoundarydJdp() const
Definition: objectiveIncompressibleI.H:81
Foam::objectiveIncompressible::update_boundarydJdb
virtual void update_boundarydJdb()
Update objective function derivative term.
Definition: objectiveIncompressible.H:281
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::objectiveIncompressible::update_boundarydJdTMvar2
virtual void update_boundarydJdTMvar2()
Definition: objectiveIncompressible.H:278
Foam::objectiveIncompressible::bdJdTMvar2Ptr_
autoPtr< boundaryScalarField > bdJdTMvar2Ptr_
Adjoint outlet turbulence model var 2.
Definition: objectiveIncompressible.H:97
Foam::objectiveIncompressible::update_dJdp
virtual void update_dJdp()
Definition: objectiveIncompressible.H:239
Foam::objectiveIncompressible::hasdJdp
bool hasdJdp() const
Definition: objectiveIncompressibleI.H:39
Foam::objectiveIncompressible::update_gradDxDbMultiplier
virtual void update_gradDxDbMultiplier()
Update grad( dx/db multiplier). Volume-based sensitivity term.
Definition: objectiveIncompressible.H:257
Foam::objectiveIncompressible::bdJdvnPtr_
autoPtr< boundaryScalarField > bdJdvnPtr_
Adjoint outlet pressure.
Definition: objectiveIncompressible.H:82
Foam::objectiveIncompressible::update_dJdTMvar1
virtual void update_dJdTMvar1()
Definition: objectiveIncompressible.H:245
Foam::objectiveIncompressible::bdJdvPtr_
autoPtr< boundaryVectorField > bdJdvPtr_
Definition: objectiveIncompressible.H:79
Foam::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:337
Foam::objectiveIncompressible::dJdTMvar1
const volScalarField & dJdTMvar1()
Contribution to field adjoint turbulence model variable 1.
Definition: objectiveIncompressible.C:188
Foam::objectiveIncompressible::update_dJdb
virtual void update_dJdb()
Definition: objectiveIncompressible.H:251
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:81
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:65
Foam::objectiveIncompressible::hasdJdT
bool hasdJdT() const
Definition: objectiveIncompressibleI.H:45
Foam::objectiveIncompressible::bdJdvtPtr_
autoPtr< boundaryVectorField > bdJdvtPtr_
Adjoint outlet velocity.
Definition: objectiveIncompressible.H:85
Foam::objectiveIncompressible::hasBoundarydJdv
bool hasBoundarydJdv() const
Definition: objectiveIncompressibleI.H:63
Foam::objectiveIncompressible::update_dJdv
virtual void update_dJdv()
Update vol and boundary fields and derivatives.
Definition: objectiveIncompressible.H:236
Foam::objectiveIncompressible::update_dxdbMultiplier
virtual void update_dxdbMultiplier()
Update d (x) / db multiplier. Surface-based sensitivity term.
Definition: objectiveIncompressible.H:290
Foam::dimensionedVector
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Definition: dimensionedVector.H:50
Foam::objectiveIncompressible::update_dSdbMultiplier
virtual void update_dSdbMultiplier()
Update d (normal dS) / db multiplier. Surface-based sensitivity term.
Definition: objectiveIncompressible.H:284
Foam::objectiveIncompressible::boundarydJdv
const boundaryVectorField & boundarydJdv()
Objective partial deriv wrt velocity for all patches.
Definition: objectiveIncompressible.C:317
FatalIOErrorInLookup
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
Definition: error.H:380
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::objectiveIncompressible::update_dndbMultiplier
virtual void update_dndbMultiplier()
Update d (normal) / db multiplier. Surface-based sensitivity term.
Definition: objectiveIncompressible.H:287
Foam::objectiveIncompressible::dJdpPtr_
autoPtr< volScalarField > dJdpPtr_
Definition: objectiveIncompressible.H:68
createZeroField.H
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::objective::update_boundaryEdgeContribution
virtual void update_boundaryEdgeContribution()
Update boundary edge contributions.
Definition: objective.H:336
Foam::objectiveIncompressible::update_boundarydJdv
virtual void update_boundarydJdv()
Definition: objectiveIncompressible.H:260
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
Foam::objectiveIncompressible::update_dJdTMvar2
virtual void update_dJdTMvar2()
Definition: objectiveIncompressible.H:248
Foam::objectRegistry::lookupObject
const Type & lookupObject(const word &name, const bool recursive=false) const
Definition: objectRegistryTemplates.C:434
Foam::objectiveIncompressible::New
static autoPtr< objectiveIncompressible > New(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
Return a reference to the selected turbulence model.
Definition: objectiveIncompressible.C:97
Foam::objectiveIncompressible::update_dxdbDirectMultiplier
virtual void update_dxdbDirectMultiplier()
Definition: objectiveIncompressible.H:293
Foam::dictionary::dictName
word dictName() const
The local dictionary name (final part of scoped name)
Definition: dictionary.H:458
Foam::incompressiblePrimalSolver
Base class for primal incompressible solvers.
Definition: incompressiblePrimalSolver.H:54
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::objectiveIncompressible::update_boundarydJdT
virtual void update_boundarydJdT()
Definition: objectiveIncompressible.H:272
Foam::objectiveIncompressible::hasBoundarydJdT
bool hasBoundarydJdT() const
Definition: objectiveIncompressibleI.H:87
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
objectiveIncompressible.H
Foam::objectiveIncompressible::bdJdTMvar1Ptr_
autoPtr< boundaryScalarField > bdJdTMvar1Ptr_
Adjoint outlet turbulence model var 1.
Definition: objectiveIncompressible.H:94
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::objectiveIncompressible::update_boundarydJdp
virtual void update_boundarydJdp()
Definition: objectiveIncompressible.H:269
Foam::objectiveIncompressible::dJdp
const volScalarField & dJdp()
Contribution to field adjoint continuity eq.
Definition: objectiveIncompressible.C:150
Foam::objectiveIncompressible::boundarydJdT
const boundaryScalarField & boundarydJdT()
Objective partial deriv wrt temperature for all patches.
Definition: objectiveIncompressible.C:357
Foam::objectiveIncompressible::dJdTPtr_
autoPtr< volScalarField > dJdTPtr_
Definition: objectiveIncompressible.H:69
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam::objectiveIncompressible::update_boundarydJdvn
virtual void update_boundarydJdvn()
Definition: objectiveIncompressible.H:263
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::objectiveIncompressible::dJdTMvar1Ptr_
autoPtr< volScalarField > dJdTMvar1Ptr_
First turbulence model variable.
Definition: objectiveIncompressible.H:72
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::objectiveIncompressible::dJdT
const volScalarField & dJdT()
Contribution to field adjoint energy eq.
Definition: objectiveIncompressible.C:169
Foam::objectiveIncompressible::boundarydJdvn
const boundaryScalarField & boundarydJdvn()
Objective partial deriv wrt normal velocity for all patches.
Definition: objectiveIncompressible.C:327
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::objective::nullified_
bool nullified_
Definition: objective.H:70
Foam::objectiveIncompressible::hasBoundarydJdTMVar2
bool hasBoundarydJdTMVar2() const
Definition: objectiveIncompressibleI.H:99
Foam::GeometricField::Boundary
Definition: GeometricField.H:114
Foam::objectiveIncompressible::dJdvPtr_
autoPtr< volVectorField > dJdvPtr_
Definition: objectiveIncompressible.H:67
Foam::objectiveIncompressible::nullify
virtual void nullify()
Update objective function derivatives.
Definition: objectiveIncompressible.C:424
Foam::objectiveIncompressible::update_meanValues
virtual void update_meanValues()
Definition: objectiveIncompressible.H:301
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::objective::mesh_
const fvMesh & mesh_
Definition: objective.H:64
Foam::objectiveIncompressible::hasdJdTMVar2
bool hasdJdTMVar2() const
Definition: objectiveIncompressibleI.H:57
Foam::objectiveIncompressible::boundarydJdTMvar2
const boundaryScalarField & boundarydJdTMvar2()
Objective partial deriv wrt turbulence model var 2 for all patches.
Definition: objectiveIncompressible.C:377
Foam::objectiveIncompressible::update_divDxDbMultiplier
virtual void update_divDxDbMultiplier()
Update div( dx/db multiplier). Volume-based sensitivity term.
Definition: objectiveIncompressible.H:254
Foam::objectiveIncompressible::dJdTMvar2Ptr_
autoPtr< volScalarField > dJdTMvar2Ptr_
Second turbulence model variable.
Definition: objectiveIncompressible.H:75
Foam::VectorSpace< Vector< scalar >, scalar, 3 >::zero
static const Vector< scalar > zero
Definition: VectorSpace.H:115
Foam::objectiveIncompressible::dJdTMvar2
const volScalarField & dJdTMvar2()
Contribution to field adjoint turbulence model variable 2.
Definition: objectiveIncompressible.C:207
Foam::objective::update_dJdStressMultiplier
virtual void update_dJdStressMultiplier()
Update dJ/dStress field.
Definition: objective.H:340
Foam::objectiveIncompressible::boundarydJdp
const boundaryVectorField & boundarydJdp()
Objective partial deriv wrt pressure (times normal) for all patches.
Definition: objectiveIncompressible.C:347
Foam::objectiveIncompressible::hasBoundarydJdTMVar1
bool hasBoundarydJdTMVar1() const
Definition: objectiveIncompressibleI.H:93
Foam::objectiveIncompressible::update_boundarydJdvt
virtual void update_boundarydJdvt()
Definition: objectiveIncompressible.H:266
Foam::objectiveIncompressible::boundarydJdTMvar1
const boundaryScalarField & boundarydJdTMvar1()
Objective partial deriv wrt turbulence model var 1 for all patches.
Definition: objectiveIncompressible.C:367
Foam::objectiveIncompressible::update
virtual void update()
Update objective function derivatives.
Definition: objectiveIncompressible.C:387
Foam::objectiveIncompressible::hasBoundarydJdvt
bool hasBoundarydJdvt() const
Definition: objectiveIncompressibleI.H:75
Foam::objectiveIncompressible::bdJdpPtr_
autoPtr< boundaryVectorField > bdJdpPtr_
Adjoint (intlet,wall) velocity.
Definition: objectiveIncompressible.H:88
Foam::objectiveIncompressible::hasdJdv
bool hasdJdv() const
Inline functions for checking whether pointers are set or not.
Definition: objectiveIncompressibleI.H:33
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::objectiveIncompressible::boundarydJdvt
const boundaryVectorField & boundarydJdvt()
Objective partial deriv wrt tangent velocity for all patches.
Definition: objectiveIncompressible.C:337
Foam::objective
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
Definition: objective.H:58
Foam::objectiveIncompressible::update_dJdT
virtual void update_dJdT()
Definition: objectiveIncompressible.H:242
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::objectiveIncompressible::hasdJdTMVar1
bool hasdJdTMVar1() const
Definition: objectiveIncompressibleI.H:51
Foam::objective::write
virtual void write() const
Write objective function history.
Definition: objective.C:593