Fix tutorials: coupled/conjugateHeatFoam/conjugateCavity: fix Allrun file
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvsPatchFields / constraint / ggi / ggiFvsPatchField.C
blob5f96c6fd1659baa55ef206fc22ecb00e3761bd3c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 Author
26     Hrvoje Jasak, Wikki Ltd.  All rights reserved
28 \*---------------------------------------------------------------------------*/
30 #include "ggiFvsPatchField.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
37 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
39 template<class Type>
40 ggiFvsPatchField<Type>::ggiFvsPatchField
42     const fvPatch& p,
43     const DimensionedField<Type, surfaceMesh>& iF
46     coupledFvsPatchField<Type>(p, iF),
47     ggiPatch_(refCast<const ggiFvPatch>(p))
51 template<class Type>
52 ggiFvsPatchField<Type>::ggiFvsPatchField
54     const fvPatch& p,
55     const DimensionedField<Type, surfaceMesh>& iF,
56     const dictionary& dict
59     coupledFvsPatchField<Type>(p, iF, dict, true),
60     ggiPatch_(refCast<const ggiFvPatch>(p))
62     if (!isType<ggiFvPatch>(p))
63     {
64         FatalIOErrorIn
65         (
66             "ggiFvsPatchField<Type>::ggiFvsPatchField\n"
67             "(\n"
68             "    const fvPatch& p,\n"
69             "    const DimensionedField<Type, surfaceMesh>& iF,\n"
70             "    const dictionary& dict\n"
71             ")\n",
72             dict
73         )   << "patch " << this->patch().index() << " not ggi type. "
74             << "Patch type = " << p.type()
75             << exit(FatalIOError);
76     }
80 template<class Type>
81 ggiFvsPatchField<Type>::ggiFvsPatchField
83     const ggiFvsPatchField<Type>& ptf,
84     const fvPatch& p,
85     const DimensionedField<Type, surfaceMesh>& iF,
86     const fvPatchFieldMapper& mapper
89     coupledFvsPatchField<Type>(ptf, p, iF, mapper),
90     ggiPatch_(refCast<const ggiFvPatch>(p))
92     if (!isType<ggiFvPatch>(this->patch()))
93     {
94         FatalErrorIn
95         (
96             "ggiFvsPatchField<Type>::ggiFvsPatchField\n"
97             "(\n"
98             "    const ggiFvsPatchField<Type>& ptf,\n"
99             "    const fvPatch& p,\n"
100             "    const DimensionedField<Type, surfaceMesh>& iF,\n"
101             "    const fvPatchFieldMapper& mapper\n"
102             ")\n"
103         )   << "Field type does not correspond to patch type for patch "
104             << this->patch().index() << "." << endl
105             << "Field type: " << typeName << endl
106             << "Patch type: " << this->patch().type()
107             << exit(FatalError);
108     }
112 template<class Type>
113 ggiFvsPatchField<Type>::ggiFvsPatchField
115     const ggiFvsPatchField<Type>& ptf,
116     const DimensionedField<Type, surfaceMesh>& iF
119     coupledFvsPatchField<Type>(ptf, iF),
120     ggiPatch_(refCast<const ggiFvPatch>(ptf.patch()))
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 } // End namespace Foam
128 // ************************************************************************* //