calculatedPointPatchField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2021-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
30 
31 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32 
33 template<class Type>
35 (
36  const pointPatch& p,
38 )
39 :
40  pointPatchField<Type>(p, iF)
41 {}
42 
43 
44 template<class Type>
46 (
47  const pointPatch& p,
49  const dictionary& dict
50 )
51 :
52  pointPatchField<Type>(p, iF, dict)
53 {}
54 
55 
56 template<class Type>
58 (
60  const pointPatch& p,
62  const pointPatchFieldMapper& mapper
63 )
64 :
65  pointPatchField<Type>(ptf, p, iF, mapper)
66 {}
67 
68 
69 template<class Type>
71 (
74 )
75 :
76  pointPatchField<Type>(ptf, iF)
77 {}
78 
79 
80 template<class Type>
81 template<class Type2>
84 (
85  const pointPatchField<Type2>& pf
86 )
87 {
88  auto* patchTypeCtor = patchConstructorTable(pf.patch().type());
89 
90  if (patchTypeCtor)
91  {
93  (
94  patchTypeCtor
95  (
96  pf.patch(),
98  )
99  );
100  }
101  else
102  {
103  return autoPtr<pointPatchField<Type>>
104  (
105  new calculatedPointPatchField<Type>
106  (
107  pf.patch(),
108  Field<Type>::null()
109  )
110  );
111  }
112 }
113 
114 
115 // ************************************************************************* //
dictionary dict
const pointPatch & patch() const noexcept
Return the patch.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Foam::pointPatchFieldMapper.
A calculated boundary condition for pointField.
Abstract base class for point-mesh patch fields.
static autoPtr< pointPatchField< Type > > NewCalculatedType(const pointPatchField< Type2 > &)
Return a pointer to a new calculatedPointPatchField created on.
Generic templated field type.
Definition: Field.H:62
calculatedPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:61
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
volScalarField & p