1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::processorFvsPatchField
29 Foam::processorFvsPatchField
32 processorFvsPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef processorFvsPatchField_H
37 #define processorFvsPatchField_H
39 #include "coupledFvsPatchField.H"
40 #include "processorFvPatch.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class processorFvsPatch Declaration
49 \*---------------------------------------------------------------------------*/
52 class processorFvsPatchField
54 public coupledFvsPatchField<Type>
58 //- Local reference cast into the processor patch
59 const processorFvPatch& procPatch_;
64 //- Runtime type information
65 TypeName(processorFvPatch::typeName_());
70 //- Construct from patch and internal field
71 processorFvsPatchField
74 const DimensionedField<Type, surfaceMesh>&
77 //- Construct from patch and internal field and patch field
78 processorFvsPatchField
81 const DimensionedField<Type, surfaceMesh>&,
85 //- Construct from patch, internal field and dictionary
86 processorFvsPatchField
89 const DimensionedField<Type, surfaceMesh>&,
93 //- Construct by mapping given processorFvsPatchField onto a new patch
94 processorFvsPatchField
96 const processorFvsPatchField<Type>&,
98 const DimensionedField<Type, surfaceMesh>&,
99 const fvPatchFieldMapper&
102 //- Construct as copy
103 processorFvsPatchField(const processorFvsPatchField<Type>&);
105 //- Construct and return a clone
106 virtual tmp<fvsPatchField<Type> > clone() const
108 return tmp<fvsPatchField<Type> >
110 new processorFvsPatchField<Type>(*this)
114 //- Construct as copy setting internal field reference
115 processorFvsPatchField
117 const processorFvsPatchField<Type>&,
118 const DimensionedField<Type, surfaceMesh>&
121 //- Construct and return a clone setting internal field reference
122 virtual tmp<fvsPatchField<Type> > clone
124 const DimensionedField<Type, surfaceMesh>& iF
127 return tmp<fvsPatchField<Type> >
129 new processorFvsPatchField<Type>(*this, iF)
136 ~processorFvsPatchField();
143 //- Return true if running parallel
144 virtual bool coupled() const
146 if (Pstream::parRun())
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 } // End namespace Foam
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 # include "processorFvsPatchField.C"
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 // ************************************************************************* //