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 -------------------------------------------------------------------------------
10 License
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 Class
27  Foam::exprValuePointPatchField
28 
29 Description
30  A fixed value point boundary condition with expressions.
31 
32 Usage
33  \table
34  Property | Description | Required | Default
35  value | fixed value | yes |
36  valueExpr | expression for uniformValue | yes |
37  \endtable
38 
39 SourceFiles
40  exprValuePointPatchField.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef exprValuePointPatchField_H
45 #define exprValuePointPatchField_H
46 
47 #include "valuePointPatchField.H"
48 #include "patchExprFieldBase.H"
49 #include "patchExprDriver.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class exprValuePointPatchField Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class Type>
61 class exprValuePointPatchField
62 :
63  public valuePointPatchField<Type>,
64  public expressions::patchExprFieldBase
65 {
66  //- The parent boundary condition type
67  typedef valuePointPatchField<Type> parent_bctype;
68 
69 
70 protected:
71 
72  // Protected Data
73 
74  //- Dictionary contents for the boundary condition
76 
77  //- The expression driver
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("exprValue");
85 
86 
87  // Constructors
88 
89  //- Construct from patch and internal field
91  (
92  const pointPatch&,
94  );
95 
96  //- Construct from patch, internal field and dictionary
98  (
99  const pointPatch&,
101  const dictionary&
102  );
103 
104  //- Construct by mapping onto a new patch
106  (
108  const pointPatch&,
110  const pointPatchFieldMapper&
111  );
112 
113  //- Construct as copy setting internal field reference
115  (
118  );
119 
120  //- Construct as copy
122  (
124  );
125 
126 
127  //- Construct and return a clone
128  virtual autoPtr<pointPatchField<Type>> clone() const
129  {
131  (
133  (
134  *this
135  )
136  );
137  }
138 
139  //- Construct and return a clone setting internal field reference
141  (
143  ) const
144  {
146  (
148  (
149  *this,
150  iF
151  )
152  );
153  }
154 
155 
156  // Member Functions
157 
158  //- Update the patch field
159  virtual void updateCoeffs();
160 
161  //- Write
162  virtual void write(Ostream& os) const;
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #ifdef NoRepository
173 # include "exprValuePointPatchField.C"
174 #endif
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #endif
179 
180 // ************************************************************************* //
Foam::exprValuePointPatchField::dict_
dictionary dict_
Definition: exprValuePointPatchField.H:85
Foam::exprValuePointPatchField::TypeName
TypeName("exprValue")
patchExprDriver.H
Foam::pointPatch
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:54
exprValuePointPatchField.C
Foam::pointPatchFieldMapper
Foam::pointPatchFieldMapper.
Definition: pointPatchFieldMapper.H:42
patchExprFieldBase.H
valuePointPatchField.H
Foam::expressions::patchExprFieldBase
Base class for managing patches with expressions. The expected input supports value,...
Definition: patchExprFieldBase.H:79
Foam::exprValuePointPatchField::clone
virtual autoPtr< pointPatchField< Type > > clone() const
Definition: exprValuePointPatchField.H:138
Foam::exprValuePointPatchField::write
virtual void write(Ostream &os) const
Definition: exprValuePointPatchField.C:234
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:119
Foam::exprValuePointPatchField::driver_
expressions::patchExpr::parseDriver driver_
Definition: exprValuePointPatchField.H:88
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Definition: atmBoundaryLayer.C:26
Foam::expressions::patchExpr::parseDriver
Driver for patch expressions.
Definition: patchExprDriver.H:155
Foam::exprValuePointPatchField::exprValuePointPatchField
exprValuePointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Definition: exprValuePointPatchField.C:31
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:49
Foam::valuePointPatchField
Foam::valuePointPatchField.
Definition: valuePointPatchField.H:48
Foam::exprValuePointPatchField::updateCoeffs
virtual void updateCoeffs()
Definition: exprValuePointPatchField.C:192
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:52
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:50
Foam::exprValuePointPatchField
A fixed value point boundary condition with expressions.
Definition: exprValuePointPatchField.H:71