copiedFixedValueFvPatchScalarField.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 | Copyright (C) 2015 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 #include "fvPatchFieldMapper.H"
28 #include "volFields.H"
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
34 (
35  const fvPatch& p,
36  const DimensionedField<scalar, volMesh>& iF
37 )
38 :
39  fixedValueFvPatchScalarField(p, iF),
40  sourceFieldName_("default")
41 {}
42 
43 
45 (
46  const fvPatch& p,
47  const DimensionedField<scalar, volMesh>& iF,
48  const dictionary& dict
49 )
50 :
51  fixedValueFvPatchScalarField(p, iF, dict),
52  sourceFieldName_(dict.lookup("sourceFieldName"))
53 {}
54 
55 
57 (
58  const copiedFixedValueFvPatchScalarField& ptf,
59  const fvPatch& p,
60  const DimensionedField<scalar, volMesh>& iF,
61  const fvPatchFieldMapper& mapper
62 )
63 :
64  fixedValueFvPatchScalarField(ptf, p, iF, mapper),
65  sourceFieldName_(ptf.sourceFieldName_)
66 {}
67 
68 
70 (
71  const copiedFixedValueFvPatchScalarField& awfpsf
72 )
73 :
74  fixedValueFvPatchScalarField(awfpsf),
75  sourceFieldName_(awfpsf.sourceFieldName_)
76 {}
77 
78 
80 (
81  const copiedFixedValueFvPatchScalarField& awfpsf,
82  const DimensionedField<scalar, volMesh>& iF
83 )
84 :
85  fixedValueFvPatchScalarField(awfpsf, iF),
86  sourceFieldName_(awfpsf.sourceFieldName_)
87 {}
88 
89 
90 
91 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
92 
94 {
95  if (this->updated())
96  {
97  return;
98  }
99 
100  operator==
101  (
102  patch().lookupPatchField<volScalarField, scalar>(sourceFieldName_)
103  );
104 
105  fixedValueFvPatchScalarField::updateCoeffs();
106 }
107 
108 
110 {
112  os.writeKeyword("sourceFieldName")
113  << sourceFieldName_ << token::END_STATEMENT << nl;
114  writeEntry("value", os);
115 }
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 namespace Foam
121 {
123  (
125  copiedFixedValueFvPatchScalarField
126  );
127 }
128 
129 
130 // ************************************************************************* //
dictionary dict
copiedFixedValueFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
stressControl lookup("compactNormalStress") >> compactNormalStress
fvPatchField< scalar > fvPatchScalarField
static const char nl
Definition: Ostream.H:262
volScalarField & p
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)
Namespace for OpenFOAM.
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:363