OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

slicedFvPatchField.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "slicedFvPatchField.H"
00028 
00029 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00030 
00031 namespace Foam
00032 {
00033 
00034 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00035 
00036 template<class Type>
00037 slicedFvPatchField<Type>::slicedFvPatchField
00038 (
00039     const fvPatch& p,
00040     const DimensionedField<Type, volMesh>& iF,
00041     const Field<Type>& completeField
00042 )
00043 :
00044     fvPatchField<Type>(p, iF, Field<Type>())
00045 {
00046     // Set the fvPatchField to a slice of the given complete field
00047     UList<Type>::operator=(p.patchSlice(completeField));
00048 }
00049 
00050 
00051 template<class Type>
00052 slicedFvPatchField<Type>::slicedFvPatchField
00053 (
00054     const fvPatch& p,
00055     const DimensionedField<Type, volMesh>& iF
00056 )
00057 :
00058     fvPatchField<Type>(p, iF)
00059 {}
00060 
00061 
00062 template<class Type>
00063 slicedFvPatchField<Type>::slicedFvPatchField
00064 (
00065     const slicedFvPatchField<Type>& ptf,
00066     const fvPatch& p,
00067     const DimensionedField<Type, volMesh>& iF,
00068     const fvPatchFieldMapper& mapper
00069 )
00070 :
00071     fvPatchField<Type>(ptf, p, iF, mapper)
00072 {
00073     notImplemented
00074     (
00075         "slicedFvPatchField<Type>::"
00076         "slicedFvPatchField(const slicedFvPatchField<Type>&, "
00077         "const fvPatch&, const Field<Type>&, const fvPatchFieldMapper&)"
00078     );
00079 }
00080 
00081 
00082 template<class Type>
00083 slicedFvPatchField<Type>::slicedFvPatchField
00084 (
00085     const fvPatch& p,
00086     const DimensionedField<Type, volMesh>& iF,
00087     const dictionary& dict
00088 )
00089 :
00090     fvPatchField<Type>(p, iF, dict)
00091 {
00092     notImplemented
00093     (
00094         "slicedFvPatchField<Type>::"
00095         "slicedFvPatchField(const Field<Type>&, const dictionary&)"
00096     );
00097 }
00098 
00099 
00100 template<class Type>
00101 slicedFvPatchField<Type>::slicedFvPatchField
00102 (
00103     const slicedFvPatchField<Type>& ptf,
00104     const DimensionedField<Type, volMesh>& iF
00105 )
00106 :
00107     fvPatchField<Type>(ptf.patch(), iF, Field<Type>())
00108 {
00109     // Transfer the slice from the argument
00110     UList<Type>::operator=(ptf);
00111 }
00112 
00113 template<class Type>
00114 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone() const
00115 {
00116     return tmp<fvPatchField<Type> >
00117     (
00118         new slicedFvPatchField<Type>(*this)
00119     );
00120 }
00121 
00122 
00123 template<class Type>
00124 slicedFvPatchField<Type>::slicedFvPatchField
00125 (
00126     const slicedFvPatchField<Type>& ptf
00127 )
00128 :
00129     fvPatchField<Type>
00130     (
00131         ptf.patch(),
00132         ptf.dimensionedInternalField(),
00133         Field<Type>()
00134     )
00135 {
00136     // Transfer the slice from the argument
00137     UList<Type>::operator=(ptf);
00138 }
00139 
00140 
00141 template<class Type>
00142 tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone
00143 (
00144     const DimensionedField<Type, volMesh>& iF
00145 ) const
00146 {
00147     return tmp<fvPatchField<Type> >
00148     (
00149         new slicedFvPatchField<Type>(*this, iF)
00150     );
00151 }
00152 
00153 
00154 template<class Type>
00155 slicedFvPatchField<Type>::~slicedFvPatchField<Type>()
00156 {
00157     // Set the fvPatchField storage pointer to NULL before its destruction
00158     // to protect the field it a slice of.
00159     UList<Type>::operator=(UList<Type>(NULL, 0));
00160 }
00161 
00162 
00163 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00164 
00165 template<class Type>
00166 tmp<Field<Type> > slicedFvPatchField<Type>::snGrad() const
00167 {
00168     notImplemented
00169     (
00170         "slicedFvPatchField<Type>::"
00171         "snGrad()"
00172     );
00173 
00174     return Field<Type>::null();
00175 }
00176 
00177 
00178 template<class Type>
00179 void slicedFvPatchField<Type>::updateCoeffs()
00180 {
00181     notImplemented
00182     (
00183         "slicedFvPatchField<Type>::"
00184         "updateCoeffs()"
00185     );
00186 }
00187 
00188 
00189 template<class Type>
00190 tmp<Field<Type> > slicedFvPatchField<Type>::patchInternalField() const
00191 {
00192     notImplemented
00193     (
00194         "slicedFvPatchField<Type>::"
00195         "patchInternalField()"
00196     );
00197 
00198     return Field<Type>::null();
00199 }
00200 
00201 
00202 template<class Type>
00203 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField
00204 (
00205     const Field<Type>& iField
00206 ) const
00207 {
00208     notImplemented
00209     (
00210         "slicedFvPatchField<Type>::"
00211         "patchNeighbourField(const DimensionedField<Type, volMesh>& iField)"
00212     );
00213 
00214     return Field<Type>::null();
00215 }
00216 
00217 
00218 template<class Type>
00219 tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField() const
00220 {
00221     notImplemented
00222     (
00223         "slicedFvPatchField<Type>::"
00224         "patchNeighbourField()"
00225     );
00226 
00227     return Field<Type>::null();
00228 }
00229 
00230 
00231 template<class Type>
00232 tmp<Field<Type> > slicedFvPatchField<Type>::valueInternalCoeffs
00233 (
00234     const tmp<scalarField>&
00235 ) const
00236 {
00237     notImplemented
00238     (
00239         "slicedFvPatchField<Type>::"
00240         "valueInternalCoeffs(const tmp<scalarField>&)"
00241     );
00242 
00243     return Field<Type>::null();
00244 }
00245 
00246 
00247 template<class Type>
00248 tmp<Field<Type> > slicedFvPatchField<Type>::valueBoundaryCoeffs
00249 (
00250     const tmp<scalarField>&
00251 ) const
00252 {
00253     notImplemented
00254     (
00255         "slicedFvPatchField<Type>::"
00256         "valueBoundaryCoeffs(const tmp<scalarField>&)"
00257     );
00258 
00259     return Field<Type>::null();
00260 }
00261 
00262 
00263 template<class Type>
00264 tmp<Field<Type> > slicedFvPatchField<Type>::gradientInternalCoeffs() const
00265 {
00266     notImplemented
00267     (
00268         "slicedFvPatchField<Type>::"
00269         "gradientInternalCoeffs()"
00270     );
00271 
00272     return Field<Type>::null();
00273 }
00274 
00275 
00276 template<class Type>
00277 tmp<Field<Type> > slicedFvPatchField<Type>::gradientBoundaryCoeffs() const
00278 {
00279     notImplemented
00280     (
00281         "slicedFvPatchField<Type>::"
00282         "gradientBoundaryCoeffs()"
00283     );
00284 
00285     return Field<Type>::null();
00286 }
00287 
00288 
00289 template<class Type>
00290 void slicedFvPatchField<Type>::write(Ostream& os) const
00291 {
00292     fvPatchField<Type>::write(os);
00293     this->writeEntry("value", os);
00294 }
00295 
00296 
00297 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00298 
00299 } // End namespace Foam
00300 
00301 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd