gradientEnergyCalculatedTemperatureFvPatchScalarField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
33  (
34  gradientEnergyCalculatedTemperatureFvPatchScalarField,
35  0
36  );
37 }
38 
39 
40 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41 
44 (
45  const fvPatch& p,
47 )
48 :
49  calculatedFvPatchScalarField(p, iF),
50  heGradient_(p.size())
51 {}
52 
53 
56 (
57  const fvPatch& p,
59  const dictionary& dict
60 )
61 :
62  calculatedFvPatchScalarField(p, iF),
63  heGradient_(p.size())
64 {
66 }
67 
68 
71 (
73  const fvPatch& p,
75  const fvPatchFieldMapper& mapper
76 )
77 :
78  calculatedFvPatchScalarField(ptf, p, iF, mapper),
79  heGradient_(mapper(ptf.heGradient_))
80 {}
81 
82 
85 (
88 )
89 :
90  calculatedFvPatchScalarField(ptf, iF),
91  heGradient_(ptf.heGradient_)
92 {}
93 
94 
95 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
96 
98 (
99  const fvPatchFieldMapper& m
100 )
101 {
102  calculatedFvPatchScalarField::autoMap(m);
103  m(heGradient_, heGradient_);
104 }
105 
106 
108 (
109  const fvPatchScalarField& ptf,
110  const labelList& addr
111 )
112 {
113  calculatedFvPatchScalarField::rmap(ptf, addr);
114 
116  refCast<const gradientEnergyCalculatedTemperatureFvPatchScalarField>
117  (
118  ptf
119  );
120 
121  heGradient_.rmap(mptf.heGradient_, addr);
122 }
123 
124 
126 (
127  const fvPatchScalarField& ptf
128 )
129 {
130  calculatedFvPatchScalarField::reset(ptf);
131 
133  refCast<const gradientEnergyCalculatedTemperatureFvPatchScalarField>
134  (
135  ptf
136  );
137 
138  heGradient_.reset(mptf.heGradient_);
139 }
140 
141 
142 // ************************************************************************* //
void evaluate(GeometricField< Type, PatchField, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, PatchField, GeoMesh > &x)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Foam::fvPatchFieldMapper.
Base class for temperature boundary conditions in which the parameters of the gradient energy conditi...
virtual label size() const
Return size.
Definition: fvPatch.H:157
defineTypeNameAndDebug(combustionModel, 0)
gradientEnergyCalculatedTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Namespace for OpenFOAM.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.