Loading...
Searching...
No Matches
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 as copy setting internal field reference
123 (
126 );
127
128 //- Return a clone
129 virtual tmp<fvPatchField<Type>> clone() const
130 {
131 return fvPatchField<Type>::Clone(*this);
132 }
133
134 //- Clone with an internal field reference
136 (
138 ) const
140 return fvPatchField<Type>::Clone(*this, iF);
141 }
142
143
144 //- Destructor
145 virtual ~externalCoupledMixedFvPatchField() = default;
146
148 // Member functions
149
150 //- Write header
151 virtual void writeHeader(Ostream& os) const;
152
153 //- Write data
154 virtual void writeData(Ostream& os) const;
155
156 //- Read data
157 virtual void readData(Istream& is);
158};
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163} // End namespace Foam
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#ifdef NoRepository
169#endif
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173#endif
174
175// ************************************************************************* //
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:60
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
virtual ~externalCoupledMixedFvPatchField()=default
Destructor.
virtual void writeHeader(Ostream &os) const
Write header.
virtual void writeData(Ostream &os) const
Write data.
externalCoupledMixedFvPatchField(const externalCoupledMixedFvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &)
Construct by mapping given externalCoupledMixedFvPatchField.
TypeName("externalCoupled")
Runtime type information.
virtual tmp< fvPatchField< Type > > clone() const
Return a clone.
externalCoupledMixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Clone with an internal field reference.
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
mixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition tmp.H:75
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68