FreeFOAM The Cross-Platform CFD Toolkit
genericPointPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::genericPointPatchField
26 
27 Description
28  Foam::genericPointPatchField
29 
30 SourceFiles
31  genericPointPatchField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef genericPointPatchField_H
36 #define genericPointPatchField_H
37 
39 #include <OpenFOAM/HashPtrTable.H>
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class genericPointPatchField Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class Type>
52 :
53  public calculatedPointPatchField<Type>
54 {
55  // Private data
56 
57  word actualTypeName_;
58  dictionary dict_;
59 
60  HashPtrTable<scalarField> scalarFields_;
61  HashPtrTable<vectorField> vectorFields_;
62  HashPtrTable<sphericalTensorField> sphericalTensorFields_;
63  HashPtrTable<symmTensorField> symmTensorFields_;
64  HashPtrTable<tensorField> tensorFields_;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("generic");
71 
72 
73  // Constructors
74 
75  //- Construct from patch and internal field
77  (
78  const pointPatch&,
80  );
81 
82  //- Construct from patch, internal field and dictionary
84  (
85  const pointPatch&,
87  const dictionary&
88  );
89 
90  //- Construct by mapping given patchField<Type> onto a new patch
92  (
94  const pointPatch&,
97  );
98 
99  //- Construct and return a clone
101  {
103  (
105  (
106  *this
107  )
108  );
109  }
110 
111  //- Construct as copy setting internal field reference
113  (
116  );
117 
118  //- Construct and return a clone setting internal field reference
120  (
122  ) const
123  {
125  (
127  (
128  *this,
129  iF
130  )
131  );
132  }
133 
134 
135  // Member functions
136 
137  // Mapping functions
138 
139  //- Map (and resize as needed) from self given a mapping object
140  virtual void autoMap
141  (
142  const pointPatchFieldMapper&
143  );
144 
145  //- Reverse map the given pointPatchField onto this pointPatchField
146  virtual void rmap
147  (
148  const pointPatchField<Type>&,
149  const labelList&
150  );
151 
152 
153  //- Write
154  virtual void write(Ostream&) const;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #ifdef NoRepository
165 # include "genericPointPatchField.C"
166 #endif
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************ vim: set sw=4 sts=4 et: ************************ //