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-2021 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* ctorPtr = dictionaryConstructorTable(modelType);
110 
111  if (!ctorPtr)
112  {
114  (
115  dict,
116  "objectiveIncompressible",
117  modelType,
118  *dictionaryConstructorTablePtr_
119  ) << exit(FatalIOError);
120  }
121 
123  (
124  ctorPtr(mesh, dict, adjointSolverName, primalSolverName)
125  );
126 }
127 
128 
129 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
130 
132 {
133  if (normalize_ && normFactor_)
134  {
135  const scalar oneOverNorm(1./normFactor_());
136 
137  if (hasdJdv())
138  {
139  dJdvPtr_().primitiveFieldRef() *= oneOverNorm;
140  }
141  if (hasdJdp())
142  {
143  dJdpPtr_().primitiveFieldRef() *= oneOverNorm;
144  }
145  if (hasdJdT())
146  {
147  dJdTPtr_().primitiveFieldRef() *= oneOverNorm;
148  }
149  if (hasdJdTMVar1())
150  {
151  dJdTMvar1Ptr_().primitiveFieldRef() *= oneOverNorm;
152  }
153  if (hasdJdTMVar2())
154  {
155  dJdTMvar2Ptr_().primitiveFieldRef() *= oneOverNorm;
156  }
157  if (hasBoundarydJdv())
158  {
159  bdJdvPtr_() *= oneOverNorm;
160  }
161  if (hasBoundarydJdvn())
162  {
163  bdJdvnPtr_() *= oneOverNorm;
164  }
165  if (hasBoundarydJdvt())
166  {
167  bdJdvtPtr_() *= oneOverNorm;
168  }
169  if (hasBoundarydJdp())
170  {
171  bdJdpPtr_() *= oneOverNorm;
172  }
173  if (hasBoundarydJdT())
174  {
175  bdJdTPtr_() *= oneOverNorm;
176  }
177  if (hasBoundarydJdTMVar1())
178  {
179  bdJdTMvar1Ptr_() *= oneOverNorm;
180  }
181  if (hasBoundarydJdTMVar2())
182  {
183  bdJdTMvar2Ptr_() *= oneOverNorm;
184  }
185 
186  // Normalize geometric fields
187  objective::doNormalization();
188  }
189 }
190 
191 
193 {
194  if (!dJdvPtr_)
195  {
196  // If pointer is not set, set it to a zero field
197  dJdvPtr_.reset
198  (
199  createZeroFieldPtr<vector>
200  (
201  mesh_,
202  ("dJdv_"+type()),
203  dimensionSet(0, 3, -2, 0, 0, 0, 0)
204  )
205  );
206  }
207  return *dJdvPtr_;
208 }
209 
210 
212 {
213  if (!dJdpPtr_)
214  {
215  // If pointer is not set, set it to a zero field
216  dJdpPtr_.reset
217  (
218  createZeroFieldPtr<scalar>
219  (
220  mesh_,
221  ("dJdp_"+type()),
222  dimensionSet(0, 3, -2, 0, 0, 0, 0)
223  )
224  );
225  }
226  return *dJdpPtr_;
227 }
228 
229 
231 {
232  if (!dJdTPtr_)
233  {
234  // If pointer is not set, set it to a zero field
235  dJdTPtr_.reset
236  (
237  createZeroFieldPtr<scalar>
238  (
239  mesh_,
240  ("dJdT_"+type()),
241  dimensionSet(0, 3, -2, 0, 0, 0, 0)
242  )
243  );
244  }
245  return *dJdTPtr_;
246 }
247 
248 
250 {
251  if (!dJdTMvar1Ptr_)
252  {
253  // If pointer is not set, set it to a zero field
254  dJdTMvar1Ptr_.reset
255  (
256  createZeroFieldPtr<scalar>
257  (
258  mesh_,
259  ("dJdTMvar1_"+type()),
260  dimensionSet(0, 0, -2, 0, 0, 0, 0)
261  )
262  );
263  }
264  return *dJdTMvar1Ptr_;
265 }
266 
267 
269 {
270  if (!dJdTMvar2Ptr_)
271  {
272  // If pointer is not set, set it to a zero field
273  dJdTMvar2Ptr_.reset
274  (
275  createZeroFieldPtr<scalar>
276  (
277  mesh_,
278  ("dJdTMvar2_"+type()),
279  dimensionSet(0, 3, -2, 0, 0, 0, 0)
280  )
281  );
282  }
283  return *dJdTMvar2Ptr_;
284 }
285 
286 
288 (
289  const label patchI
290 )
291 {
292  if (!bdJdvPtr_)
293  {
294  bdJdvPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
295  }
296  return bdJdvPtr_()[patchI];
297 }
298 
299 
301 (
302  const label patchI
303 )
304 {
305  if (!bdJdvnPtr_)
306  {
307  bdJdvnPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
308  }
309  return bdJdvnPtr_()[patchI];
310 }
311 
312 
314 (
315  const label patchI
316 )
317 {
318  if (!bdJdvtPtr_)
319  {
320  bdJdvtPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
321  }
322  return bdJdvtPtr_()[patchI];
323 }
324 
325 
327 (
328  const label patchI
329 )
330 {
331  if (!bdJdpPtr_)
332  {
333  bdJdpPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
334  }
335  return bdJdpPtr_()[patchI];
336 }
337 
338 
340 (
341  const label patchI
342 )
343 {
344  if (!bdJdTPtr_)
345  {
346  bdJdTPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
347  }
348  return bdJdTPtr_()[patchI];
349 }
350 
351 
353 (
354  const label patchI
355 )
356 {
357  if (!bdJdTMvar1Ptr_)
358  {
359  bdJdTMvar1Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
360  }
361  return bdJdTMvar1Ptr_()[patchI];
362 }
363 
364 
366 (
367  const label patchI
368 )
369 {
370  if (!bdJdTMvar2Ptr_)
371  {
372  bdJdTMvar2Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
373  }
374  return bdJdTMvar2Ptr_()[patchI];
375 }
376 
377 
379 {
380  if (!bdJdvPtr_)
381  {
382  bdJdvPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
383  }
384  return bdJdvPtr_();
385 }
386 
387 
389 {
390  if (!bdJdvnPtr_)
391  {
392  bdJdvnPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
393  }
394  return bdJdvnPtr_();
395 }
396 
397 
399 {
400  if (!bdJdvtPtr_)
401  {
402  bdJdvtPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
403  }
404  return bdJdvtPtr_();
405 }
406 
407 
409 {
410  if (!bdJdpPtr_)
411  {
412  bdJdpPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
413  }
414  return bdJdpPtr_();
415 }
416 
417 
419 {
420  if (!bdJdTPtr_)
421  {
422  bdJdTPtr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
423  }
424  return bdJdTPtr_();
425 }
426 
427 
429 {
430  if (!bdJdTMvar1Ptr_)
431  {
432  bdJdTMvar1Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
433  }
434  return bdJdTMvar1Ptr_();
435 }
436 
437 
439 {
440  if (!bdJdTMvar2Ptr_)
441  {
442  bdJdTMvar2Ptr_.reset(createZeroBoundaryPtr<scalar>(mesh_));
443  }
444  return bdJdTMvar2Ptr_();
445 }
446 
447 
449 {
450  // Objective function value
451  J();
452 
453  // Update mean values here since they might be used in the
454  // subsequent functions
456 
457  // volFields
458  update_dJdv();
459  update_dJdp();
460  update_dJdT();
463  update_dJdb();
466 
467  // boundaryFields
480  update_boundaryEdgeContribution();
481  update_dJdStressMultiplier();
482 
483  // Divide everything with normalization factor
484  doNormalization();
485 }
486 
487 
489 {
490  if (!nullified_)
491  {
492  if (hasdJdv())
493  {
494  dJdvPtr_() == dimensionedVector(dJdvPtr_().dimensions(), Zero);
495  }
496  if (hasdJdp())
497  {
498  dJdpPtr_() == dimensionedScalar(dJdpPtr_().dimensions(), Zero);
499  }
500  if (hasdJdT())
501  {
502  dJdTPtr_() == dimensionedScalar(dJdTPtr_().dimensions(), Zero);
503  }
504  if (hasdJdTMVar1())
505  {
506  dJdTMvar1Ptr_() ==
507  dimensionedScalar(dJdTMvar1Ptr_().dimensions(), Zero);
508  }
509  if (hasdJdTMVar2())
510  {
511  dJdTMvar2Ptr_() ==
512  dimensionedScalar(dJdTMvar2Ptr_().dimensions(), Zero);
513  }
514  if (hasBoundarydJdv())
515  {
516  bdJdvPtr_() == vector::zero;
517  }
518  if (hasBoundarydJdvn())
519  {
520  bdJdvnPtr_() == scalar(0);
521  }
522  if (hasBoundarydJdvt())
523  {
525  }
526  if (hasBoundarydJdp())
527  {
528  bdJdpPtr_() == vector::zero;
529  }
530  if (hasBoundarydJdT())
531  {
532  bdJdTPtr_() == scalar(0);
533  }
534  if (hasBoundarydJdTMVar1())
535  {
536  bdJdTMvar1Ptr_() == scalar(0);
537  }
538  if (hasBoundarydJdTMVar2())
539  {
540  bdJdTMvar2Ptr_() == scalar(0);
541  }
542 
543  // Nullify geometric fields and sets nullified_ to true
544  objective::nullify();
545  }
546 }
547 
548 
549 bool objectiveIncompressible::write(const bool valid) const
550 {
551  return objective::write(valid);
552 }
553 
554 
555 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
556 
557 } // End namespace Foam
558 
559 // ************************************************************************* //
Foam::objectiveIncompressible::bdJdTPtr_
autoPtr< boundaryScalarField > bdJdTPtr_
Adjoint outlet temperature.
Definition: objectiveIncompressible.H:91
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Foam::fvPatchField< vector >
Foam::objective::normFactor_
autoPtr< scalar > normFactor_
Normalization factor.
Definition: objective.H:86
Foam::objectiveIncompressible::dJdv
const volVectorField & dJdv()
Contribution to field adjoint momentum eqs.
Definition: objectiveIncompressible.C:192
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:65
Foam::objectiveIncompressible::update_boundarydJdTMvar1
virtual void update_boundarydJdTMvar1()
Definition: objectiveIncompressible.H:278
Foam::objective::normalize_
bool normalize_
Definition: objective.H:74
Foam::objectiveIncompressible::hasBoundarydJdvn
bool hasBoundarydJdvn() const
Definition: objectiveIncompressibleI.H:69
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::objectiveIncompressible::hasBoundarydJdp
bool hasBoundarydJdp() const
Definition: objectiveIncompressibleI.H:81
Foam::objectiveIncompressible::update_boundarydJdb
virtual void update_boundarydJdb()
Definition: objectiveIncompressible.H:284
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::objectiveIncompressible::update_boundarydJdTMvar2
virtual void update_boundarydJdTMvar2()
Definition: objectiveIncompressible.H:281
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:242
Foam::objectiveIncompressible::hasdJdp
bool hasdJdp() const
Definition: objectiveIncompressibleI.H:39
Foam::objectiveIncompressible::update_gradDxDbMultiplier
virtual void update_gradDxDbMultiplier()
Definition: objectiveIncompressible.H:260
Foam::objectiveIncompressible::bdJdvnPtr_
autoPtr< boundaryScalarField > bdJdvnPtr_
Adjoint outlet pressure.
Definition: objectiveIncompressible.H:82
Foam::objectiveIncompressible::update_dJdTMvar1
virtual void update_dJdTMvar1()
Definition: objectiveIncompressible.H:248
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:369
Foam::objectiveIncompressible::dJdTMvar1
const volScalarField & dJdTMvar1()
Contribution to field adjoint turbulence model variable 1.
Definition: objectiveIncompressible.C:249
Foam::objectiveIncompressible::update_dJdb
virtual void update_dJdb()
Definition: objectiveIncompressible.H:254
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:107
Foam::objectiveIncompressible::write
virtual bool write(const bool valid=true) const
Write objective function history.
Definition: objectiveIncompressible.C:549
Foam::dimensionSet
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Definition: dimensionSet.H:108
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:239
Foam::objectiveIncompressible::update_dxdbMultiplier
virtual void update_dxdbMultiplier()
Definition: objectiveIncompressible.H:293
Foam::dimensionedVector
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Definition: dimensionedVector.H:50
Foam::objectiveIncompressible::update_dSdbMultiplier
virtual void update_dSdbMultiplier()
Definition: objectiveIncompressible.H:287
Foam::objectiveIncompressible::boundarydJdv
const boundaryVectorField & boundarydJdv()
Objective partial deriv wrt velocity for all patches.
Definition: objectiveIncompressible.C:378
FatalIOErrorInLookup
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
Definition: error.H:478
Foam::objectiveIncompressible::update_dndbMultiplier
virtual void update_dndbMultiplier()
Definition: objectiveIncompressible.H:290
Foam::objectiveIncompressible::dJdpPtr_
autoPtr< volScalarField > dJdpPtr_
Definition: objectiveIncompressible.H:68
createZeroField.H
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::objectiveIncompressible::update_boundarydJdv
virtual void update_boundarydJdv()
Definition: objectiveIncompressible.H:263
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
Foam::objectiveIncompressible::update_dJdTMvar2
virtual void update_dJdTMvar2()
Definition: objectiveIncompressible.H:251
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:296
Foam::incompressiblePrimalSolver
Base class for primal incompressible solvers.
Definition: incompressiblePrimalSolver.H:53
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::objectiveIncompressible::update_boundarydJdT
virtual void update_boundarydJdT()
Definition: objectiveIncompressible.H:275
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:123
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:272
Foam::objectiveIncompressible::dJdp
const volScalarField & dJdp()
Contribution to field adjoint continuity eq.
Definition: objectiveIncompressible.C:211
Foam::objectiveIncompressible::boundarydJdT
const boundaryScalarField & boundarydJdT()
Objective partial deriv wrt temperature for all patches.
Definition: objectiveIncompressible.C:418
Foam::objectiveIncompressible::dJdTPtr_
autoPtr< volScalarField > dJdTPtr_
Definition: objectiveIncompressible.H:69
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam::objectiveIncompressible::update_boundarydJdvn
virtual void update_boundarydJdvn()
Definition: objectiveIncompressible.H:266
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:230
Foam::objectiveIncompressible::boundarydJdvn
const boundaryScalarField & boundarydJdvn()
Objective partial deriv wrt normal velocity for all patches.
Definition: objectiveIncompressible.C:388
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:73
Foam::objectiveIncompressible::hasBoundarydJdTMVar2
bool hasBoundarydJdTMVar2() const
Definition: objectiveIncompressibleI.H:99
Foam::GeometricField::Boundary
The boundary fields.
Definition: GeometricField.H:115
Foam::objectiveIncompressible::dJdvPtr_
autoPtr< volVectorField > dJdvPtr_
Definition: objectiveIncompressible.H:67
Foam::dictionary::write
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
Definition: dictionaryIO.C:206
Foam::objectiveIncompressible::nullify
virtual void nullify()
Update objective function derivatives.
Definition: objectiveIncompressible.C:488
Foam::objectiveIncompressible::update_meanValues
virtual void update_meanValues()
Definition: objectiveIncompressible.H:304
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:67
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:438
Foam::objectiveIncompressible::update_divDxDbMultiplier
virtual void update_divDxDbMultiplier()
Definition: objectiveIncompressible.H:257
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:268
Foam::objectiveIncompressible::boundarydJdp
const boundaryVectorField & boundarydJdp()
Objective partial deriv wrt pressure (times normal) for all patches.
Definition: objectiveIncompressible.C:408
Foam::objectiveIncompressible::hasBoundarydJdTMVar1
bool hasBoundarydJdTMVar1() const
Definition: objectiveIncompressibleI.H:93
Foam::objectiveIncompressible::update_boundarydJdvt
virtual void update_boundarydJdvt()
Definition: objectiveIncompressible.H:269
Foam::objectiveIncompressible::boundarydJdTMvar1
const boundaryScalarField & boundarydJdTMvar1()
Objective partial deriv wrt turbulence model var 1 for all patches.
Definition: objectiveIncompressible.C:428
Foam::objectiveIncompressible::update
virtual void update()
Update objective function derivatives.
Definition: objectiveIncompressible.C:448
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:398
Foam::objective
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
Definition: objective.H:59
Foam::objectiveIncompressible::update_dJdT
virtual void update_dJdT()
Definition: objectiveIncompressible.H:245
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::objectiveIncompressible::hasdJdTMVar1
bool hasdJdTMVar1() const
Definition: objectiveIncompressibleI.H:51
Foam::objectiveIncompressible::doNormalization
virtual void doNormalization()
Normalize all fields allocated by the objective.
Definition: objectiveIncompressible.C:131
Foam::dictionary::dictName
word dictName() const
The local dictionary name (final part of scoped name)
Definition: dictionaryI.H:60