processorCyclicFvPatchField.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) 2011-2013 OpenFOAM Foundation
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 #include "processorCyclicFvPatch.H"
28 #include "demandDrivenData.H"
29 #include "transformField.H"
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 template<class Type>
35 (
36  const fvPatch& p,
38 )
39 :
41  procPatch_(refCast<const processorCyclicFvPatch>(p))
42 {}
43 
44 
45 template<class Type>
47 (
48  const fvPatch& p,
50  const Field<Type>& f
51 )
52 :
53  //coupledFvPatchField<Type>(p, iF, f),
55  procPatch_(refCast<const processorCyclicFvPatch>(p))
56 {}
57 
58 
59 // Construct by mapping given processorCyclicFvPatchField<Type>
60 template<class Type>
62 (
64  const fvPatch& p,
66  const fvPatchFieldMapper& mapper
67 )
68 :
69  //coupledFvPatchField<Type>(ptf, p, iF, mapper),
70  processorFvPatchField<Type>(ptf, p, iF, mapper),
71  procPatch_(refCast<const processorCyclicFvPatch>(p))
72 {
73  if (!isType<processorCyclicFvPatch>(this->patch()))
74  {
76  (
77  "processorCyclicFvPatchField<Type>::processorCyclicFvPatchField\n"
78  "(\n"
79  " const processorCyclicFvPatchField<Type>& ptf,\n"
80  " const fvPatch& p,\n"
81  " const DimensionedField<Type, volMesh>& iF,\n"
82  " const fvPatchFieldMapper& mapper\n"
83  ")\n"
84  ) << "\n patch type '" << p.type()
85  << "' not constraint type '" << typeName << "'"
86  << "\n for patch " << p.name()
87  << " of field " << this->dimensionedInternalField().name()
88  << " in file " << this->dimensionedInternalField().objectPath()
89  << exit(FatalIOError);
90  }
91 }
92 
93 
94 template<class Type>
96 (
97  const fvPatch& p,
99  const dictionary& dict
100 )
101 :
102  //coupledFvPatchField<Type>(p, iF, dict),
104  procPatch_(refCast<const processorCyclicFvPatch>(p))
105 {
106  if (!isType<processorCyclicFvPatch>(p))
107  {
109  (
110  "processorCyclicFvPatchField<Type>::processorCyclicFvPatchField\n"
111  "(\n"
112  " const fvPatch& p,\n"
113  " const Field<Type>& field,\n"
114  " const dictionary& dict\n"
115  ")\n",
116  dict
117  ) << "\n patch type '" << p.type()
118  << "' not constraint type '" << typeName << "'"
119  << "\n for patch " << p.name()
120  << " of field " << this->dimensionedInternalField().name()
121  << " in file " << this->dimensionedInternalField().objectPath()
122  << exit(FatalIOError);
123  }
124 
125  if (Pstream::defaultCommsType == Pstream::scheduled)
126  {
127  WarningIn
128  (
129  "processorCyclicFvPatchField<Type>::processorCyclicFvPatchField\n"
130  "(\n"
131  " const fvPatch& p,\n"
132  " const DimensionedField<Type, volMesh>& iF,\n"
133  " const dictionary& dict\n"
134  ")\n"
135  ) << "Scheduled communication with split cyclics not supported."
136  << endl;
137  }
138 }
139 
140 
141 template<class Type>
143 (
145 )
146 :
147  //processorLduInterfaceField(),
148  //coupledFvPatchField<Type>(ptf),
150  procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
151 {}
152 
153 
154 template<class Type>
156 (
159 )
160 :
161  //coupledFvPatchField<Type>(ptf, iF),
163  procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
164 {}
165 
166 
167 // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
168 
169 template<class Type>
171 {}
172 
173 
174 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
This boundary condition enables processor communication across patches.
labelList f(nPoints)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::fvPatchFieldMapper.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
This boundary condition enables processor communication across cyclic patches.
dictionary dict
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
IOerror FatalIOError
#define WarningIn(functionName)
Report a warning using Foam::Warning.
volScalarField & p
Definition: createFields.H:51
Spatial transformation functions for primitive fields.
Template functions to aid in the implementation of demand driven data.
Pre-declare SubField and related Field type.
Definition: Field.H:57
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Definition: error.H:314
rDeltaT dimensionedInternalField()
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
const fvPatch & patch() const
Return patch.
Definition: fvPatchField.H:300
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:325
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.