Loading...
Searching...
No Matches
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-2024 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\*---------------------------------------------------------------------------*/
30#include "fvPatchFieldMapper.H"
31
32// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
33
34template<class Type>
36(
37 const fvPatch& p,
40:
41 fvsPatchField<Type>(p, iF)
42{}
43
44
45template<class Type>
47(
48 const fvPatch& p,
50 const dictionary& dict
52:
53 fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
54{}
55
56
57template<class Type>
59(
61 const fvPatch& p,
63 const fvPatchFieldMapper& mapper
65:
66 fvsPatchField<Type>(ptf, p, iF, mapper)
67{}
68
69
70template<class Type>
72(
75:
76 fvsPatchField<Type>(ptf)
77{}
78
79
80template<class Type>
82(
85)
87 fvsPatchField<Type>(ptf, iF)
88{}
89
90
91template<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 );
119}
120
121
122template<class Type>
123template<class AnyType>
126(
127 const fvsPatchField<AnyType>& pf
128)
129{
130 return NewCalculatedType(pf.patch());
131}
132
133
134// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
135
136template<class Type>
138{
141}
142
143
144// ************************************************************************* //
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).
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
virtual void write(Ostream &) const
Write includes "value" entry.
calculatedFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
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
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
const fvPatch & patch() const noexcept
Return the patch.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &os) const
Write the patch "type".
static tmp< fvsPatchField< Type > > NewCalculatedType(const fvPatch &p)
Return a pointer to a new calculatedFvsPatchField created on.
A class for managing temporary objects.
Definition tmp.H:75
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
dictionary dict