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 and return a clone
100  virtual tmp<faPatchField<Type>> clone() const
101  {
102  return tmp<faPatchField<Type>>
103  (
105  );
106  }
107 
108  //- Construct as copy setting internal field reference
110  (
113  );
114 
115  //- Construct and return a clone setting internal field reference
117  (
119  ) const
120  {
121  return tmp<faPatchField<Type>>
122  (
124  );
125  }
126 
127 
128  // Member Functions
130  //- True: the patch field fixes a value.
131  virtual bool fixesValue() const { return true; }
132 
133 
134  // Evaluation functions
135 
136  //- Return the matrix diagonal coefficients corresponding to the
137  // evaluation of the value of this patchField with given weights
139  (
140  const tmp<scalarField>&
141  ) const;
142 
143  //- Return the matrix source coefficients corresponding to the
144  // evaluation of the value of this patchField with given weights
146  (
147  const tmp<scalarField>&
148  ) const;
149 
150  //- Return the matrix diagonal coefficients corresponding to the
151  // evaluation of the gradient of this patchField
152  virtual tmp<Field<Type>> gradientInternalCoeffs() const;
153 
154  //- Return the matrix source coefficients corresponding to the
155  // evaluation of the gradient of this patchField
156  virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
157 
158 
159  //- Write
160  virtual void write(Ostream&) const;
161 
162 
163  // Member operators
164 
165  virtual void operator=(const UList<Type>&) {}
166 
167  virtual void operator=(const faPatchField<Type>&) {}
168  virtual void operator+=(const faPatchField<Type>&) {}
169  virtual void operator-=(const faPatchField<Type>&) {}
170  virtual void operator*=(const faPatchField<scalar>&) {}
171  virtual void operator/=(const faPatchField<scalar>&) {}
172 
173  virtual void operator+=(const Field<Type>&) {}
174  virtual void operator-=(const Field<Type>&) {}
175 
176  virtual void operator*=(const Field<scalar>&) {}
177  virtual void operator/=(const Field<scalar>&) {}
178 
179  virtual void operator=(const Type&) {}
180  virtual void operator+=(const Type&) {}
181  virtual void operator-=(const Type&) {}
182  virtual void operator*=(const scalar) {}
183  virtual void operator/=(const scalar) {}
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #ifdef NoRepository
195 #endif
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 #endif
200 
201 // ************************************************************************* //
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:56
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.
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
Construct and return a clone.
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
virtual void operator-=(const faPatchField< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
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.