1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "slicedFvPatchField.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
37 slicedFvPatchField<Type>::slicedFvPatchField
40 const DimensionedField<Type, volMesh>& iF,
41 const Field<Type>& completeField
44 fvPatchField<Type>(p, iF, Field<Type>())
46 // Set the fvPatchField to a slice of the given complete field
47 UList<Type>::operator=(p.patchSlice(completeField));
52 slicedFvPatchField<Type>::slicedFvPatchField
55 const DimensionedField<Type, volMesh>& iF
58 fvPatchField<Type>(p, iF)
62 "slicedFvPatchField<Type>::"
63 "slicedFvPatchField(const fvPatch&, const Field<Type>&)"
69 slicedFvPatchField<Type>::slicedFvPatchField
71 const slicedFvPatchField<Type>& ptf,
73 const DimensionedField<Type, volMesh>& iF,
74 const fvPatchFieldMapper& mapper
77 fvPatchField<Type>(ptf, p, iF, mapper)
81 "slicedFvPatchField<Type>::"
82 "slicedFvPatchField(const slicedFvPatchField<Type>&, "
83 "const fvPatch&, const Field<Type>&, const fvPatchFieldMapper&)"
89 slicedFvPatchField<Type>::slicedFvPatchField
92 const DimensionedField<Type, volMesh>& iF,
93 const dictionary& dict
96 fvPatchField<Type>(p, iF, dict)
100 "slicedFvPatchField<Type>::"
101 "slicedFvPatchField(const Field<Type>&, const dictionary&)"
107 slicedFvPatchField<Type>::slicedFvPatchField
109 const slicedFvPatchField<Type>& ptf,
110 const DimensionedField<Type, volMesh>& iF
113 fvPatchField<Type>(ptf.patch(), iF, Field<Type>())
115 // Transfer the slice from the argument
116 UList<Type>::operator=(ptf);
120 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone() const
122 return tmp<fvPatchField<Type> >
124 new slicedFvPatchField<Type>(*this)
130 slicedFvPatchField<Type>::slicedFvPatchField
132 const slicedFvPatchField<Type>& ptf
138 ptf.dimensionedInternalField(),
142 // Transfer the slice from the argument
143 UList<Type>::operator=(ptf);
148 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone
150 const DimensionedField<Type, volMesh>& iF
153 return tmp<fvPatchField<Type> >
155 new slicedFvPatchField<Type>(*this, iF)
161 slicedFvPatchField<Type>::~slicedFvPatchField<Type>()
163 // Set the fvPatchField storage pointer to NULL before its destruction
164 // to protect the field it a slice of.
165 UList<Type>::operator=(UList<Type>(NULL, 0));
169 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
172 tmp<Field<Type> > slicedFvPatchField<Type>::snGrad() const
176 "slicedFvPatchField<Type>::"
180 return Field<Type>::null();
185 void slicedFvPatchField<Type>::updateCoeffs()
189 "slicedFvPatchField<Type>::"
196 tmp<Field<Type> > slicedFvPatchField<Type>::patchInternalField() const
200 "slicedFvPatchField<Type>::"
201 "patchInternalField()"
204 return Field<Type>::null();
209 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField
211 const Field<Type>& iField
216 "slicedFvPatchField<Type>::"
217 "patchNeighbourField(const DimensionedField<Type, volMesh>& iField)"
220 return Field<Type>::null();
225 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField() const
229 "slicedFvPatchField<Type>::"
230 "patchNeighbourField()"
233 return Field<Type>::null();
238 tmp<Field<Type> > slicedFvPatchField<Type>::valueInternalCoeffs
240 const tmp<scalarField>&
245 "slicedFvPatchField<Type>::"
246 "valueInternalCoeffs(const tmp<scalarField>&)"
249 return Field<Type>::null();
254 tmp<Field<Type> > slicedFvPatchField<Type>::valueBoundaryCoeffs
256 const tmp<scalarField>&
261 "slicedFvPatchField<Type>::"
262 "valueBoundaryCoeffs(const tmp<scalarField>&)"
265 return Field<Type>::null();
270 tmp<Field<Type> > slicedFvPatchField<Type>::gradientInternalCoeffs() const
274 "slicedFvPatchField<Type>::"
275 "gradientInternalCoeffs()"
278 return Field<Type>::null();
283 tmp<Field<Type> > slicedFvPatchField<Type>::gradientBoundaryCoeffs() const
287 "slicedFvPatchField<Type>::"
288 "gradientBoundaryCoeffs()"
291 return Field<Type>::null();
296 void slicedFvPatchField<Type>::write(Ostream& os) const
298 fvPatchField<Type>::write(os);
299 this->writeEntry("value", os);
303 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
305 } // End namespace Foam
307 // ************************************************************************* //