1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "processorFvsPatchField.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37 processorFvsPatchField<Type>::processorFvsPatchField
40 const DimensionedField<Type, surfaceMesh>& iF
43 coupledFvsPatchField<Type>(p, iF),
44 procPatch_(refCast<const processorFvPatch>(p))
49 processorFvsPatchField<Type>::processorFvsPatchField
52 const DimensionedField<Type, surfaceMesh>& iF,
56 coupledFvsPatchField<Type>(p, iF, f),
57 procPatch_(refCast<const processorFvPatch>(p))
61 // Construct by mapping given processorFvsPatchField<Type>
63 processorFvsPatchField<Type>::processorFvsPatchField
65 const processorFvsPatchField<Type>& ptf,
67 const DimensionedField<Type, surfaceMesh>& iF,
68 const fvPatchFieldMapper& mapper
71 coupledFvsPatchField<Type>(ptf, p, iF, mapper),
72 procPatch_(refCast<const processorFvPatch>(p))
74 if (!isType<processorFvPatch>(this->patch()))
78 "processorFvsPatchField<Type>::processorFvsPatchField\n"
80 " const processorFvsPatchField<Type>& ptf,\n"
81 " const fvPatch& p,\n"
82 " const DimensionedField<Type, surfaceMesh>& iF,\n"
83 " const fvPatchFieldMapper& mapper\n"
85 ) << "Field type does not correspond to patch type for patch "
86 << this->patch().index() << "." << endl
87 << "Field type: " << typeName << endl
88 << "Patch type: " << this->patch().type()
95 processorFvsPatchField<Type>::processorFvsPatchField
98 const DimensionedField<Type, surfaceMesh>& iF,
99 const dictionary& dict
102 coupledFvsPatchField<Type>(p, iF, dict),
103 procPatch_(refCast<const processorFvPatch>(p))
105 if (!isType<processorFvPatch>(p))
109 "processorFvsPatchField<Type>::processorFvsPatchField\n"
111 " const fvPatch& p,\n"
112 " const Field<Type>& field,\n"
113 " const dictionary& dict\n"
116 ) << "patch " << this->patch().index() << " not processor type. "
117 << "Patch type = " << p.type()
118 << exit(FatalIOError);
124 processorFvsPatchField<Type>::processorFvsPatchField
126 const processorFvsPatchField<Type>& ptf
129 coupledFvsPatchField<Type>(ptf),
130 procPatch_(refCast<const processorFvPatch>(ptf.patch()))
135 processorFvsPatchField<Type>::processorFvsPatchField
137 const processorFvsPatchField<Type>& ptf,
138 const DimensionedField<Type, surfaceMesh>& iF
141 coupledFvsPatchField<Type>(ptf, iF),
142 procPatch_(refCast<const processorFvPatch>(ptf.patch()))
146 // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
149 processorFvsPatchField<Type>::~processorFvsPatchField()
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace Foam
157 // ************************************************************************* //