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::processorFvPatch
33 \*---------------------------------------------------------------------------*/
35 #ifndef processorFvPatch_H
36 #define processorFvPatch_H
38 #include "coupledFvPatch.H"
39 #include "processorLduInterface.H"
40 #include "processorPolyPatch.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class processorFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class processorFvPatch
53 public coupledFvPatch,
54 public processorLduInterface
58 const processorPolyPatch& procPolyPatch_;
63 // Protected Member functions
65 //- Make patch weighting factors
66 void makeWeights(scalarField&) const;
68 //- Make patch face - neighbour cell distances
69 void makeDeltaCoeffs(scalarField&) const;
74 //- Runtime type information
75 TypeName(processorPolyPatch::typeName_());
80 //- Construct from components
81 processorFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
83 coupledFvPatch(patch, bm),
84 procPolyPatch_(refCast<const processorPolyPatch>(patch))
90 //- Return processor number
93 return procPolyPatch_.myProcNo();
96 //- Return neigbour processor number
97 int neighbProcNo() const
99 return procPolyPatch_.neighbProcNo();
102 //- Return message tag used for sending
103 virtual int tag() const
105 return UPstream::msgType();
108 //- Return true if running parallel
109 virtual bool coupled() const
111 if (Pstream::parRun())
121 const processorPolyPatch& procPolyPatch() const
123 return procPolyPatch_;
126 //- Are the cyclic planes parallel
127 virtual bool parallel() const
129 return procPolyPatch_.parallel();
132 //- Return face transformation tensor
133 virtual const tensorField& forwardT() const
135 return procPolyPatch_.forwardT();
138 //- Return neighbour-cell transformation tensor.
139 virtual const tensorField& reverseT() const
141 return procPolyPatch_.reverseT();
144 //- Return delta (P to N) vectors across coupled patch
145 virtual tmp<vectorField> delta() const;
148 // Interface transfer functions
150 //- Return the values of the given internal data adjacent to
151 // the interface as a field
152 virtual tmp<labelField> interfaceInternalField
154 const labelUList& internalData
157 //- Initialise neighbour field transfer
158 virtual void initInternalFieldTransfer
160 const Pstream::commsTypes commsType,
161 const labelUList& internalData
164 //- Return neighbour field
165 virtual tmp<labelField> internalFieldTransfer
167 const Pstream::commsTypes commsType,
168 const labelUList& internalData
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 } // End namespace Foam
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 // ************************************************************************* //