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-2015 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  << "' not constraint type '" << typeName << "'"
77  << "\n for patch " << p.name()
78  << " of field " << this->dimensionedInternalField().name()
79  << " in file " << this->dimensionedInternalField().objectPath()
80  << exit(FatalIOError);
81  }
82 }
83 
84 
85 template<class Type>
87 (
88  const fvPatch& p,
90  const dictionary& dict
91 )
92 :
93  //coupledFvPatchField<Type>(p, iF, dict),
95  procPatch_(refCast<const processorCyclicFvPatch>(p))
96 {
97  if (!isType<processorCyclicFvPatch>(p))
98  {
100  (
101  dict
102  ) << "\n patch type '" << p.type()
103  << "' not constraint type '" << typeName << "'"
104  << "\n for patch " << p.name()
105  << " of field " << this->dimensionedInternalField().name()
106  << " in file " << this->dimensionedInternalField().objectPath()
107  << exit(FatalIOError);
108  }
109 
110  if (Pstream::defaultCommsType == Pstream::scheduled)
111  {
113  << "Scheduled communication with split cyclics not supported."
114  << endl;
115  }
116 }
117 
118 
119 template<class Type>
121 (
123 )
124 :
125  //processorLduInterfaceField(),
126  //coupledFvPatchField<Type>(ptf),
128  procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
129 {}
130 
131 
132 template<class Type>
134 (
137 )
138 :
139  //coupledFvPatchField<Type>(ptf, iF),
141  procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
142 {}
143 
144 
145 // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
146 
147 template<class Type>
149 {}
150 
151 
152 // ************************************************************************* //
p
p
Definition: pEqn.H:62
Foam::processorFvPatchField
This boundary condition enables processor communication across patches.
Definition: processorFvPatchField.H:64
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
dimensionedInternalField
rDeltaT dimensionedInternalField()
Foam::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
transformField.H
Spatial transformation functions for primitive fields.
Foam::processorCyclicFvPatchField
This boundary condition enables processor communication across cyclic patches.
Definition: processorCyclicFvPatchField.H:70
Foam::Field< Type >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
processorCyclicFvPatchField.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
f
labelList f(nPoints)
Foam::processorCyclicFvPatchField::processorCyclicFvPatchField
processorCyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: processorCyclicFvPatchField.C:35
processorCyclicFvPatch.H
FatalIOErrorInFunction
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:330
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::fvPatchField< Type >::patch
const fvPatch & patch() const
Return patch.
Definition: fvPatchField.H:300
Foam::processorCyclicFvPatchField::~processorCyclicFvPatchField
virtual ~processorCyclicFvPatchField()
Destructor.
Definition: processorCyclicFvPatchField.C:148
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:259
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51