Loading...
Searching...
No Matches
exprValuePointPatchField.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) 2019-2021 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
26Class
27 Foam::exprValuePointPatchField
28
29Description
30 A fixed value point boundary condition with expressions.
31
32Usage
33 \table
34 Property | Description | Required | Default
35 valueExpr | expression for uniformValue | yes |
36 value | initial field value | optional |
37 \endtable
38
39 The \c value entry (optional) is used for the initial values.
40 Otherwise uses zero-gradient values.
41
42SourceFiles
43 exprValuePointPatchField.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef Foam_exprValuePointPatchField_H
48#define Foam_exprValuePointPatchField_H
49
51#include "patchExprFieldBase.H"
52#include "patchExprDriver.H"
53
54// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56namespace Foam
57{
58
59/*---------------------------------------------------------------------------*\
60 Class exprValuePointPatchField Declaration
61\*---------------------------------------------------------------------------*/
62
63template<class Type>
65:
66 public valuePointPatchField<Type>,
68{
69 //- The parent boundary condition type
70 typedef valuePointPatchField<Type> parent_bctype;
71
72
73protected:
75 // Protected Data
76
77 //- Dictionary contents for the boundary condition
79
80 //- The expression driver
82
83
84public:
85
86 //- Runtime type information
87 TypeName("exprValue");
88
89
90 // Constructors
91
92 //- Construct from patch and internal field
94 (
95 const pointPatch&,
97 );
98
99 //- Construct from patch, internal field and dictionary
101 (
102 const pointPatch&,
104 const dictionary&
105 );
106
107 //- Construct by mapping onto a new patch
109 (
111 const pointPatch&,
114 );
115
116 //- Construct as copy setting internal field reference
118 (
121 );
122
123 //- Construct as copy
125 (
127 );
128
129 //- Return a clone
130 virtual autoPtr<pointPatchField<Type>> clone() const
131 {
132 return pointPatchField<Type>::Clone(*this);
133 }
134
135 //- Construct and return a clone setting internal field reference
137 (
139 ) const
140 {
141 return pointPatchField<Type>::Clone(*this, iF);
142 }
143
144
145 // Member Functions
146
147 //- Update the patch field
148 virtual void updateCoeffs();
149
150 //- Write
151 virtual void write(Ostream& os) const;
152};
153
154
155// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156
157} // End namespace Foam
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161#ifdef NoRepository
163#endif
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#endif
169// ************************************************************************* //
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
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
A fixed value point boundary condition with expressions.
TypeName("exprValue")
Runtime type information.
dictionary dict_
Dictionary contents for the boundary condition.
expressions::patchExpr::parseDriver driver_
The expression driver.
exprValuePointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
virtual autoPtr< pointPatchField< Type > > clone(const DimensionedField< Type, pointMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void updateCoeffs()
Update the patch field.
virtual autoPtr< pointPatchField< Type > > clone() const
Return a clone.
Base class for managing patches with expressions. The expected input supports value,...
Foam::pointPatchFieldMapper.
static autoPtr< pointPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Basic pointPatch represents a set of points from the mesh.
Definition pointPatch.H:67
Foam::valuePointPatchField.
valuePointPatchField(const valuePointPatchField &)=default
Copy construct.
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