symmetryPlaneFvPatchField.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 | Copyright (C) 2013 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::symmetryPlaneFvPatchField
26 
27 Group
28  grpConstraintBoundaryConditions
29 
30 Description
31  This boundary condition enforces a symmetryPlane constraint
32 
33  \heading Patch usage
34 
35  Example of the boundary condition specification:
36  \verbatim
37  myPatch
38  {
39  type symmetryPlane;
40  }
41  \endverbatim
42 
43 SourceFiles
44  symmetryPlaneFvPatchField.C
45  symmetryPlaneFvPatchFields.C
46  symmetryPlaneFvPatchFields.H
47  symmetryPlaneFvPatchFieldsFwd.H
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef symmetryPlaneFvPatchField_H
52 #define symmetryPlaneFvPatchField_H
53 
55 #include "symmetryPlaneFvPatch.H"
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class symmetryPlaneFvPatchField Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 template<class Type>
68 :
69  public basicSymmetryFvPatchField<Type>
70 {
71  // Private data
72 
73  //- Local reference cast into the symmetryPlane patch
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName(symmetryPlaneFvPatch::typeName_());
81 
82 
83  // Constructors
84 
85  //- Construct from patch and internal field
87  (
88  const fvPatch&,
90  );
91 
92  //- Construct from patch, internal field and dictionary
94  (
95  const fvPatch&,
97  const dictionary&
98  );
99 
100  //- Construct by mapping given symmetryPlaneFvPatchField
101  // onto a new patch
103  (
105  const fvPatch&,
107  const fvPatchFieldMapper&
108  );
109 
110  //- Construct as copy
112  (
114  );
115 
116  //- Construct and return a clone
117  virtual tmp<fvPatchField<Type> > clone() const
118  {
119  return tmp<fvPatchField<Type> >
120  (
122  );
123  }
124 
125  //- Construct as copy setting internal field reference
127  (
130  );
131 
132  //- Construct and return a clone setting internal field reference
134  (
136  ) const
137  {
138  return tmp<fvPatchField<Type> >
139  (
140  new symmetryPlaneFvPatchField<Type>(*this, iF)
141  );
142  }
143 
144 
145  // Member functions
146 
147  // Evaluation functions
148 
149  //- Return gradient at boundary
150  virtual tmp<Field<Type> > snGrad() const;
151 
152  //- Evaluate the patch field
153  virtual void evaluate
154  (
155  const Pstream::commsTypes commsType=Pstream::blocking
156  );
157 
158  //- Return face-gradient transform diagonal
159  virtual tmp<Field<Type> > snGradTransformDiag() const;
160 };
161 
162 
163 // * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
164 
165 template<>
166 tmp<scalarField> symmetryPlaneFvPatchField<scalar>::snGrad() const;
167 
168 template<>
170 (
171  const Pstream::commsTypes commsType
172 );
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #ifdef NoRepository
182 # include "symmetryPlaneFvPatchField.C"
183 #endif
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
Foam::symmetryPlaneFvPatchField::symmetryPlaneFvPatchField
symmetryPlaneFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: symmetryPlaneFvPatchField.C:33
Foam::symmetryPlaneFvPatch
Symmetry-plane patch.
Definition: symmetryPlaneFvPatch.H:49
Foam::symmetryPlaneFvPatchField::snGrad
virtual tmp< Field< Type > > snGrad() const
Return gradient at boundary.
Definition: symmetryPlaneFvPatchField.C:120
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::symmetryPlaneFvPatchField::evaluate
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::blocking)
Evaluate the patch field.
Definition: symmetryPlaneFvPatchField.C:133
Foam::symmetryPlaneFvPatchField::symmetryPlanePatch_
const symmetryPlaneFvPatch & symmetryPlanePatch_
Local reference cast into the symmetryPlane patch.
Definition: symmetryPlaneFvPatchField.H:73
Foam::symmetryPlaneFvPatchField::snGradTransformDiag
virtual tmp< Field< Type > > snGradTransformDiag() const
Return face-gradient transform diagonal.
Definition: symmetryPlaneFvPatchField.C:155
Foam::basicSymmetryFvPatchField
A symmetry patch.
Definition: basicSymmetryFvPatchField.H:53
symmetryPlaneFvPatch.H
Foam::UPstream::blocking
@ blocking
Definition: UPstream.H:66
symmetryPlaneFvPatchField.C
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::symmetryPlaneFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: symmetryPlaneFvPatchField.H:116
basicSymmetryFvPatchField.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:64
Foam::symmetryPlaneFvPatchField::TypeName
TypeName(symmetryPlaneFvPatch::typeName_())
Runtime type information.
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::symmetryPlaneFvPatchField
This boundary condition enforces a symmetryPlane constraint.
Definition: symmetryPlaneFvPatchField.H:66
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51