fixedValueFvsPatchField.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2024 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
30 
31 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32 
33 template<class Type>
35 (
36  const fvPatch& p,
38 )
39 :
40  fvsPatchField<Type>(p, iF)
41 {}
42 
43 
44 template<class Type>
46 (
47  const fvPatch& p,
49  const Type& value
50 )
51 :
52  fvsPatchField<Type>(p, iF, value)
53 {}
54 
55 
56 template<class Type>
58 (
59  const fvPatch& p,
61  const dictionary& dict,
62  IOobjectOption::readOption requireValue
63 )
64 :
65  fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
66 {}
67 
68 
69 template<class Type>
71 (
73  const fvPatch& p,
75  const fvPatchFieldMapper& mapper
76 )
77 :
78  fvsPatchField<Type>(ptf, p, iF, mapper)
79 {}
80 
81 
82 template<class Type>
84 (
87 )
88 :
89  fvsPatchField<Type>(ptf, iF)
90 {}
91 
92 
93 template<class Type>
95 (
97 )
98 :
99  fixedValueFvsPatchField<Type>(ptf, ptf.internalField())
100 {}
102 
103 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
104 
105 template<class Type>
108 (
109  const tmp<scalarField>&
110 ) const
111 {
112  return tmp<Field<Type>>::New(this->size(), Foam::zero{});
113 }
114 
115 
116 template<class Type>
119 (
120  const tmp<scalarField>&
121 ) const
122 {
123  return *this;
124 }
125 
126 
127 template<class Type>
130 {
131  return -pTraits<Type>::one*this->patch().deltaCoeffs();
132 }
133 
134 
135 template<class Type>
138 {
139  return this->patch().deltaCoeffs()*(*this);
140 }
141 
142 
143 template<class Type>
145 {
148 }
149 
150 
151 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
A traits class, which is primarily used for primitives and vector-space.
Definition: pTraits.H:75
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
virtual void write(Ostream &) const
Write includes "value" entry.
fixedValueFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
OBJstream os(runTime.globalPath()/outputName)
virtual void write(Ostream &os) const
Write the patch "type".
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:57
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
volScalarField & p
A class for managing temporary objects.
Definition: HashPtrTable.H:50
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
readOption
Enumeration defining read preferences.