1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
25 Foam::processorFvsPatchField
28 Foam::processorFvsPatchField
31 processorFvsPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef processorFvsPatchField_H
36 #define processorFvsPatchField_H
38 #include "coupledFvsPatchField.H"
39 #include "processorFvPatch.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class processorFvsPatch Declaration
48 \*---------------------------------------------------------------------------*/
51 class processorFvsPatchField
53 public coupledFvsPatchField<Type>
57 //- Local reference cast into the processor patch
58 const processorFvPatch& procPatch_;
63 //- Runtime type information
64 TypeName(processorFvPatch::typeName_());
69 //- Construct from patch and internal field
70 processorFvsPatchField
73 const DimensionedField<Type, surfaceMesh>&
76 //- Construct from patch and internal field and patch field
77 processorFvsPatchField
80 const DimensionedField<Type, surfaceMesh>&,
84 //- Construct from patch, internal field and dictionary
85 processorFvsPatchField
88 const DimensionedField<Type, surfaceMesh>&,
92 //- Construct by mapping given processorFvsPatchField onto a new patch
93 processorFvsPatchField
95 const processorFvsPatchField<Type>&,
97 const DimensionedField<Type, surfaceMesh>&,
98 const fvPatchFieldMapper&
101 //- Construct as copy
102 processorFvsPatchField(const processorFvsPatchField<Type>&);
104 //- Construct and return a clone
105 virtual tmp<fvsPatchField<Type> > clone() const
107 return tmp<fvsPatchField<Type> >
109 new processorFvsPatchField<Type>(*this)
113 //- Construct as copy setting internal field reference
114 processorFvsPatchField
116 const processorFvsPatchField<Type>&,
117 const DimensionedField<Type, surfaceMesh>&
120 //- Construct and return a clone setting internal field reference
121 virtual tmp<fvsPatchField<Type> > clone
123 const DimensionedField<Type, surfaceMesh>& iF
126 return tmp<fvsPatchField<Type> >
128 new processorFvsPatchField<Type>(*this, iF)
134 ~processorFvsPatchField();
141 //- Return true if running parallel
142 virtual bool coupled() const
144 if (Pstream::parRun())
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 } // End namespace Foam
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 # include "processorFvsPatchField.C"
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 // ************************************************************************* //