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) 2011 OpenFOAM Foundation
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  A generic version of calculatedPointPatchField, useful as a fallback for
29  handling unknown patch types.
30 
31 SourceFiles
32  genericPointPatchField.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef genericPointPatchField_H
37 #define genericPointPatchField_H
38 
40 #include "HashPtrTable.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class genericPointPatchField Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class Type>
53 :
54  public calculatedPointPatchField<Type>
55 {
56  // Private data
57 
60 
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("generic");
72 
73 
74  // Constructors
75 
76  //- Construct from patch and internal field
78  (
79  const pointPatch&,
81  );
82 
83  //- Construct from patch, internal field and dictionary
85  (
86  const pointPatch&,
88  const dictionary&
89  );
90 
91  //- Construct by mapping given patchField<Type> onto a new patch
93  (
95  const pointPatch&,
98  );
99 
100  //- Construct and return a clone
101  virtual autoPtr<pointPatchField<Type> > clone() const
102  {
104  (
106  (
107  *this
108  )
109  );
110  }
111 
112  //- Construct as copy setting internal field reference
114  (
117  );
118 
119  //- Construct and return a clone setting internal field reference
121  (
123  ) const
124  {
126  (
128  (
129  *this,
130  iF
131  )
132  );
133  }
134 
135 
136  // Member functions
137 
138  // Mapping functions
139 
140  //- Map (and resize as needed) from self given a mapping object
141  virtual void autoMap
142  (
143  const pointPatchFieldMapper&
144  );
145 
146  //- Reverse map the given pointPatchField onto this pointPatchField
147  virtual void rmap
148  (
149  const pointPatchField<Type>&,
150  const labelList&
151  );
152 
153 
154  //- Write
155  virtual void write(Ostream&) const;
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #ifdef NoRepository
166 # include "genericPointPatchField.C"
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::genericPointPatchField::TypeName
TypeName("generic")
Runtime type information.
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::genericPointPatchField::clone
virtual autoPtr< pointPatchField< Type > > clone() const
Construct and return a clone.
Definition: genericPointPatchField.H:100
Foam::genericPointPatchField::actualTypeName_
word actualTypeName_
Definition: genericPointPatchField.H:57
Foam::genericPointPatchField::symmTensorFields_
HashPtrTable< symmTensorField > symmTensorFields_
Definition: genericPointPatchField.H:63
Foam::genericPointPatchField::write
virtual void write(Ostream &) const
Write.
Definition: genericPointPatchField.C:566
Foam::pointPatch
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:56
Foam::genericPointPatchField::autoMap
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: genericPointPatchField.C:417
Foam::pointPatchField< Type >
Foam::genericPointPatchField::scalarFields_
HashPtrTable< scalarField > scalarFields_
Definition: genericPointPatchField.H:60
Foam::pointPatchFieldMapper
Foam::pointPatchFieldMapper.
Definition: pointPatchFieldMapper.H:46
Foam::genericPointPatchField::genericPointPatchField
genericPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Definition: genericPointPatchField.C:38
Foam::genericPointPatchField::dict_
dictionary dict_
Definition: genericPointPatchField.H:58
Foam::calculatedPointPatchField
A calculated boundary condition for pointField.
Definition: calculatedPointPatchField.H:49
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::genericPointPatchField::rmap
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given pointPatchField onto this pointPatchField.
Definition: genericPointPatchField.C:475
Foam::genericPointPatchField
A generic version of calculatedPointPatchField, useful as a fallback for handling unknown patch types...
Definition: genericPointPatchField.H:51
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::genericPointPatchField::tensorFields_
HashPtrTable< tensorField > tensorFields_
Definition: genericPointPatchField.H:64
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
calculatedPointPatchField.H
Foam::HashPtrTable
A HashTable specialization for hashing pointers.
Definition: HashPtrTable.H:50
Foam::genericPointPatchField::sphericalTensorFields_
HashPtrTable< sphericalTensorField > sphericalTensorFields_
Definition: genericPointPatchField.H:62
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
HashPtrTable.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::genericPointPatchField::vectorFields_
HashPtrTable< vectorField > vectorFields_
Definition: genericPointPatchField.H:61
genericPointPatchField.C
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51