Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / OpenFOAM / fields / pointPatchFields / constraint / empty / emptyPointPatchField.C
blobb685a5a4b490e911c142d444e25cdae0a9a8be0a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2004-2010 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
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
19     for more details.
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 "emptyPointPatchField.H"
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 namespace Foam
33 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
35 template<class Type>
36 emptyPointPatchField<Type>::emptyPointPatchField
38     const pointPatch& p,
39     const DimensionedField<Type, pointMesh>& iF
42     pointPatchField<Type>(p, iF)
46 template<class Type>
47 emptyPointPatchField<Type>::emptyPointPatchField
49     const pointPatch& p,
50     const DimensionedField<Type, pointMesh>& iF,
51     const dictionary& dict
54     pointPatchField<Type>(p, iF, dict)
56     if (!isType<emptyPointPatch>(p))
57     {
58         FatalIOErrorIn
59         (
60             "emptyPointPatchField<Type>::emptyPointPatchField\n"
61             "(\n"
62             "    const pointPatch& p,\n"
63             "    const Field<Type>& field,\n"
64             "    const dictionary& dict\n"
65             ")\n",
66             dict
67         )   << "patch " << this->patch().index() << " not empty type. "
68             << "Patch type = " << p.type()
69             << exit(FatalIOError);
70     }
74 template<class Type>
75 emptyPointPatchField<Type>::emptyPointPatchField
77     const emptyPointPatchField<Type>& ptf,
78     const pointPatch& p,
79     const DimensionedField<Type, pointMesh>& iF,
80     const pointPatchFieldMapper&
83     pointPatchField<Type>(p, iF)
85     if (!isType<emptyPointPatch>(this->patch()))
86     {
87         FatalErrorIn
88         (
89             "emptyPointPatchField<Type>::emptyPointPatchField\n"
90             "(\n"
91             "    const emptyPointPatchField<Type>& ptf,\n"
92             "    const pointPatch& p,\n"
93             "    const DimensionedField<Type, pointMesh>& iF,\n"
94             "    const pointPatchFieldMapper& mapper\n"
95             ")\n"
96         )   << "Field type does not correspond to patch type for patch "
97             << this->patch().index() << "." << endl
98             << "Field type: " << typeName << endl
99             << "Patch type: " << this->patch().type()
100             << exit(FatalError);
101     }
105 template<class Type>
106 emptyPointPatchField<Type>::emptyPointPatchField
108     const emptyPointPatchField<Type>& ptf,
109     const DimensionedField<Type, pointMesh>& iF
112     pointPatchField<Type>(ptf, iF)
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 } // End namespace Foam
120 // ************************************************************************* //