OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

cyclicFvPatch.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::cyclicFvPatch
00027 
00028 Description
00029     Cyclic-plane patch.
00030 
00031 SourceFiles
00032     cyclicFvPatch.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef cyclicFvPatch_H
00037 #define cyclicFvPatch_H
00038 
00039 #include "coupledFvPatch.H"
00040 #include "cyclicLduInterface.H"
00041 #include "cyclicPolyPatch.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                            Class cyclicFvPatch Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class cyclicFvPatch
00053 :
00054     public coupledFvPatch,
00055     public cyclicLduInterface
00056 {
00057     // Private data
00058 
00059         const cyclicPolyPatch& cyclicPolyPatch_;
00060 
00061 
00062 protected:
00063 
00064     // Protected Member functions
00065 
00066         //- Make patch weighting factors
00067         void makeWeights(scalarField&) const;
00068 
00069         //- Make patch face - neighbour cell distances
00070         void makeDeltaCoeffs(scalarField&) const;
00071 
00072 
00073 public:
00074 
00075     //- Runtime type information
00076     TypeName(cyclicPolyPatch::typeName_());
00077 
00078 
00079     // Constructors
00080 
00081         //- Construct from polyPatch
00082         cyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
00083         :
00084             coupledFvPatch(patch, bm),
00085             cyclicPolyPatch_(refCast<const cyclicPolyPatch>(patch))
00086         {}
00087 
00088 
00089     // Member functions
00090 
00091         // Access
00092 
00093             //- Return face transformation tensor
00094             const tensorField& forwardT() const
00095             {
00096                 return coupledFvPatch::forwardT();
00097             }
00098 
00099             //- Return neighbour-cell transformation tensor
00100             const tensorField& reverseT() const
00101             {
00102                 return coupledFvPatch::reverseT();
00103             }
00104 
00105 
00106             //- Return delta (P to N) vectors across coupled patch
00107             tmp<vectorField> delta() const;
00108 
00109 
00110         // Interface transfer functions
00111 
00112             //- Return the values of the given internal data adjacent to
00113             //  the interface as a field
00114             virtual tmp<labelField> interfaceInternalField
00115             (
00116                 const unallocLabelList& internalData
00117             ) const;
00118 
00119             //- Transfer and return neighbour field
00120             virtual tmp<labelField> transfer
00121             (
00122                 const Pstream::commsTypes commsType,
00123                 const unallocLabelList& interfaceData
00124             ) const;
00125 
00126             //- Return neighbour field
00127             virtual tmp<labelField> internalFieldTransfer
00128             (
00129                 const Pstream::commsTypes commsType,
00130                 const unallocLabelList& internalData
00131             ) const;
00132 };
00133 
00134 
00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00136 
00137 } // End namespace Foam
00138 
00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00140 
00141 #endif
00142 
00143 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd