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  //- Surface-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 dictionary
86  (
87  const faPatch&,
89  const dictionary&
90  );
91 
92  //- Construct by mapping given
93  // edgeNormalFixedValueFaPatchVectorField
94  // onto a new patch
96  (
98  const faPatch&,
100  const faPatchFieldMapper&
101  );
102 
103  //- Construct as copy
105  (
107  );
108 
109  //- Construct and return a clone
110  virtual tmp<faPatchVectorField> clone() const
111  {
113  (
115  );
116  }
117 
118  //- Construct as copy setting internal field reference
120  (
123  );
124 
125  //- Construct and return a clone setting internal field reference
127  (
129  ) const
130  {
132  (
134  (
135  *this,
136  iF
137  )
138  );
139  }
140 
141 
142 
143  // Member functions
144 
145  // Mapping functions
146 
147  //- Map (and resize as needed) from self given a mapping object
148  virtual void autoMap
149  (
150  const faPatchFieldMapper&
151  );
152 
153  //- Reverse map the given faPatchField onto this faPatchField
154  virtual void rmap
155  (
156  const faPatchVectorField&,
157  const labelList&
158  );
159 
160 
161  // Member functions
162 
163  //- Update the coefficients associated with the patch field
164  virtual void updateCoeffs();
165 
166  //- Write
167  virtual void write(Ostream&) const;
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
Foam::faPatchField
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
Definition: areaFieldsFwd.H:50
Foam::edgeNormalFixedValueFaPatchVectorField::rmap
virtual void rmap(const faPatchVectorField &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
Definition: edgeNormalFixedValueFaPatchVectorField.C:110
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::edgeNormalFixedValueFaPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: edgeNormalFixedValueFaPatchVectorField.C:135
Foam::faPatchFieldMapper
Definition: faPatchFieldMapper.H:44
Foam::edgeNormalFixedValueFaPatchVectorField::clone
virtual tmp< faPatchVectorField > clone() const
Construct and return a clone.
Definition: edgeNormalFixedValueFaPatchVectorField.H:109
Foam::Field< scalar >
fixedValueFaPatchFields.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::edgeNormalFixedValueFaPatchVectorField::TypeName
TypeName("edgeNormalFixedValue")
Runtime type information.
Foam::edgeNormalFixedValueFaPatchVectorField::autoMap
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: edgeNormalFixedValueFaPatchVectorField.C:100
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::List< label >
faPatchFields.H
Foam::edgeNormalFixedValueFaPatchVectorField
Edge normal fixed value vector field finite area boundary condition.
Definition: edgeNormalFixedValueFaPatchVectorField.H:58
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::faPatch
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:69
Foam::edgeNormalFixedValueFaPatchVectorField::edgeNormalFixedValueFaPatchVectorField
edgeNormalFixedValueFaPatchVectorField(const faPatch &, const DimensionedField< vector, areaMesh > &)
Construct from patch and internal field.
Definition: edgeNormalFixedValueFaPatchVectorField.C:37
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::edgeNormalFixedValueFaPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: edgeNormalFixedValueFaPatchVectorField.C:124