initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / fields / pointPatchFields / basic / generic / genericPointPatchField.H
blobbedd11b4ecf9bb8fd6d050c46c6dc4813af86920
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 Class
26     Foam::genericPointPatchField
28 Description
29     Foam::genericPointPatchField
31 SourceFiles
32     genericPointPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef genericPointPatchField_H
37 #define genericPointPatchField_H
39 #include "calculatedPointPatchField.H"
40 #include "HashPtrTable.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                  Class genericPointPatchField Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class Type>
52 class genericPointPatchField
54     public calculatedPointPatchField<Type>
56     // Private data
58         word actualTypeName_;
59         dictionary dict_;
61         HashPtrTable<scalarField> scalarFields_;
62         HashPtrTable<vectorField> vectorFields_;
63         HashPtrTable<sphericalTensorField> sphericalTensorFields_;
64         HashPtrTable<symmTensorField> symmTensorFields_;
65         HashPtrTable<tensorField> tensorFields_;
68 public:
70     //- Runtime type information
71     TypeName("generic");
74     // Constructors
76         //- Construct from patch and internal field
77         genericPointPatchField
78         (
79             const pointPatch&,
80             const DimensionedField<Type, pointMesh>&
81         );
83         //- Construct from patch, internal field and dictionary
84         genericPointPatchField
85         (
86             const pointPatch&,
87             const DimensionedField<Type, pointMesh>&,
88             const dictionary&
89         );
91         //- Construct by mapping given patchField<Type> onto a new patch
92         genericPointPatchField
93         (
94             const genericPointPatchField<Type>&,
95             const pointPatch&,
96             const DimensionedField<Type, pointMesh>&,
97             const pointPatchFieldMapper&
98         );
100         //- Construct and return a clone
101         virtual autoPtr<pointPatchField<Type> > clone() const
102         {
103             return autoPtr<pointPatchField<Type> >
104             (
105                 new genericPointPatchField<Type>
106                 (
107                     *this
108                 )
109             );
110         }
112         //- Construct as copy setting internal field reference
113         genericPointPatchField
114         (
115             const genericPointPatchField<Type>&,
116             const DimensionedField<Type, pointMesh>&
117         );
119         //- Construct and return a clone setting internal field reference
120         virtual autoPtr<pointPatchField<Type> > clone
121         (
122             const DimensionedField<Type, pointMesh>& iF
123         ) const
124         {
125             return autoPtr<pointPatchField<Type> >
126             (
127                 new genericPointPatchField<Type>
128                 (
129                     *this,
130                     iF
131                 )
132             );
133         }
136     // Member functions
138         // Mapping functions
140             //- Map (and resize as needed) from self given a mapping object
141             virtual void autoMap
142             (
143                 const pointPatchFieldMapper&
144             );
146             //- Reverse map the given pointPatchField onto this pointPatchField
147             virtual void rmap
148             (
149                 const pointPatchField<Type>&,
150                 const labelList&
151             );
154         //- Write
155         virtual void write(Ostream&) const;
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 #ifdef NoRepository
166 #    include "genericPointPatchField.C"
167 #endif
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************************************************************* //