Loading...
Searching...
No Matches
fixedValueFaPatchField.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) 2016-2017 Wikki Ltd
9 Copyright (C) 2023-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
33template<class Type>
35(
36 const faPatch& p,
39:
40 faPatchField<Type>(p, iF)
41{}
42
43
44template<class Type>
46(
47 const faPatch& p,
49 const Type& value
51:
52 faPatchField<Type>(p, iF, value)
53{}
54
55
56template<class Type>
58(
59 const faPatch& p,
61 const dictionary& dict,
64:
65 faPatchField<Type>(p, iF, dict, requireValue)
66{}
67
68
69template<class Type>
71(
73 const faPatch& p,
75 const faPatchFieldMapper& mapper
77:
78 faPatchField<Type>(ptf, p, iF, mapper)
79{}
80
81
82template<class Type>
84(
86 const faPatch& p,
88 const Type& value
90:
91 faPatchField<Type>(pfld, p, iF, value)
92{}
93
94
95template<class Type>
97(
100)
101:
102 faPatchField<Type>(pfld, iF)
104
105
106// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
107
108template<class Type>
111(
112 const tmp<scalarField>&
113) const
114{
115 // No contribution from internal values
116 return tmp<Field<Type>>::New(this->size(), Foam::zero{});
117}
118
119
120template<class Type>
123(
124 const tmp<scalarField>&
125) const
127 return *this;
128}
129
130
131template<class Type>
135 return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs();
136}
137
138
139template<class Type>
142{
143 return this->patch().deltaCoeffs()*(*this);
144}
145
146
147template<class Type>
149{
152}
153
154
155// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
readOption
Enumeration defining read preferences.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
void size(const label n)
Definition UList.H:118
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const faPatch & patch() const noexcept
Return the patch.
A FieldMapper for finite-area patch fields.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
faPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &os) const
Write.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition faPatch.H:76
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
fixedValueFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
A traits class, which is primarily used for primitives and vector-space.
Definition pTraits.H:64
A class for managing temporary objects.
Definition tmp.H:75
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
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.
dictionary dict