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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 template<class Type>
35 {
37 }
38 
39 
40 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
41 
42 template<class Type>
44 (
45  const pointPatch& p,
47 )
48 :
49  pointPatchField<Type>(p, iF)
50 {}
51 
52 
53 template<class Type>
55 (
56  const pointPatch& p,
58  const dictionary& dict
59 )
60 :
61  pointPatchField<Type>(p, iF, dict)
62 {}
63 
64 
65 template<class Type>
67 (
69  const pointPatch& p,
71  const pointPatchFieldMapper& mapper
72 )
73 :
74  pointPatchField<Type>(ptf, p, iF, mapper)
75 {}
76 
77 
78 template<class Type>
80 (
83 )
84 :
85  pointPatchField<Type>(ptf, iF)
86 {}
87 
88 
89 template<class Type>
90 template<class Type2>
93 (
94  const pointPatchField<Type2>& pf
95 )
96 {
97  auto* patchTypeCtor = patchConstructorTable(pf.patch().type());
98 
99  if (patchTypeCtor)
100  {
102  (
103  patchTypeCtor
104  (
105  pf.patch(),
107  )
108  );
109  }
110  else
111  {
112  return autoPtr<pointPatchField<Type>>
113  (
114  new calculatedPointPatchField<Type>
115  (
116  pf.patch(),
117  Field<Type>::null()
118  )
119  );
120  }
121 }
122 
123 
124 // ************************************************************************* //
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:120
Foam::pointPatchFieldMapper.
A calculated boundary condition for pointField.
Abstract base class for point-mesh patch fields.
static const word & calculatedType()
The type name for calculated 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:61
A class for handling words, derived from Foam::string.
Definition: word.H:63
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