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 -------------------------------------------------------------------------------
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 "faPatchFieldMapper.H"
31 
32 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
33 
34 template<class Type>
36 (
37  const faPatch& p,
39 )
40 :
41  faePatchField<Type>(p, iF)
42 {}
43 
44 
45 template<class Type>
47 (
49  const faPatch& p,
51  const faPatchFieldMapper& mapper
52 )
53 :
54  faePatchField<Type>(ptf, p, iF, mapper)
55 {}
56 
57 
58 template<class Type>
60 (
61  const faPatch& p,
63  const dictionary& dict,
64  IOobjectOption::readOption requireValue
65 )
66 :
67  faePatchField<Type>(p, iF, dict, requireValue)
68 {}
69 
70 
71 template<class Type>
73 (
75 )
76 :
77  faePatchField<Type>(ptf)
78 {}
79 
80 
81 template<class Type>
83 (
86 )
87 :
88  faePatchField<Type>(ptf, iF)
89 {}
90 
91 
92 template<class Type>
93 template<class Type2>
96 (
97  const faePatchField<Type2>& pf
98 )
99 {
100  auto* patchTypeCtor = patchConstructorTable(pf.patch().type());
101 
102  if (patchTypeCtor)
103  {
104  return patchTypeCtor
105  (
106  pf.patch(),
108  );
109  }
110  else
111  {
112  return tmp<faePatchField<Type>>
113  (
114  new calculatedFaePatchField<Type>
115  (
116  pf.patch(),
117  DimensionedField<Type, edgeMesh>::null()
118  )
119  );
120  }
121 }
122 
123 
124 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
125 
126 template<class Type>
128 {
130  faePatchField<Type>::writeValueEntry(os);
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
virtual void write(Ostream &) const
Write.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
const faPatch & patch() const noexcept
Return the patch.
OBJstream os(runTime.globalPath()/outputName)
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:72
static tmp< faePatchField< Type > > NewCalculatedType(const faePatchField< Type2 > &)
Return a pointer to a new calculatedFaePatchField created on.
calculatedFaePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
faePatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cove...
Definition: edgeFieldsFwd.H:46
volScalarField & p
A class for managing temporary objects.
Definition: HashPtrTable.H:50
A FieldMapper for finite-area patch fields.
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
readOption
Enumeration defining read preferences.