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

calculatedPointPatchField.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 "calculatedPointPatchField.H"
00028 
00029 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00030 
00031 namespace Foam
00032 {
00033 
00034 template<class Type>
00035 const word& pointPatchField<Type>::calculatedType()
00036 {
00037     return calculatedPointPatchField<Type>::typeName;
00038 }
00039 
00040 
00041 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00042 
00043 template<class Type>
00044 calculatedPointPatchField<Type>::calculatedPointPatchField
00045 (
00046     const pointPatch& p,
00047     const DimensionedField<Type, pointMesh>& iF
00048 )
00049 :
00050     pointPatchField<Type>(p, iF)
00051 {}
00052 
00053 
00054 template<class Type>
00055 calculatedPointPatchField<Type>::calculatedPointPatchField
00056 (
00057     const pointPatch& p,
00058     const DimensionedField<Type, pointMesh>& iF,
00059     const dictionary& dict
00060 )
00061 :
00062     pointPatchField<Type>(p, iF, dict)
00063 {}
00064 
00065 
00066 template<class Type>
00067 calculatedPointPatchField<Type>::calculatedPointPatchField
00068 (
00069     const calculatedPointPatchField<Type>& ptf,
00070     const pointPatch& p,
00071     const DimensionedField<Type, pointMesh>& iF,
00072     const pointPatchFieldMapper&
00073 )
00074 :
00075     pointPatchField<Type>(p, iF)
00076 {}
00077 
00078 
00079 template<class Type>
00080 calculatedPointPatchField<Type>::calculatedPointPatchField
00081 (
00082     const calculatedPointPatchField<Type>& ptf,
00083     const DimensionedField<Type, pointMesh>& iF
00084 )
00085 :
00086     pointPatchField<Type>(ptf, iF)
00087 {}
00088 
00089 
00090 template<class Type>
00091 template<class Type2>
00092 autoPtr<pointPatchField<Type> >
00093 pointPatchField<Type>::NewCalculatedType
00094 (
00095     const pointPatchField<Type2>& pf
00096 )
00097 {
00098     typename pointPatchConstructorTable::iterator patchTypeCstrIter =
00099         pointPatchConstructorTablePtr_->find(pf.patch().type());
00100 
00101     if (patchTypeCstrIter != pointPatchConstructorTablePtr_->end())
00102     {
00103         return autoPtr<pointPatchField<Type> >
00104         (
00105             patchTypeCstrIter()
00106             (
00107                 pf.patch(),
00108                 Field<Type>::null()
00109             )
00110         );
00111     }
00112     else
00113     {
00114         return autoPtr<pointPatchField<Type> >
00115         (
00116             new calculatedPointPatchField<Type>
00117             (
00118                 pf.patch(),
00119                 Field<Type>::null()
00120             )
00121         );
00122     }
00123 }
00124 
00125 
00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00127 
00128 } // End namespace Foam
00129 
00130 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd