genericPointPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 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 
39 #include "genericPatchField.H"
41 #include "HashPtrTable.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class genericPointPatchField Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class Type>
54 :
55  public genericPatchField,
56  public calculatedPointPatchField<Type>
57 {
58  // Private Data
59 
60  dictionary dict_;
61 
62  HashPtrTable<scalarField> scalarFields_;
63  HashPtrTable<vectorField> vectorFields_;
64  HashPtrTable<sphericalTensorField> sphericalTensorFields_;
65  HashPtrTable<symmTensorField> symmTensorFields_;
66  HashPtrTable<tensorField> tensorFields_;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("generic");
73 
74 
75  // Constructors
76 
77  //- Construct from patch, internal field and dictionary
79  (
80  const pointPatch&,
82  const dictionary&
83  );
84 
85  //- Construct by mapping given genericPointPatchField onto a new patch
87  (
89  const pointPatch&,
92  );
93 
94  //- Construct as copy setting internal field reference
96  (
99  );
100 
101  //- Construct and return a clone setting internal field reference
103  (
105  ) const
106  {
108  (
110  (
111  *this,
112  iF
113  )
114  );
115  }
116 
117 
118  // Member Functions
119 
120  // Mapping functions
121 
122  //- Map the given pointPatchField onto this pointPatchField
123  virtual void map
124  (
125  const pointPatchField<Type>&,
126  const pointPatchFieldMapper&
127  );
128 
129  //- Reset the pointPatchField to the given pointPatchField
130  // Used for mesh to mesh mapping
131  virtual void reset(const pointPatchField<Type>&);
132 
133 
134  //- Write
135  virtual void write(Ostream&) const;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #ifdef NoRepository
146  #include "genericPointPatchField.C"
147 #endif
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A HashTable specialisation for hashing pointers.
Definition: HashPtrTable.H:67
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A calculated boundary condition for pointField.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
A generic version of calculatedPointPatchField, useful as a fallback for handling unknown patch types...
TypeName("generic")
Runtime type information.
virtual void write(Ostream &) const
Write.
virtual void reset(const pointPatchField< Type > &)
Reset the pointPatchField to the given pointPatchField.
genericPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void map(const pointPatchField< Type > &, const pointPatchFieldMapper &)
Map the given pointPatchField onto this pointPatchField.
Foam::pointPatchFieldMapper.
Abstract base class for point-mesh patch fields.
autoPtr< pointPatchField< Type > > clone() const
Disallow clone without setting internal field reference.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:57
Namespace for OpenFOAM.