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 and return a clone
117  virtual tmp<faPatchVectorField> clone() const
118  {
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  {
139  (
141  (
142  *this,
143  iF
144  )
145  );
146  }
147 
148 
150  // Member functions
151 
152  // Mapping functions
153 
154  //- Map (and resize as needed) from self given a mapping object
155  virtual void autoMap
156  (
157  const faPatchFieldMapper&
158  );
159 
160  //- Reverse map the given faPatchField onto this faPatchField
161  virtual void rmap
162  (
163  const faPatchVectorField&,
164  const labelList&
165  );
166 
167 
168  // Member functions
169 
170  //- Update the coefficients associated with the patch field
171  virtual void updateCoeffs();
172 
173  //- Write
174  virtual void write(Ostream&) const;
175 };
176 
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 } // End namespace Foam
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
virtual tmp< faPatchVectorField > clone() const
Construct and return a clone.
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:56
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.
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
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
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.