1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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, Field<Type>())
63 slicedFvPatchField<Type>::slicedFvPatchField
65 const slicedFvPatchField<Type>& ptf,
67 const DimensionedField<Type, volMesh>& iF,
68 const fvPatchFieldMapper& mapper
71 fvPatchField<Type>(ptf, p, iF, mapper)
75 "slicedFvPatchField<Type>::"
76 "slicedFvPatchField(const slicedFvPatchField<Type>&, "
77 "const fvPatch&, const Field<Type>&, const fvPatchFieldMapper&)"
83 slicedFvPatchField<Type>::slicedFvPatchField
86 const DimensionedField<Type, volMesh>& iF,
87 const dictionary& dict
90 fvPatchField<Type>(p, iF, dict)
94 "slicedFvPatchField<Type>::"
95 "slicedFvPatchField(const Field<Type>&, const dictionary&)"
101 slicedFvPatchField<Type>::slicedFvPatchField
103 const slicedFvPatchField<Type>& ptf,
104 const DimensionedField<Type, volMesh>& iF
107 fvPatchField<Type>(ptf.patch(), iF, Field<Type>())
109 // Transfer the slice from the argument
110 UList<Type>::operator=(ptf);
114 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone() const
116 return tmp<fvPatchField<Type> >
118 new slicedFvPatchField<Type>(*this)
124 slicedFvPatchField<Type>::slicedFvPatchField
126 const slicedFvPatchField<Type>& ptf
132 ptf.dimensionedInternalField(),
136 // Transfer the slice from the argument
137 UList<Type>::operator=(ptf);
142 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone
144 const DimensionedField<Type, volMesh>& iF
147 return tmp<fvPatchField<Type> >
149 new slicedFvPatchField<Type>(*this, iF)
155 slicedFvPatchField<Type>::~slicedFvPatchField<Type>()
157 // Set the fvPatchField storage pointer to NULL before its destruction
158 // to protect the field it a slice of.
159 UList<Type>::operator=(UList<Type>(NULL, 0));
163 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
166 tmp<Field<Type> > slicedFvPatchField<Type>::snGrad() const
170 "slicedFvPatchField<Type>::"
174 return Field<Type>::null();
179 void slicedFvPatchField<Type>::updateCoeffs()
183 "slicedFvPatchField<Type>::"
190 tmp<Field<Type> > slicedFvPatchField<Type>::patchInternalField() const
194 "slicedFvPatchField<Type>::"
195 "patchInternalField()"
198 return Field<Type>::null();
203 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField
205 const Field<Type>& iField
210 "slicedFvPatchField<Type>::"
211 "patchNeighbourField(const DimensionedField<Type, volMesh>& iField)"
214 return Field<Type>::null();
219 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField() const
223 "slicedFvPatchField<Type>::"
224 "patchNeighbourField()"
227 return Field<Type>::null();
232 tmp<Field<Type> > slicedFvPatchField<Type>::valueInternalCoeffs
234 const tmp<scalarField>&
239 "slicedFvPatchField<Type>::"
240 "valueInternalCoeffs(const tmp<scalarField>&)"
243 return Field<Type>::null();
248 tmp<Field<Type> > slicedFvPatchField<Type>::valueBoundaryCoeffs
250 const tmp<scalarField>&
255 "slicedFvPatchField<Type>::"
256 "valueBoundaryCoeffs(const tmp<scalarField>&)"
259 return Field<Type>::null();
264 tmp<Field<Type> > slicedFvPatchField<Type>::gradientInternalCoeffs() const
268 "slicedFvPatchField<Type>::"
269 "gradientInternalCoeffs()"
272 return Field<Type>::null();
277 tmp<Field<Type> > slicedFvPatchField<Type>::gradientBoundaryCoeffs() const
281 "slicedFvPatchField<Type>::"
282 "gradientBoundaryCoeffs()"
285 return Field<Type>::null();
290 void slicedFvPatchField<Type>::write(Ostream& os) const
292 fvPatchField<Type>::write(os);
293 this->writeEntry("value", os);
297 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
299 } // End namespace Foam
301 // ************************************************************************* //