initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvsPatchFields / constraint / cyclic / cyclicFvsPatchField.C
blob1175c44f97b4ecbacaa203e607bcaf258ed67ba1
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 \*---------------------------------------------------------------------------*/
27 #include "cyclicFvsPatchField.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 namespace Foam
34 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
36 template<class Type>
37 cyclicFvsPatchField<Type>::cyclicFvsPatchField
39     const fvPatch& p,
40     const DimensionedField<Type, surfaceMesh>& iF
43     coupledFvsPatchField<Type>(p, iF),
44     cyclicPatch_(refCast<const cyclicFvPatch>(p))
48 template<class Type>
49 cyclicFvsPatchField<Type>::cyclicFvsPatchField
51     const cyclicFvsPatchField<Type>& ptf,
52     const fvPatch& p,
53     const DimensionedField<Type, surfaceMesh>& iF,
54     const fvPatchFieldMapper& mapper
57     coupledFvsPatchField<Type>(ptf, p, iF, mapper),
58     cyclicPatch_(refCast<const cyclicFvPatch>(p))
60     if (!isType<cyclicFvPatch>(this->patch()))
61     {
62         FatalErrorIn
63         (
64             "cyclicFvsPatchField<Type>::cyclicFvsPatchField\n"
65             "(\n"
66             "    const cyclicFvsPatchField<Type>& ptf,\n"
67             "    const fvPatch& p,\n"
68             "    const DimensionedField<Type, surfaceMesh>& iF,\n"
69             "    const fvPatchFieldMapper& mapper\n"
70             ")\n"
71         )   << "Field type does not correspond to patch type for patch "
72             << this->patch().index() << "." << endl
73             << "Field type: " << typeName << endl
74             << "Patch type: " << this->patch().type()
75             << exit(FatalError);
76     }
80 template<class Type>
81 cyclicFvsPatchField<Type>::cyclicFvsPatchField
83     const fvPatch& p,
84     const DimensionedField<Type, surfaceMesh>& iF,
85     const dictionary& dict
88     coupledFvsPatchField<Type>(p, iF, dict),
89     cyclicPatch_(refCast<const cyclicFvPatch>(p))
91     if (!isType<cyclicFvPatch>(p))
92     {
93         FatalIOErrorIn
94         (
95             "cyclicFvsPatchField<Type>::cyclicFvsPatchField\n"
96             "(\n"
97             "    const fvPatch& p,\n"
98             "    const Field<Type>& field,\n"
99             "    const dictionary& dict\n"
100             ")\n",
101             dict
102         )   << "patch " << this->patch().index() << " not cyclic type. "
103             << "Patch type = " << p.type()
104             << exit(FatalIOError);
105     }
109 template<class Type>
110 cyclicFvsPatchField<Type>::cyclicFvsPatchField
112     const cyclicFvsPatchField<Type>& ptf
115     coupledFvsPatchField<Type>(ptf),
116     cyclicPatch_(ptf.cyclicPatch_)
120 template<class Type>
121 cyclicFvsPatchField<Type>::cyclicFvsPatchField
123     const cyclicFvsPatchField<Type>& ptf,
124     const DimensionedField<Type, surfaceMesh>& iF
127     coupledFvsPatchField<Type>(ptf, iF),
128     cyclicPatch_(ptf.cyclicPatch_)
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 } // End namespace Foam
136 // ************************************************************************* //