Loading...
Searching...
No Matches
zeroValuePointPatchField.H
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) 2014 OpenFOAM Foundation
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
27Class
28 Foam::zeroValuePointPatchField
29
30Description
31 Specifies a zero fixed value boundary condition
32
33 Example of the boundary condition specification:
34 \verbatim
35 inlet
36 {
37 type zeroValue;
38 }
39 \endverbatim
40
41SourceFiles
42 zeroValuePointPatchField.C
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef Foam_zeroValuePointPatchField_H
47#define Foam_zeroValuePointPatchField_H
48
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56/*---------------------------------------------------------------------------*\
57 Class zeroValuePointPatchField Declaration
58\*---------------------------------------------------------------------------*/
59
60template<class Type>
62:
63 public fixedValuePointPatchField<Type>
64{
65 //- The parent boundary condition type
66 typedef fixedValuePointPatchField<Type> parent_bctype;
67
68public:
69
70 //- Runtime type information
71 TypeName("zeroValue");
72
73
74 // Constructors
75
76 //- Construct from patch and internal field
78 (
79 const pointPatch&,
81 );
82
83 //- Construct from patch, internal field and dictionary
85 (
86 const pointPatch&,
88 const dictionary&
89 );
90
91 //- Copy construct onto a new patch
93 (
95 const pointPatch& p,
98 );
99
100 //- Copy construct with internal field reference
102 (
105 );
106
107 //- Copy construct
109 :
110 zeroValuePointPatchField<Type>(pfld, pfld.internalField())
111 {}
112
113
114 //- Return a clone
115 virtual autoPtr<pointPatchField<Type>> clone() const
116 {
118 }
119
120 //- Construct and return a clone setting internal field reference
122 (
124 ) const
125 {
127 }
128
129
130 // Member Functions
131
132 //- True: this patch field fixes a value.
133 virtual bool fixesValue() const { return true; }
135 //- False: this patch field is not altered by assignment.
136 virtual bool assignable() const { return false; }
137
138 //- Write (without "value" entry)
139 virtual void write(Ostream& os) const;
140
141
142 // Member Operators
143
144 // Disable assignment operators
145 virtual void operator=(const valuePointPatchField<Type>&) {}
146 virtual void operator=(const pointPatchField<Type>&) {}
147 virtual void operator=(const Field<Type>&) {}
148 virtual void operator=(const Type&) {}
149
150 // Disable forced assignment operators
151 virtual void operator==(const valuePointPatchField<Type>&) {}
152 virtual void operator==(const pointPatchField<Type>&) {}
153 virtual void operator==(const Field<Type>&) {}
154 virtual void operator==(const Type&) {}
155
156 // Prevent automatic comparison rewriting (c++20)
157 bool operator!=(const valuePointPatchField<Type>&) const = delete;
158 bool operator!=(const pointPatchField<Type>&) const = delete;
159 bool operator!=(const Field<Type>&) const = delete;
160 bool operator!=(const Type&) const = delete;
161};
162
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166} // End namespace Foam
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#ifdef NoRepository
172#endif
174// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175
176#endif
178// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
constexpr Field() noexcept
Default construct.
Definition FieldI.H:24
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
fixedValuePointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Foam::pointPatchFieldMapper.
Abstract base class for point-mesh patch fields.
static autoPtr< pointPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
const DimensionedField< Type, pointMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Basic pointPatch represents a set of points from the mesh.
Definition pointPatch.H:67
Foam::valuePointPatchField.
valuePointPatchField(const valuePointPatchField &)=default
Copy construct.
virtual bool fixesValue() const
True: this patch field fixes a value.
virtual void operator==(const pointPatchField< Type > &)
TypeName("zeroValue")
Runtime type information.
virtual void operator==(const Type &)
virtual void operator=(const pointPatchField< Type > &)
zeroValuePointPatchField(const zeroValuePointPatchField< Type > &pfld)
Copy construct.
zeroValuePointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
virtual void operator==(const valuePointPatchField< Type > &)
bool operator!=(const valuePointPatchField< Type > &) const =delete
virtual autoPtr< pointPatchField< Type > > clone(const DimensionedField< Type, pointMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void operator==(const Field< Type > &)
bool operator!=(const Field< Type > &) const =delete
bool operator!=(const Type &) const =delete
virtual bool assignable() const
False: this patch field is not altered by assignment.
virtual autoPtr< pointPatchField< Type > > clone() const
Return a clone.
virtual void operator=(const valuePointPatchField< Type > &)
virtual void operator=(const Field< Type > &)
bool operator!=(const pointPatchField< Type > &) const =delete
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68