BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / finiteVolume / fields / fvsPatchFields / constraint / processor / processorFvsPatchField.C
blob68a89e8a76cc5d1e10548607a2e9f56cc46f7341
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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 "processorFvsPatchField.H"
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 namespace Foam
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35 template<class Type>
36 processorFvsPatchField<Type>::processorFvsPatchField
38     const fvPatch& p,
39     const DimensionedField<Type, surfaceMesh>& iF
42     coupledFvsPatchField<Type>(p, iF),
43     procPatch_(refCast<const processorFvPatch>(p))
47 template<class Type>
48 processorFvsPatchField<Type>::processorFvsPatchField
50     const fvPatch& p,
51     const DimensionedField<Type, surfaceMesh>& iF,
52     const Field<Type>& f
55     coupledFvsPatchField<Type>(p, iF, f),
56     procPatch_(refCast<const processorFvPatch>(p))
60 // Construct by mapping given processorFvsPatchField<Type>
61 template<class Type>
62 processorFvsPatchField<Type>::processorFvsPatchField
64     const processorFvsPatchField<Type>& ptf,
65     const fvPatch& p,
66     const DimensionedField<Type, surfaceMesh>& iF,
67     const fvPatchFieldMapper& mapper
70     coupledFvsPatchField<Type>(ptf, p, iF, mapper),
71     procPatch_(refCast<const processorFvPatch>(p))
73     if (!isType<processorFvPatch>(this->patch()))
74     {
75         FatalErrorIn
76         (
77             "processorFvsPatchField<Type>::processorFvsPatchField\n"
78             "(\n"
79             "    const processorFvsPatchField<Type>& ptf,\n"
80             "    const fvPatch& p,\n"
81             "    const DimensionedField<Type, surfaceMesh>& iF,\n"
82             "    const fvPatchFieldMapper& mapper\n"
83             ")\n"
84         )   << "Field type does not correspond to patch type for patch "
85             << this->patch().index() << "." << endl
86             << "Field type: " << typeName << endl
87             << "Patch type: " << this->patch().type()
88             << exit(FatalError);
89     }
93 template<class Type>
94 processorFvsPatchField<Type>::processorFvsPatchField
96     const fvPatch& p,
97     const DimensionedField<Type, surfaceMesh>& iF,
98     const dictionary& dict
101     coupledFvsPatchField<Type>(p, iF, dict),
102     procPatch_(refCast<const processorFvPatch>(p))
104     if (!isType<processorFvPatch>(p))
105     {
106         FatalIOErrorIn
107         (
108             "processorFvsPatchField<Type>::processorFvsPatchField\n"
109             "(\n"
110             "    const fvPatch& p,\n"
111             "    const Field<Type>& field,\n"
112             "    const dictionary& dict\n"
113             ")\n",
114             dict
115         )   << "patch " << this->patch().index() << " not processor type. "
116             << "Patch type = " << p.type()
117             << exit(FatalIOError);
118     }
122 template<class Type>
123 processorFvsPatchField<Type>::processorFvsPatchField
125     const processorFvsPatchField<Type>& ptf
128     coupledFvsPatchField<Type>(ptf),
129     procPatch_(refCast<const processorFvPatch>(ptf.patch()))
133 template<class Type>
134 processorFvsPatchField<Type>::processorFvsPatchField
136     const processorFvsPatchField<Type>& ptf,
137     const DimensionedField<Type, surfaceMesh>& iF
140     coupledFvsPatchField<Type>(ptf, iF),
141     procPatch_(refCast<const processorFvPatch>(ptf.patch()))
145 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
147 template<class Type>
148 processorFvsPatchField<Type>::~processorFvsPatchField()
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // ************************************************************************* //