OpenFOAM logo
Open Source CFD Toolkit

pointPatchField.H

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-2005 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 Class
00026     pointPatchField
00027 
00028 Description
00029     Abstract base class for point patch fields. Note the special
00030     mechanism at work here: the field itself holds no values, as the point
00031     values belong to the internal field. However, the field will create a
00032     list of values if required.
00033 
00034 SourceFiles
00035     pointPatchField.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef pointPatchField_H
00040 #define pointPatchField_H
00041 
00042 #include "PointPatchField.H"
00043 #include "pointPatch.H"
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                        Class pointPatchField Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 template<class Type>
00055 class pointPatchField
00056 :
00057     public PointPatchField<pointPatchField, pointPatch, Type>
00058 {
00059 
00060 public:
00061 
00062     // Constructors
00063 
00064         //- Construct from patch and internal field
00065         pointPatchField
00066         (
00067             const pointPatch&,
00068             const Field<Type>&
00069         );
00070 
00071         //- Construct as copy
00072         pointPatchField(const pointPatchField<Type>&);
00073 
00074         //- Construct and return a clone
00075         virtual autoPtr<pointPatchField<Type> > clone() const
00076         {
00077             return autoPtr<pointPatchField<Type> >
00078             (
00079                 new pointPatchField<Type>(*this)
00080             );
00081         }
00082 
00083         //- Construct as copy setting internal field reference
00084         pointPatchField(const pointPatchField<Type>&, const Field<Type>&);
00085 
00086         //- Construct and return a clone setting internal field reference
00087         virtual autoPtr<pointPatchField<Type> >
00088         clone(const Field<Type>& iF) const
00089         {
00090             return autoPtr<pointPatchField<Type> >
00091             (
00092                 new pointPatchField<Type>(*this, iF)
00093             );
00094         }
00095 
00096 
00097     // Destructor
00098 
00099         virtual ~pointPatchField()
00100         {}
00101 
00102 
00103     // Member operators
00104 
00105         virtual void operator=(const Type& t)
00106         {
00107             PointPatchField<Foam::pointPatchField, pointPatch, Type>::
00108             operator=(t);
00109         }
00110 };
00111 
00112 
00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00114 
00115 } // End namespace Foam
00116 
00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00118 
00119 #ifdef NoRepository
00120 #   include "pointPatchField.C"
00121 #endif
00122 
00123 
00124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00125 
00126 #endif
00127 
00128 // ************************************************************************* //
00129 
For further information go to www.openfoam.org