Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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
33template<class Type>
35(
36 const pointPatch& p,
39:
40 pointPatchField<Type>(p, iF)
41{}
42
43
44template<class Type>
46(
47 const pointPatch& p,
49 const dictionary& dict
51:
52 pointPatchField<Type>(p, iF, dict)
53{}
54
55
56template<class Type>
58(
60 const pointPatch& p,
62 const pointPatchFieldMapper& mapper
64:
65 pointPatchField<Type>(ptf, p, iF, mapper)
66{}
67
68
69template<class Type>
71(
74)
76 pointPatchField<Type>(ptf, iF)
77{}
78
79
80template<class Type>
83(
84 const pointPatch& p
85)
86{
87 auto* patchTypeCtor = patchConstructorTable(p.type());
88
89 if (patchTypeCtor)
90 {
92 (
93 patchTypeCtor
94 (
95 p,
97 )
98 );
99 }
100 else
101 {
102 return autoPtr<pointPatchField<Type>>
103 (
104 new calculatedPointPatchField<Type>
105 (
106 p,
107 DimensionedField<Type, pointMesh>::null()
108 )
109 );
111}
112
113
114template<class Type>
115template<class AnyType>
118(
119 const pointPatchField<AnyType>& pf
120)
121{
122 return NewCalculatedType(pf.patch());
123}
124
125
126// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static const this_type & null() noexcept
Return a null DimensionedField (reference to a nullObject).
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A calculated boundary condition for pointField.
calculatedPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const pointPatch & patch() const noexcept
Return the patch.
Foam::pointPatchFieldMapper.
static autoPtr< pointPatchField< Type > > NewCalculatedType(const pointPatch &p)
Return a pointer to a new calculatedPointPatchField created on.
pointPatchField(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:67
volScalarField & p
dictionary dict