boundaryAdjointContribution.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 
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 
37 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 
39 defineTypeNameAndDebug(boundaryAdjointContribution, 0);
40 defineRunTimeSelectionTable(boundaryAdjointContribution, dictionary);
41 
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 
44 boundaryAdjointContribution::boundaryAdjointContribution
45 (
46  const word& managerName,
47  const word& adjointSolverName,
48  const word& simulationType,
49  const fvPatch& patch
50 )
51 :
52  patch_(patch)
53 {}
54 
55 
56 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
57 
59 (
60  const word& managerName,
61  const word& adjointSolverName,
62  const word& simulationType,
63  const fvPatch& patch
64 )
65 {
66  auto cstrIter = dictionaryConstructorTablePtr_->cfind(simulationType);
67 
68  if (!cstrIter.found())
69  {
71  (
72  "boundaryAdjointContribution",
73  simulationType,
74  *dictionaryConstructorTablePtr_
75  ) << exit(FatalError);
76  }
77 
78  return
80  (
81  cstrIter()
82  (
83  managerName,
84  adjointSolverName,
85  simulationType,
86  patch
87  )
88  );
89 }
90 
91 
92 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
93 
95 {
97 }
98 
99 
101 {
103 }
104 
105 
107 {
109 }
110 
111 
113 {
115 }
116 
117 
119 {
121 }
122 
123 
125 {
127 }
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::boundaryAdjointContribution::TMVariable1Diffusion
virtual tmp< scalarField > TMVariable1Diffusion()
Definition: boundaryAdjointContribution.C:106
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::boundaryAdjointContribution::TMVariable1
virtual tmp< scalarField > TMVariable1()
Definition: boundaryAdjointContribution.C:118
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
boundaryAdjointContribution.H
Foam::fvPatch::size
virtual label size() const
Return size.
Definition: fvPatch.H:179
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::boundaryAdjointContribution::TMVariable2
virtual tmp< scalarField > TMVariable2()
Definition: boundaryAdjointContribution.C:124
Foam::FatalError
error FatalError
FatalErrorInLookup
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Definition: error.H:385
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::boundaryAdjointContribution::patch_
const fvPatch & patch_
Definition: boundaryAdjointContribution.H:78
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
Foam::boundaryAdjointContribution::adjointTMVariable1Source
virtual tmp< scalarField > adjointTMVariable1Source()
Definition: boundaryAdjointContribution.C:94
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::boundaryAdjointContribution::adjointTMVariable2Source
virtual tmp< scalarField > adjointTMVariable2Source()
Definition: boundaryAdjointContribution.C:100
Foam::boundaryAdjointContribution::TMVariable2Diffusion
virtual tmp< scalarField > TMVariable2Diffusion()
Definition: boundaryAdjointContribution.C:112
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::boundaryAdjointContribution::New
static autoPtr< boundaryAdjointContribution > New(const word &managerName, const word &adjointSolverName, const word &simulationType, const fvPatch &patch)
Return a reference to the selected turbulence model.
Definition: boundaryAdjointContribution.C:59