Fix tutorials: coupled/conjugateHeatFoam/conjugateCavity: fix Allrun file
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvsPatchFields / constraint / empty / emptyFvsPatchField.C
blob3cfb81203c3ff4cbe2e25ffd3e85402533070c28
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 \*---------------------------------------------------------------------------*/
27 #include "emptyFvsPatchField.H"
28 #include "fvPatchFieldMapper.H"
29 #include "surfaceMesh.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 namespace Foam
36 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
38 template<class Type>
39 emptyFvsPatchField<Type>::emptyFvsPatchField
41     const fvPatch& p,
42     const DimensionedField<Type, surfaceMesh>& iF
45     fvsPatchField<Type>(p, iF, Field<Type>(0))
49 template<class Type>
50 emptyFvsPatchField<Type>::emptyFvsPatchField
52     const emptyFvsPatchField<Type>&,
53     const fvPatch& p,
54     const DimensionedField<Type, surfaceMesh>& iF,
55     const fvPatchFieldMapper&
58     fvsPatchField<Type>(p, iF, Field<Type>(0))
60     if (!isType<emptyFvPatch>(this->patch()))
61     {
62         FatalErrorIn
63         (
64             "emptyFvsPatchField<Type>::emptyFvsPatchField\n"
65             "(\n"
66             "    const emptyFvsPatchField<Type>&,\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 emptyFvsPatchField<Type>::emptyFvsPatchField
83     const fvPatch& p,
84     const DimensionedField<Type, surfaceMesh>& iF,
85     const dictionary& dict
88     fvsPatchField<Type>(p, iF, Field<Type>(0))
90     if (!isType<emptyFvPatch>(p))
91     {
92         FatalIOErrorIn
93         (
94             "emptyFvsPatchField<Type>::emptyFvsPatchField\n"
95             "(\n"
96             "    const fvPatch& p,\n"
97             "    const Field<Type>& field,\n"
98             "    const dictionary& dict\n"
99             ")\n",
100             dict
101         )   << "patch " << this->patch().index() << " not empty type. "
102             << "Patch type = " << p.type()
103             << exit(FatalIOError);
104     }
108 template<class Type>
109 emptyFvsPatchField<Type>::emptyFvsPatchField
111     const emptyFvsPatchField<Type>& ptf
114     fvsPatchField<Type>
115     (
116         ptf.patch(),
117         ptf.dimensionedInternalField(),
118         Field<Type>(0)
119     )
123 template<class Type>
124 emptyFvsPatchField<Type>::emptyFvsPatchField
126     const emptyFvsPatchField<Type>& ptf,
127     const DimensionedField<Type, surfaceMesh>& iF
130     fvsPatchField<Type>(ptf.patch(), iF, Field<Type>(0))
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace Foam
138 // ************************************************************************* //