fixedValueOutflowFaPatchField.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::fixedValueOutflowFaPatchField
28 
29 Description
30 
31 Author
32  Zeljko Tukovic, FMENA
33  Hrvoje Jasak, Wikki Ltd.
34 
35 SourceFiles
36  fixedValueOutflowFaPatchField.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef fixedValueOutflowFaPatchField_H
41 #define fixedValueOutflowFaPatchField_H
42 
43 #include "faPatchField.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class fixedValueOutflowFaPatch Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class Type>
56 :
57  public faPatchField<Type>
58 {
59 public:
60 
61  //- Runtime type information
62  TypeName("fixedValueOutflow");
63 
64 
65  // Constructors
66 
67  //- Construct from patch and internal field
69  (
70  const faPatch&,
72  );
73 
74  //- Construct from patch, internal field and dictionary
75  // The "value" entry: MUST_READ
77  (
78  const faPatch&,
80  const dictionary&
81  );
82 
83  //- Construct by mapping the given fixedValueOutflow patch field
84  //- onto a new patch
86  (
88  const faPatch&,
90  const faPatchFieldMapper&
91  );
92 
93  //- Construct as copy
95  (
97  );
98 
99  //- Construct as copy setting internal field reference
101  (
104  );
105 
106  //- Return clone
107  virtual tmp<faPatchField<Type>> clone() const
108  {
109  return faPatchField<Type>::Clone(*this);
110  }
111 
112  //- Clone with an internal field reference
114  (
116  ) const
117  {
118  return faPatchField<Type>::Clone(*this, iF);
119  }
120 
121 
122  // Member Functions
123 
124  //- True: the patch field fixes a value.
125  virtual bool fixesValue() const { return true; }
127 
128  // Evaluation functions
129 
130  //- Return the matrix diagonal coefficients corresponding to the
131  // evaluation of the value of this patchField with given weights
133  (
134  const tmp<scalarField>&
135  ) const;
136 
137  //- Return the matrix source coefficients corresponding to the
138  // evaluation of the value of this patchField with given weights
140  (
141  const tmp<scalarField>&
142  ) const;
143 
144  //- Return the matrix diagonal coefficients corresponding to the
145  // evaluation of the gradient of this patchField
146  virtual tmp<Field<Type>> gradientInternalCoeffs() const;
147 
148  //- Return the matrix source coefficients corresponding to the
149  // evaluation of the gradient of this patchField
150  virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
151 
152 
153  //- Write includes "value" entry
154  virtual void write(Ostream&) const;
155 
156 
157  // Member Operators
158 
159  virtual void operator=(const UList<Type>&) {}
160 
161  virtual void operator=(const faPatchField<Type>&) {}
162  virtual void operator+=(const faPatchField<Type>&) {}
163  virtual void operator-=(const faPatchField<Type>&) {}
164  virtual void operator*=(const faPatchField<scalar>&) {}
165  virtual void operator/=(const faPatchField<scalar>&) {}
166 
167  virtual void operator+=(const Field<Type>&) {}
168  virtual void operator-=(const Field<Type>&) {}
169 
170  virtual void operator*=(const Field<scalar>&) {}
171  virtual void operator/=(const Field<scalar>&) {}
172 
173  virtual void operator=(const Type&) {}
174  virtual void operator+=(const Type&) {}
175  virtual void operator-=(const Type&) {}
176  virtual void operator*=(const scalar) {}
177  virtual void operator/=(const scalar) {}
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #ifdef NoRepository
189 #endif
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 #endif
194 
195 // ************************************************************************* //
virtual void operator+=(const faPatchField< Type > &)
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
TypeName("fixedValueOutflow")
Runtime type information.
virtual bool fixesValue() const
True: the patch field fixes a value.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
Definition: areaFieldsFwd.H:46
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
virtual void operator=(const UList< Type > &)
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
virtual void write(Ostream &) const
Write includes "value" entry.
fixedValueOutflowFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
virtual void operator*=(const faPatchField< scalar > &)
virtual tmp< faPatchField< Type > > clone() const
Return clone.
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 operator-=(const faPatchField< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void operator/=(const faPatchField< scalar > &)
A class for managing temporary objects.
Definition: HashPtrTable.H:50
A FieldMapper for finite-area patch fields.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
Namespace for OpenFOAM.