Loading...
Searching...
No Matches
zeroValueFvPatchField.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) 2023-2025 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
30// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
31
32template<class Type>
34(
35 const fvPatch& p,
37)
39 // Field is zero
40 parent_bctype(p, iF, Type(Zero))
41{}
42
43
44template<class Type>
46(
47 const fvPatch& p,
49 const dictionary& dict
50)
51:
52 // Field is zero
53 parent_bctype(p, iF, Type(Zero))
54{
56}
57
58
59template<class Type>
61(
63 const fvPatch& p,
66)
68 // Field is zero. No mapping
69 parent_bctype(pfld, p, iF, Type(Zero))
70{}
71
72
73template<class Type>
75(
78)
79:
80 // Field is zero
81 parent_bctype(pfld, pfld.patch(), iF, Type(Zero))
82{}
83
84
85// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
86
87template<class Type>
90(
91 const tmp<scalarField>&
92) const
93{
94 // No contribution from internal values
95 return tmp<Field<Type>>::New(this->size(), Foam::zero{});
96}
97
98
99template<class Type>
102(
103 const tmp<scalarField>&
104) const
105{
106 // Patch field is zero
107 return tmp<Field<Type>>::New(this->size(), Foam::zero{});
108}
109
110
111template<class Type>
115 return -pTraits<Type>::one*this->patch().deltaCoeffs();
116}
117
118
119template<class Type>
123 // Patch field is zero
124 return tmp<Field<Type>>::New(this->size(), Foam::zero{});
125}
126
127
128template<class Type>
130{
132 // Without writeValueEntry() since the value == zero
133}
134
135
136// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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
virtual void readDict(const dictionary &dict)
Read dictionary entries.
const fvPatch & patch() const noexcept
Return the patch.
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
virtual void write(Ostream &) const
Write.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
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
Specifies a zero fixed value boundary condition.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patch...
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchFie...
virtual void write(Ostream &os) const
Write (without "value" entry).
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchFi...
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the evaluation of the value of this patchField...
zeroValueFvPatchField(const fvPatch &p, const DimensionedField< Type, volMesh > &iF)
Construct from patch and internal field.
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.
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
dictionary dict