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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2019 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
29 #include "fvPatchFieldMapper.H"
30 #include "volFields.H"
32 
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34 
36 (
37  const fvPatch& p,
39 )
40 :
41  fixedValueFvPatchScalarField(p, iF),
42  sourceFieldName_("default")
43 {}
44 
45 
47 (
48  const fvPatch& p,
50  const dictionary& dict
51 )
52 :
53  fixedValueFvPatchScalarField(p, iF, dict),
54  sourceFieldName_(dict.lookup("sourceFieldName"))
55 {}
56 
57 
59 (
61  const fvPatch& p,
63  const fvPatchFieldMapper& mapper
64 )
65 :
66  fixedValueFvPatchScalarField(ptf, p, iF, mapper),
67  sourceFieldName_(ptf.sourceFieldName_)
68 {}
69 
70 
72 (
74 )
75 :
76  fixedValueFvPatchScalarField(awfpsf),
77  sourceFieldName_(awfpsf.sourceFieldName_)
78 {}
79 
80 
82 (
85 )
86 :
87  fixedValueFvPatchScalarField(awfpsf, iF),
88  sourceFieldName_(awfpsf.sourceFieldName_)
89 {}
90 
91 
92 
93 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
94 
96 {
97  if (this->updated())
98  {
99  return;
100  }
101 
102  operator==
103  (
104  patch().lookupPatchField<volScalarField, scalar>(sourceFieldName_)
105  );
106 
107  fixedValueFvPatchScalarField::updateCoeffs();
108 }
109 
110 
112 {
114  os.writeEntry("sourceFieldName", sourceFieldName_);
115  writeEntry("value", os);
116 }
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 namespace Foam
122 {
124  (
127  );
128 }
129 
130 
131 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: volSurfaceMapping.H:51
volFields.H
Foam::fvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:384
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::copiedFixedValueFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: copiedFixedValueFvPatchScalarField.C:95
fvPatchFieldMapper.H
Foam::copiedFixedValueFvPatchScalarField::sourceFieldName_
word sourceFieldName_
Name of the source field.
Definition: copiedFixedValueFvPatchScalarField.H:105
Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
copiedFixedValueFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: copiedFixedValueFvPatchScalarField.C:36
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::copiedFixedValueFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: copiedFixedValueFvPatchScalarField.C:111
copiedFixedValueFvPatchScalarField.H
Foam::copiedFixedValueFvPatchScalarField
Copies the boundary values from a user specified field.
Definition: copiedFixedValueFvPatchScalarField.H:96
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
Foam::Ostream::writeEntry
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Definition: Ostream.H:236
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::makePatchTypeField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54