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.txx
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_fixedValueOutflowFaPatchField_H
41 #define Foam_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 {
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("fixedValueOutflow");
66 
67 
68  // Constructors
69 
70  //- Construct from patch and internal field
72  (
73  const faPatch&,
75  );
76 
77  //- Construct from patch, internal field and dictionary
78  // The "value" entry: MUST_READ
80  (
81  const faPatch&,
83  const dictionary&
84  );
85 
86  //- Construct by mapping onto a new patch
88  (
89  const this_bctype&,
90  const faPatch&,
92  const faPatchFieldMapper&
93  );
94 
95  //- Construct as copy setting internal field reference
97  (
98  const this_bctype&,
100  );
101 
102  //- No copy without an internal field
104 
105  //- Clone with an internal field reference
107  (
109  ) const
110  {
111  return faPatchField<Type>::Clone(*this, iF);
112  }
113 
114 
115  // Member Functions
116 
117  //- True: the patch field fixes a value.
118  virtual bool fixesValue() const { return true; }
119 
120 
121  // Evaluation functions
122 
123  //- Return the matrix diagonal coefficients corresponding to the
124  // evaluation of the value of this patchField with given weights
126  (
127  const tmp<scalarField>&
128  ) const;
129 
130  //- Return the matrix source 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 diagonal coefficients corresponding to the
138  // evaluation of the gradient of this patchField
139  virtual tmp<Field<Type>> gradientInternalCoeffs() const;
140 
141  //- Return the matrix source coefficients corresponding to the
142  // evaluation of the gradient of this patchField
143  virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
144 
145 
146  //- Write includes "value" entry
147  virtual void write(Ostream&) const;
148 
149 
150  // Member Operators
151 
152  virtual void operator=(const UList<Type>&) {}
153 
154  virtual void operator=(const faPatchField<Type>&) {}
155  virtual void operator+=(const faPatchField<Type>&) {}
156  virtual void operator-=(const faPatchField<Type>&) {}
157  virtual void operator*=(const faPatchField<scalar>&) {}
158  virtual void operator/=(const faPatchField<scalar>&) {}
159 
160  virtual void operator+=(const Field<Type>&) {}
161  virtual void operator-=(const Field<Type>&) {}
162 
163  virtual void operator*=(const Field<scalar>&) {}
164  virtual void operator/=(const Field<scalar>&) {}
165 
166  virtual void operator=(const Type&) {}
167  virtual void operator+=(const Type&) {}
168  virtual void operator-=(const Type&) {}
169  virtual void operator*=(const scalar) {}
170  virtual void operator/=(const scalar) {}
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #ifdef NoRepository
181  #include "fixedValueOutflowFaPatchField.txx"
182 #endif
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
188 // ************************************************************************* //
virtual void operator+=(const faPatchField< Type > &)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
virtual tmp< faPatchField< Type > > clone() const
No clone without an internal field reference.
Definition: faPatchField.H:534
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
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:41
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
virtual void write(Ostream &) const
Write includes "value" entry.
virtual void operator=(const UList< Type > &)
fixedValueOutflowFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual void operator*=(const faPatchField< scalar > &)
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:73
static tmp< faPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: faPatchField.H:559
virtual void operator-=(const faPatchField< Type > &)
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
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
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
A FieldMapper for finite-area patch fields.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
Namespace for OpenFOAM.