externalCoupledMixedFvPatchField.H
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-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::externalCoupledMixedFvPatchField
28
29Group
30 grpGenericBoundaryConditions grpCoupledBoundaryConditions
31
32Description
33 Extends the mixed boundary condition with serialisation functions.
34
35 The serialisation functions:
36
37 - writeHeader
38 - writeData
39 - readData
40
41 It is used for coupling to external applications in combination
42 with the externalCoupled functionObject. The default output is one
43 line per face, with columns
44 \verbatim
45 <value> <snGrad> <refValue> <refGrad> <valueFraction>
46 \endverbatim
47
48Note
49 readData, writeData are not callbacks for regIOobject (since fvPatchField
50 not derived from it). They do however do exactly the same - streaming of
51 data.
52
53SeeAlso
54 mixedFvPatchField
55 externalCoupledFunctionObject
56
57SourceFiles
58 externalCoupledMixedFvPatchField.C
59
60\*---------------------------------------------------------------------------*/
61
62#ifndef externalCoupledMixedFvPatchField_H
63#define externalCoupledMixedFvPatchField_H
64
65#include "mixedFvPatchFields.H"
66
67// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68
69namespace Foam
70{
71
72/*---------------------------------------------------------------------------*\
73 Class externalCoupledMixedFvPatchField Declaration
74\*---------------------------------------------------------------------------*/
75
76template<class Type>
78:
79 public mixedFvPatchField<Type>
80{
81
82public:
83
84 //- Runtime type information
85 TypeName("externalCoupled");
86
87
88 // Constructors
89
90 //- Construct from patch and internal field
92 (
93 const fvPatch&,
95 );
96
97 //- Construct from patch, internal field and dictionary
99 (
100 const fvPatch&,
102 const dictionary&
103 );
104
105 //- Construct by mapping given externalCoupledMixedFvPatchField
106 // onto a new patch
108 (
110 const fvPatch&,
112 const fvPatchFieldMapper&
113 );
114
115 //- Construct as copy
117 (
119 );
120
121 //- Construct and return a clone
122 virtual tmp<fvPatchField<Type>> clone() const
123 {
125 (
127 );
128 }
129
130 //- Construct as copy setting internal field reference
132 (
135 );
136
137 //- Construct and return a clone setting internal field reference
139 (
141 ) const
142 {
144 (
146 );
147 }
148
149
150 //- Destructor
151 virtual ~externalCoupledMixedFvPatchField() = default;
152
153
154 // Member functions
155
156 //- Write header
157 virtual void writeHeader(Ostream& os) const;
158
159 //- Write data
160 virtual void writeData(Ostream& os) const;
161
162 //- Read data
163 virtual void readData(Istream& is);
164};
165
166
167// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168
169} // End namespace Foam
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173#ifdef NoRepository
175#endif
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179#endif
180
181// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Extends the mixed boundary condition with serialisation functions.
virtual ~externalCoupledMixedFvPatchField()=default
Destructor.
virtual void writeHeader(Ostream &os) const
Write header.
virtual void writeData(Ostream &os) const
Write data.
TypeName("externalCoupled")
Runtime type information.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Construct and return a clone setting internal field reference.
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition provides a base class for 'mixed' type boundary conditions,...
A class for managing temporary objects.
Definition: tmp.H:65
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73