fixedValueFaPatchField.C
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 \*---------------------------------------------------------------------------*/
27 
28 #include "fixedValueFaPatchField.H"
29 
30 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
31 
32 template<class Type>
34 (
35  const faPatch& p,
37 )
38 :
39  faPatchField<Type>(p, iF)
40 {}
41 
42 
43 template<class Type>
45 (
46  const faPatch& p,
48  const Type& value
49 )
50 :
51  faPatchField<Type>(p, iF, value)
52 {}
53 
54 
55 template<class Type>
57 (
58  const faPatch& p,
60  const dictionary& dict,
61  IOobjectOption::readOption requireValue
62 )
63 :
64  faPatchField<Type>(p, iF, dict, requireValue)
65 {}
66 
67 
68 template<class Type>
70 (
73 )
74 :
75  faPatchField<Type>(ptf, iF)
76 {}
77 
78 
79 template<class Type>
81 (
83  const faPatch& p,
85  const faPatchFieldMapper& mapper
86 )
87 :
88  faPatchField<Type>(ptf, p, iF, mapper)
89 {}
90 
91 
92 template<class Type>
94 (
96 )
97 :
98  faPatchField<Type>(ptf)
99 {}
101 
102 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
103 
104 template<class Type>
107 (
108  const tmp<scalarField>&
109 ) const
110 {
111  return tmp<Field<Type>>
112  (
113  new Field<Type>(this->size(), Zero)
114  );
115 }
116 
117 
118 template<class Type>
121 (
122  const tmp<scalarField>&
123 ) const
124 {
125  return *this;
126 }
127 
128 
129 template<class Type>
132 {
133  return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs();
134 }
135 
136 
137 template<class Type>
140 {
141  return this->patch().deltaCoeffs()*(*this);
142 }
143 
144 
145 template<class Type>
147 {
150 }
151 
152 
153 // ************************************************************************* //
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
dictionary dict
fixedValueFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &os) const
Write.
Definition: faPatchField.C:253
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A traits class, which is primarily used for primitives and vector-space.
Definition: pTraits.H:75
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
Definition: faPatchField.H:317
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
Definition: areaFieldsFwd.H:56
Generic templated field type.
Definition: Field.H:62
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
OBJstream os(runTime.globalPath()/outputName)
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
const std::string patch
OpenFOAM patch number as a std::string.
volScalarField & p
A class for managing temporary objects.
Definition: HashPtrTable.H:50
A FieldMapper for finite-area patch fields.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127
readOption
Enumeration defining read preferences.