1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "processorFvsPatchField.H"
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
36 processorFvsPatchField<Type>::processorFvsPatchField
39 const DimensionedField<Type, surfaceMesh>& iF
42 coupledFvsPatchField<Type>(p, iF),
43 procPatch_(refCast<const processorFvPatch>(p))
48 processorFvsPatchField<Type>::processorFvsPatchField
51 const DimensionedField<Type, surfaceMesh>& iF,
55 coupledFvsPatchField<Type>(p, iF, f),
56 procPatch_(refCast<const processorFvPatch>(p))
60 // Construct by mapping given processorFvsPatchField<Type>
62 processorFvsPatchField<Type>::processorFvsPatchField
64 const processorFvsPatchField<Type>& ptf,
66 const DimensionedField<Type, surfaceMesh>& iF,
67 const fvPatchFieldMapper& mapper
70 coupledFvsPatchField<Type>(ptf, p, iF, mapper),
71 procPatch_(refCast<const processorFvPatch>(p))
73 if (!isType<processorFvPatch>(this->patch()))
77 "processorFvsPatchField<Type>::processorFvsPatchField\n"
79 " const processorFvsPatchField<Type>& ptf,\n"
80 " const fvPatch& p,\n"
81 " const DimensionedField<Type, surfaceMesh>& iF,\n"
82 " const fvPatchFieldMapper& mapper\n"
84 ) << "Field type does not correspond to patch type for patch "
85 << this->patch().index() << "." << endl
86 << "Field type: " << typeName << endl
87 << "Patch type: " << this->patch().type()
94 processorFvsPatchField<Type>::processorFvsPatchField
97 const DimensionedField<Type, surfaceMesh>& iF,
98 const dictionary& dict
101 coupledFvsPatchField<Type>(p, iF, dict),
102 procPatch_(refCast<const processorFvPatch>(p))
104 if (!isType<processorFvPatch>(p))
108 "processorFvsPatchField<Type>::processorFvsPatchField\n"
110 " const fvPatch& p,\n"
111 " const Field<Type>& field,\n"
112 " const dictionary& dict\n"
115 ) << "patch " << this->patch().index() << " not processor type. "
116 << "Patch type = " << p.type()
117 << exit(FatalIOError);
123 processorFvsPatchField<Type>::processorFvsPatchField
125 const processorFvsPatchField<Type>& ptf
128 coupledFvsPatchField<Type>(ptf),
129 procPatch_(refCast<const processorFvPatch>(ptf.patch()))
134 processorFvsPatchField<Type>::processorFvsPatchField
136 const processorFvsPatchField<Type>& ptf,
137 const DimensionedField<Type, surfaceMesh>& iF
140 coupledFvsPatchField<Type>(ptf, iF),
141 procPatch_(refCast<const processorFvPatch>(ptf.patch()))
145 // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
148 processorFvsPatchField<Type>::~processorFvsPatchField()
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // ************************************************************************* //