Loading...
Searching...
No Matches
calculatedFaePatchField.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) 2016-2017 Wikki Ltd
9 Copyright (C) 2021-2023 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 "faPatchFieldMapper.H"
31
32// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
33
34template<class Type>
36(
37 const faPatch& p,
40:
41 faePatchField<Type>(p, iF)
42{}
43
44
45template<class Type>
47(
49 const faPatch& p,
51 const faPatchFieldMapper& mapper
53:
54 faePatchField<Type>(ptf, p, iF, mapper)
55{}
56
57
58template<class Type>
60(
61 const faPatch& p,
63 const dictionary& dict,
66:
67 faePatchField<Type>(p, iF, dict, requireValue)
68{}
69
70
71template<class Type>
73(
76:
77 faePatchField<Type>(ptf)
78{}
79
80
81template<class Type>
83(
86)
88 faePatchField<Type>(ptf, iF)
89{}
90
91
92template<class Type>
95(
96 const faPatch& p
97)
98{
99 auto* patchTypeCtor = patchConstructorTable(p.type());
100
101 if (patchTypeCtor)
102 {
103 return patchTypeCtor
104 (
105 p,
107 );
108 }
109 else
110 {
111 return tmp<faePatchField<Type>>
112 (
113 new calculatedFaePatchField<Type>
114 (
115 p,
116 DimensionedField<Type, edgeMesh>::null()
117 )
118 );
120}
121
122
123template<class Type>
124template<class AnyType>
127(
128 const faePatchField<AnyType>& pf
129)
130{
131 return NewCalculatedType(pf.patch());
132}
133
134
135// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
136
137template<class Type>
139{
142}
143
144
145// ************************************************************************* //
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).
readOption
Enumeration defining read preferences.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
virtual void write(Ostream &) const
Write.
calculatedFaePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &)
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-area patch fields.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition faPatch.H:76
const faPatch & patch() const noexcept
Return the patch.
faePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &)
Construct from patch and internal field.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
static tmp< faePatchField< Type > > NewCalculatedType(const faPatch &p)
Return a pointer to a new calculatedFaePatchField created on.
virtual void write(Ostream &os) const
Write.
A class for managing temporary objects.
Definition tmp.H:75
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
dictionary dict