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::cyclicGAMGInterface
28 GAMG agglomerated cyclic interface.
33 \*---------------------------------------------------------------------------*/
35 #ifndef cyclicGAMGInterface_H
36 #define cyclicGAMGInterface_H
38 #include "GAMGInterface.H"
39 #include "cyclicLduInterface.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class cyclicGAMGInterface Declaration
48 \*---------------------------------------------------------------------------*/
50 class cyclicGAMGInterface
53 virtual public cyclicLduInterface
57 //- Reference tor the cyclicLduInterface from which this is
59 const cyclicLduInterface& fineCyclicInterface_;
62 // Private Member Functions
64 //- Disallow default bitwise copy construct
65 cyclicGAMGInterface(const cyclicGAMGInterface&);
67 //- Disallow default bitwise assignment
68 void operator=(const cyclicGAMGInterface&);
73 //- Runtime type information
79 //- Construct from fine level interface,
80 // local and neighbour restrict addressing
84 const lduInterfacePtrsList& coarseInterfaces,
85 const lduInterface& fineInterface,
86 const labelField& restrictAddressing,
87 const labelField& neighbourRestrictAddressing
92 virtual ~cyclicGAMGInterface();
97 // Interface transfer functions
99 //- Transfer and return internal field adjacent to the interface
100 virtual tmp<labelField> internalFieldTransfer
102 const Pstream::commsTypes commsType,
107 //- Cyclic interface functions
109 //- Return neigbour processor number
110 virtual label neighbPatchID() const
112 return fineCyclicInterface_.neighbPatchID();
115 virtual bool owner() const
117 return fineCyclicInterface_.owner();
120 virtual const cyclicGAMGInterface& neighbPatch() const
122 return dynamic_cast<const cyclicGAMGInterface&>
124 coarseInterfaces_[neighbPatchID()]
128 //- Return face transformation tensor
129 virtual const tensorField& forwardT() const
131 return fineCyclicInterface_.forwardT();
134 //- Return neighbour-cell transformation tensor
135 virtual const tensorField& reverseT() const
137 return fineCyclicInterface_.reverseT();
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace Foam
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 // ************************************************************************* //