symmetryFvsPatchField.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2024 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 Class
28  Foam::symmetryFvsPatchField
29 
30 Description
31  This boundary condition enforces a symmetry constraint
32 
33  The "value" entry is MUST_READ.
34 
35 Usage
36  Example of the boundary condition specification:
37  \verbatim
38  <patchName>
39  {
40  type symmetry;
41  value ...;
42  }
43  \endverbatim
44 
45 SourceFiles
46  symmetryFvsPatchField.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef Foam_symmetryFvsPatchField_H
51 #define Foam_symmetryFvsPatchField_H
52 
53 #include "fvsPatchField.H"
54 #include "symmetryFvPatch.H"
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class symmetryFvsPatch Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 template<class Type>
67 :
68  public fvsPatchField<Type>
69 {
70 public:
71 
72  //- Runtime type information
73  TypeName(symmetryFvPatch::typeName_());
74 
75 
76  // Constructors
77 
78  //- Construct from patch and internal field
80  (
81  const fvPatch&,
83  );
84 
85  //- Construct from patch, internal field and dictionary
86  //- The "value" entry is MUST_READ.
88  (
89  const fvPatch&,
91  const dictionary&
92  );
93 
94  //- Construct by mapping given symmetryFvsPatchField onto a new patch
96  (
98  const fvPatch&,
100  const fvPatchFieldMapper&
101  );
102 
103  //- Construct as copy
105  (
107  );
108 
109  //- Construct as copy setting internal field reference
111  (
114  );
115 
116  //- Return clone
117  virtual tmp<fvsPatchField<Type>> clone() const
118  {
119  return fvsPatchField<Type>::Clone(*this);
120  }
121 
122  //- Clone with an internal field reference
124  (
126  ) const
127  {
128  return fvsPatchField<Type>::Clone(*this, iF);
129  }
130 
131 
132  // Member Functions
133 
134  //- Write includes "value" entry
135  virtual void write(Ostream&) const;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #ifdef NoRepository
146  #include "symmetryFvsPatchField.C"
147 #endif
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
static tmp< fvsPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
This boundary condition enforces a symmetry constraint.
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
virtual void write(Ostream &) const
Write includes "value" entry.
TypeName(symmetryFvPatch::typeName_())
Runtime type information.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
symmetryFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual tmp< fvsPatchField< Type > > clone() const
Return clone.
Namespace for OpenFOAM.