1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "slicedFvPatchField.H"
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
36 slicedFvPatchField<Type>::slicedFvPatchField
39 const DimensionedField<Type, volMesh>& iF,
40 const Field<Type>& completeField
43 fvPatchField<Type>(p, iF, Field<Type>())
45 // Set the fvPatchField to a slice of the given complete field
46 UList<Type>::operator=(p.patchSlice(completeField));
51 slicedFvPatchField<Type>::slicedFvPatchField
54 const DimensionedField<Type, volMesh>& iF
57 fvPatchField<Type>(p, iF, Field<Type>())
62 slicedFvPatchField<Type>::slicedFvPatchField
64 const slicedFvPatchField<Type>& ptf,
66 const DimensionedField<Type, volMesh>& iF,
67 const fvPatchFieldMapper& mapper
70 fvPatchField<Type>(ptf, p, iF, mapper)
74 "slicedFvPatchField<Type>::"
75 "slicedFvPatchField(const slicedFvPatchField<Type>&, "
76 "const fvPatch&, const Field<Type>&, const fvPatchFieldMapper&)"
82 slicedFvPatchField<Type>::slicedFvPatchField
85 const DimensionedField<Type, volMesh>& iF,
86 const dictionary& dict
89 fvPatchField<Type>(p, iF, dict)
93 "slicedFvPatchField<Type>::"
94 "slicedFvPatchField(const Field<Type>&, const dictionary&)"
100 slicedFvPatchField<Type>::slicedFvPatchField
102 const slicedFvPatchField<Type>& ptf,
103 const DimensionedField<Type, volMesh>& iF
106 fvPatchField<Type>(ptf.patch(), iF, Field<Type>())
108 // Transfer the slice from the argument
109 UList<Type>::operator=(ptf);
113 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone() const
115 return tmp<fvPatchField<Type> >
117 new slicedFvPatchField<Type>(*this)
123 slicedFvPatchField<Type>::slicedFvPatchField
125 const slicedFvPatchField<Type>& ptf
131 ptf.dimensionedInternalField(),
135 // Transfer the slice from the argument
136 UList<Type>::operator=(ptf);
141 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone
143 const DimensionedField<Type, volMesh>& iF
146 return tmp<fvPatchField<Type> >
148 new slicedFvPatchField<Type>(*this, iF)
154 slicedFvPatchField<Type>::~slicedFvPatchField<Type>()
156 // Set the fvPatchField storage pointer to NULL before its destruction
157 // to protect the field it a slice of.
158 UList<Type>::operator=(UList<Type>(NULL, 0));
162 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
165 tmp<Field<Type> > slicedFvPatchField<Type>::snGrad() const
169 "slicedFvPatchField<Type>::"
173 return Field<Type>::null();
178 void slicedFvPatchField<Type>::updateCoeffs()
182 "slicedFvPatchField<Type>::"
189 tmp<Field<Type> > slicedFvPatchField<Type>::patchInternalField() const
193 "slicedFvPatchField<Type>::"
194 "patchInternalField()"
197 return Field<Type>::null();
202 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField
204 const Field<Type>& iField
209 "slicedFvPatchField<Type>::"
210 "patchNeighbourField(const DimensionedField<Type, volMesh>& iField)"
213 return Field<Type>::null();
218 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField() const
222 "slicedFvPatchField<Type>::"
223 "patchNeighbourField()"
226 return Field<Type>::null();
231 tmp<Field<Type> > slicedFvPatchField<Type>::valueInternalCoeffs
233 const tmp<scalarField>&
238 "slicedFvPatchField<Type>::"
239 "valueInternalCoeffs(const tmp<scalarField>&)"
242 return Field<Type>::null();
247 tmp<Field<Type> > slicedFvPatchField<Type>::valueBoundaryCoeffs
249 const tmp<scalarField>&
254 "slicedFvPatchField<Type>::"
255 "valueBoundaryCoeffs(const tmp<scalarField>&)"
258 return Field<Type>::null();
263 tmp<Field<Type> > slicedFvPatchField<Type>::gradientInternalCoeffs() const
267 "slicedFvPatchField<Type>::"
268 "gradientInternalCoeffs()"
271 return Field<Type>::null();
276 tmp<Field<Type> > slicedFvPatchField<Type>::gradientBoundaryCoeffs() const
280 "slicedFvPatchField<Type>::"
281 "gradientBoundaryCoeffs()"
284 return Field<Type>::null();
289 void slicedFvPatchField<Type>::write(Ostream& os) const
291 fvPatchField<Type>::write(os);
292 this->writeEntry("value", os);
296 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
298 } // End namespace Foam
300 // ************************************************************************* //