FreeFOAM The Cross-Platform CFD Toolkit
processorFvsPatchField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34 
35 template<class Type>
37 (
38  const fvPatch& p,
40 )
41 :
43  procPatch_(refCast<const processorFvPatch>(p))
44 {}
45 
46 
47 template<class Type>
49 (
50  const fvPatch& p,
52  const Field<Type>& f
53 )
54 :
56  procPatch_(refCast<const processorFvPatch>(p))
57 {}
58 
59 
60 // Construct by mapping given processorFvsPatchField<Type>
61 template<class Type>
63 (
65  const fvPatch& p,
67  const fvPatchFieldMapper& mapper
68 )
69 :
70  coupledFvsPatchField<Type>(ptf, p, iF, mapper),
71  procPatch_(refCast<const processorFvPatch>(p))
72 {
73  if (!isType<processorFvPatch>(this->patch()))
74  {
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  }
90 }
91 
92 
93 template<class Type>
95 (
96  const fvPatch& p,
98  const dictionary& dict
99 )
100 :
101  coupledFvsPatchField<Type>(p, iF, dict),
102  procPatch_(refCast<const processorFvPatch>(p))
103 {
104  if (!isType<processorFvPatch>(p))
105  {
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  }
119 }
120 
121 
122 template<class Type>
124 (
126 )
127 :
129  procPatch_(refCast<const processorFvPatch>(ptf.patch()))
130 {}
131 
132 
133 template<class Type>
135 (
136  const processorFvsPatchField<Type>& ptf,
138 )
139 :
141  procPatch_(refCast<const processorFvPatch>(ptf.patch()))
142 {}
143 
144 
145 // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
146 
147 template<class Type>
149 {}
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // ************************ vim: set sw=4 sts=4 et: ************************ //