Loading...
Searching...
No Matches
wedgeFvsPatchField.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-2015 OpenFOAM Foundation
9 Copyright (C) 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\*---------------------------------------------------------------------------*/
28
29#include "wedgeFvsPatchField.H"
30
31// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32
33template<class Type>
35(
36 const fvPatch& p,
39:
40 fvsPatchField<Type>(p, iF)
41{}
42
43
44template<class Type>
46(
47 const fvPatch& p,
49 const dictionary& dict
50)
51:
52 fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
53{
55 {
57 << "patch " << this->patch().index() << " not wedge type. "
58 << "Patch type = " << p.type()
60 }
61}
62
63
64template<class Type>
66(
67 const wedgeFvsPatchField<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<wedgeFvPatch>(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()
82 << exit(FatalError);
83 }
84}
85
86
87template<class Type>
89(
90 const wedgeFvsPatchField<Type>& ptf,
91 const DimensionedField<Type, surfaceMesh>& iF
93:
94 fvsPatchField<Type>(ptf, iF)
95{}
96
97
98template<class Type>
100(
101 const wedgeFvsPatchField<Type>& ptf
102)
103:
105{}
106
107
108// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
109
110template<class Type>
112{
115}
116
117
118// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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
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
label index() const noexcept
The index of this patch in the boundary mesh.
Definition fvPatch.H:218
const fvPatch & patch() const noexcept
Return the patch.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
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".
const DimensionedField< Type, surfaceMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
This boundary condition is similar to the cyclic condition, except that it is applied to 2-D geometri...
virtual void write(Ostream &) const
Write includes "value" entry.
wedgeFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
volScalarField & p
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition error.H:629
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition error.H:600
OBJstream os(runTime.globalPath()/outputName)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition Ostream.H:519
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
bool isType(const U &obj)
Check if typeid of the object and Type are identical.
Definition typeInfo.H:112
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition errorManip.H:125
dictionary dict