edgeNormalFixedValueFaPatchVectorField.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) 2016-2017 Wikki 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::edgeNormalFixedValueFaPatchVectorField
28 
29 Description
30  Edge normal fixed value vector field finite area boundary condition
31 
32  Describes a surface normal vector boundary condition by its magnitude.
33  Note: The value is positive for outward-pointing vectors
34 
35 Author
36  Zeljko Tukovic, FMENA
37  Hrvoje Jasak, Wikki Ltd.
38 
39 SourceFiles
40  edgeNormalFixedValueFaPatchVectorField.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef edgeNormalFixedValueFaPatchVectorField_H
45 #define edgeNormalFixedValueFaPatchVectorField_H
46 
47 #include "faPatchFields.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class edgeNormalFixedValueFaPatch Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 :
61  public fixedValueFaPatchVectorField
62 {
63  // Private Data
64 
65  //- Edge-normal velocity value
66  scalarField refValue_;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("edgeNormalFixedValue");
73 
74 
75  // Constructors
76 
77  //- Construct from patch and internal field
79  (
80  const faPatch&,
82  );
83 
84  //- Construct from patch, internal field and reference value
86  (
87  const faPatch&,
89  const scalar refValue
90  );
91 
92  //- Construct from patch, internal field and dictionary
94  (
95  const faPatch&,
97  const dictionary&
98  );
99 
100  //- Construct by mapping given edgeNormalFixedValueFaPatchVectorField
101  //- onto a new patch
103  (
105  const faPatch&,
107  const faPatchFieldMapper&
108  );
109 
110  //- Construct as copy
112  (
114  );
115 
116  //- Construct as copy setting internal field reference
118  (
121  );
122 
123  //- Return clone
124  virtual tmp<faPatchField<vector>> clone() const
125  {
126  return faPatchField<vector>::Clone(*this);
127  }
128 
129  //- Clone with an internal field reference
131  (
133  ) const
134  {
135  return faPatchField<vector>::Clone(*this, iF);
136  }
138 
139  // Member functions
140 
141  // Mapping functions
142 
143  //- Map (and resize as needed) from self given a mapping object
144  virtual void autoMap
145  (
147  );
148 
149  //- Reverse map the given faPatchField onto this faPatchField
150  virtual void rmap
151  (
152  const faPatchVectorField&,
153  const labelList&
154  );
155 
156 
157  // Member functions
158 
159  //- Update the coefficients associated with the patch field
160  virtual void updateCoeffs();
161 
162  //- Write includes "value" entry
163  virtual void write(Ostream&) const;
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace Foam
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Edge normal fixed value vector field finite area boundary condition.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
Definition: areaFieldsFwd.H:46
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const faPatchVectorField &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
Declarations for faPatchField types.
TypeName("edgeNormalFixedValue")
Runtime type information.
virtual tmp< faPatchField< vector > > clone() const
Return clone.
edgeNormalFixedValueFaPatchVectorField(const faPatch &, const DimensionedField< vector, areaMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
static tmp< faPatchField< Type > > Clone(const DerivedPatchField &pf)
Clone a patch field with its own internal field reference.
Definition: faPatchField.H:513
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
virtual void write(Ostream &) const
Write includes "value" entry.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
A FieldMapper for finite-area patch fields.
Namespace for OpenFOAM.