calculatedFvsPatchField.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-2023 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 #include "fvPatchFieldMapper.H"
31 
32 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
33 
34 template<class Type>
36 (
37  const fvPatch& p,
39 )
40 :
41  fvsPatchField<Type>(p, iF)
42 {}
43 
44 
45 template<class Type>
47 (
48  const fvPatch& p,
50  const dictionary& dict
51 )
52 :
53  fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
54 {}
55 
56 
57 template<class Type>
59 (
61  const fvPatch& p,
63  const fvPatchFieldMapper& mapper
64 )
65 :
66  fvsPatchField<Type>(ptf, p, iF, mapper)
67 {}
68 
69 
70 template<class Type>
72 (
74 )
75 :
76  fvsPatchField<Type>(ptf)
77 {}
78 
79 
80 template<class Type>
82 (
85 )
86 :
87  fvsPatchField<Type>(ptf, iF)
88 {}
89 
90 
91 template<class Type>
94 (
95  const fvPatch& p
96 )
97 {
98  auto* patchTypeCtor = patchConstructorTable(p.type());
99 
100  if (patchTypeCtor)
101  {
102  return patchTypeCtor
103  (
104  p,
106  );
107  }
108  else
109  {
110  return tmp<fvsPatchField<Type>>
111  (
112  new calculatedFvsPatchField<Type>
113  (
114  p,
115  DimensionedField<Type, surfaceMesh>::null()
116  )
117  );
118  }
119 }
120 
121 
122 template<class Type>
123 template<class Type2>
126 (
127  const fvsPatchField<Type2>& pf
128 )
129 {
130  return NewCalculatedType(pf.patch());
131 }
132 
133 
134 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
calculatedFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
const fvPatch & patch() const noexcept
Return the patch.
static tmp< fvsPatchField< Type > > NewCalculatedType(const fvPatch &)
Return a pointer to a new calculatedFvsPatchField created on.
A FieldMapper for finite-volume patch fields.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
Foam::calculatedFvsPatchField.
volScalarField & p
A class for managing temporary objects.
Definition: HashPtrTable.H:50
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...