fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvsPatchFields / constraint / overlapGgi / overlapGgiFvsPatchField.C
blob542a0ed64a6f939b69aeaf478823073bcb73267c
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 "overlapGgiFvsPatchField.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
37 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
39 template<class Type>
40 overlapGgiFvsPatchField<Type>::overlapGgiFvsPatchField
42     const fvPatch& p,
43     const DimensionedField<Type, surfaceMesh>& iF
46     coupledFvsPatchField<Type>(p, iF),
47     overlapGgiPatch_(refCast<const overlapGgiFvPatch>(p))
51 template<class Type>
52 overlapGgiFvsPatchField<Type>::overlapGgiFvsPatchField
54     const fvPatch& p,
55     const DimensionedField<Type, surfaceMesh>& iF,
56     const dictionary& dict
59     coupledFvsPatchField<Type>(p, iF, dict, true),
60     overlapGgiPatch_(refCast<const overlapGgiFvPatch>(p))
62     if (!isType<overlapGgiFvPatch>(p))
63     {
64         FatalIOErrorIn
65         (
66             "overlapGgiFvsPatchField<Type>::overlapGgiFvsPatchField\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 overlapGgi type. "
74             << "Patch type = " << p.type()
75             << exit(FatalIOError);
76     }
80 template<class Type>
81 overlapGgiFvsPatchField<Type>::overlapGgiFvsPatchField
83     const overlapGgiFvsPatchField<Type>& ptf,
84     const fvPatch& p,
85     const DimensionedField<Type, surfaceMesh>& iF,
86     const fvPatchFieldMapper& mapper
89     coupledFvsPatchField<Type>(ptf, p, iF, mapper),
90     overlapGgiPatch_(refCast<const overlapGgiFvPatch>(p))
92     if (!isType<overlapGgiFvPatch>(this->patch()))
93     {
94         FatalErrorIn
95         (
96             "overlapGgiFvsPatchField<Type>::overlapGgiFvsPatchField\n"
97             "(\n"
98             "    const overlapGgiFvsPatchField<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 overlapGgiFvsPatchField<Type>::overlapGgiFvsPatchField
115     const overlapGgiFvsPatchField<Type>& ptf,
116     const DimensionedField<Type, surfaceMesh>& iF
119     coupledFvsPatchField<Type>(ptf, iF),
120     overlapGgiPatch_(refCast<const overlapGgiFvPatch>(ptf.patch()))
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 } // End namespace Foam
128 // ************************************************************************* //