slicedFvPatchField.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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "slicedFvPatchField.H"
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 
33 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
34 
35 template<class Type>
37 (
38  const fvPatch& p,
40  const Field<Type>& completeField
41 )
42 :
44 {
45  // Set the fvPatchField to a slice of the given complete field
46  UList<Type>::operator=(p.patchSlice(completeField));
47 }
48 
49 
50 template<class Type>
52 (
53  const fvPatch& p,
55 )
56 :
58 {}
59 
60 
61 template<class Type>
63 (
64  const slicedFvPatchField<Type>& ptf,
65  const fvPatch& p,
67  const fvPatchFieldMapper& mapper
68 )
69 :
70  fvPatchField<Type>(ptf, p, iF, mapper)
71 {
73 }
74 
75 
76 template<class Type>
78 (
79  const fvPatch& p,
81  const dictionary& dict
82 )
83 :
85 {
87 }
88 
89 
90 template<class Type>
92 (
93  const slicedFvPatchField<Type>& ptf,
95 )
96 :
98 {
99  // Transfer the slice from the argument
101 }
102 
103 template<class Type>
105 {
106  return tmp<fvPatchField<Type> >
107  (
108  new slicedFvPatchField<Type>(*this)
109  );
110 }
111 
112 
113 template<class Type>
115 (
116  const slicedFvPatchField<Type>& ptf
117 )
118 :
120  (
121  ptf.patch(),
123  Field<Type>()
124  )
125 {
126  // Transfer the slice from the argument
128 }
129 
130 
131 template<class Type>
133 (
135 ) const
136 {
137  return tmp<fvPatchField<Type> >
138  (
139  new slicedFvPatchField<Type>(*this, iF)
140  );
141 }
142 
143 
144 template<class Type>
146 {
147  // Set the fvPatchField storage pointer to NULL before its destruction
148  // to protect the field it a slice of.
150 }
151 
152 
153 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
154 
155 template<class Type>
157 {
159 
160  return Field<Type>::null();
161 }
162 
163 
164 template<class Type>
166 {
168 }
169 
170 
171 template<class Type>
173 {
175 
176  return Field<Type>::null();
177 }
178 
179 
180 template<class Type>
182 {
184 }
185 
186 
187 template<class Type>
189 (
190  const Field<Type>& iField
191 ) const
192 {
194 
195  return Field<Type>::null();
196 }
197 
198 
199 template<class Type>
201 {
203 
204  return Field<Type>::null();
205 }
206 
207 
208 template<class Type>
210 (
211  const tmp<scalarField>&
212 ) const
213 {
215 
216  return Field<Type>::null();
217 }
218 
219 
220 template<class Type>
222 (
223  const tmp<scalarField>&
224 ) const
225 {
227 
228  return Field<Type>::null();
229 }
230 
231 
232 template<class Type>
234 {
236 
237  return Field<Type>::null();
238 }
239 
240 
241 template<class Type>
243 {
245 
246  return Field<Type>::null();
247 }
248 
249 
250 template<class Type>
252 {
254  this->writeEntry("value", os);
255 }
256 
257 
258 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
259 
260 } // End namespace Foam
261 
262 // ************************************************************************* //
Foam::fvPatchField< Type >
Foam::fvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:349
p
p
Definition: pEqn.H:62
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::fvPatchField< Type >::dimensionedInternalField
const DimensionedField< Type, volMesh > & dimensionedInternalField() const
Return dimensioned internal field reference.
Definition: fvPatchField.H:307
Foam::slicedFvPatchField::snGrad
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
Definition: slicedFvPatchField.C:156
Foam::slicedFvPatchField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: slicedFvPatchField.C:165
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
Foam::Field< Type >
slicedFvPatchField.H
Foam::slicedFvPatchField::slicedFvPatchField
slicedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &, const Field< Type > &)
Construct from patch, internal field and field to slice.
Definition: slicedFvPatchField.C:37
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::slicedFvPatchField
Specialization of fvPatchField which creates the underlying fvPatchField as a slice of the given comp...
Definition: slicedFvPatchField.H:61
Foam::slicedFvPatchField::gradientInternalCoeffs
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
Definition: slicedFvPatchField.C:233
Foam::slicedFvPatchField::valueInternalCoeffs
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
Definition: slicedFvPatchField.C:210
Foam::slicedFvPatchField::gradientBoundaryCoeffs
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
Definition: slicedFvPatchField.C:242
Foam::UList< Type >
Foam::Field::null
static const Field< Type > & null()
Return a null field.
Definition: Field.H:100
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::slicedFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: slicedFvPatchField.C:104
Foam::fvPatchField< Type >::patch
const fvPatch & patch() const
Return patch.
Definition: fvPatchField.H:300
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::slicedFvPatchField::valueBoundaryCoeffs
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
Definition: slicedFvPatchField.C:222
Foam::slicedFvPatchField::patchInternalField
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
Definition: slicedFvPatchField.C:172
Foam::slicedFvPatchField::patchNeighbourField
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField of the values on the patch or on the.
Definition: slicedFvPatchField.C:200
Foam::slicedFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: slicedFvPatchField.C:251
Foam::UList::operator=
void operator=(const T &)
Assignment of all entries to the given value.
Definition: UList.C:70
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51