symmetryPlaneFvsPatchField.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) 2013-2015 OpenFOAM Foundation
9  Copyright (C) 2024 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 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 template<class Type>
35 (
36  const fvPatch& p,
38 )
39 :
40  fvsPatchField<Type>(p, iF)
41 {}
42 
43 
44 template<class Type>
46 (
47  const fvPatch& p,
49  const dictionary& dict
50 )
51 :
52  fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
53 {
54  if (!isType<symmetryPlaneFvPatch>(p))
55  {
57  << "patch " << this->patch().index() << " not symmetryPlane type. "
58  << "Patch type = " << p.type()
60  }
61 }
62 
63 
64 template<class Type>
66 (
67  const symmetryPlaneFvsPatchField<Type>& ptf,
68  const fvPatch& p,
69  const DimensionedField<Type, surfaceMesh>& iF,
70  const fvPatchFieldMapper& mapper
71 )
72 :
73  fvsPatchField<Type>(ptf, p, iF, mapper)
74 {
75  if (!isType<symmetryPlaneFvPatch>(this->patch()))
76  {
78  << "Field type does not correspond to patch type for patch "
79  << this->patch().index() << "." << endl
80  << "Field type: " << typeName << endl
81  << "Patch type: " << this->patch().type()
83  }
84 }
85 
86 
87 template<class Type>
89 (
90  const symmetryPlaneFvsPatchField<Type>& ptf,
91  const DimensionedField<Type, surfaceMesh>& iF
92 )
93 :
94  fvsPatchField<Type>(ptf, iF)
95 {}
96 
97 
98 template<class Type>
100 (
102 )
103 :
104  symmetryPlaneFvsPatchField<Type>(ptf, ptf.internalField())
105 {}
106 
107 
108 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
109 
110 template<class Type>
112 {
115 }
116 
117 
118 // ************************************************************************* //
symmetryPlaneFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
dictionary dict
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:125
error FatalError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL ERROR&#39; header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:608
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
This boundary condition enforces a symmetryPlane constraint.
const fvPatch & patch() const noexcept
Return the patch.
static const char *const typeName
Typename for Field.
Definition: Field.H:86
virtual void write(Ostream &) const
Write includes "value" entry.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
OBJstream os(runTime.globalPath()/outputName)
virtual void write(Ostream &os) const
Write the patch "type".
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:637
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
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...
volScalarField & p
label index() const noexcept
The index of this patch in the boundary mesh.
Definition: fvPatch.H:218
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
IOerror FatalIOError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL IO ERROR&#39; header text and ...