initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / OpenFOAM / matrices / lduMatrix / solvers / GAMG / interfaces / cyclicGAMGInterface / cyclicGAMGInterface.H
blob5b5e5d1a1e9d549a05d8c1b969cff94815f40d41
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::cyclicGAMGInterface
28 Description
29     GAMG agglomerated cyclic interface.
31 SourceFiles
32     cyclicGAMGInterface.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef cyclicGAMGInterface_H
37 #define cyclicGAMGInterface_H
39 #include "GAMGInterface.H"
40 #include "cyclicLduInterface.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                   Class cyclicGAMGInterface Declaration
49 \*---------------------------------------------------------------------------*/
51 class cyclicGAMGInterface
53     public GAMGInterface,
54     virtual public cyclicLduInterface
56     // Private data
58         //- Reference tor the cyclicLduInterface from which this is
59         //  agglomerated
60         const cyclicLduInterface& fineCyclicInterface_;
63     // Private Member Functions
65         //- Disallow default bitwise copy construct
66         cyclicGAMGInterface(const cyclicGAMGInterface&);
68         //- Disallow default bitwise assignment
69         void operator=(const cyclicGAMGInterface&);
72 public:
74     //- Runtime type information
75     TypeName("cyclic");
78     // Constructors
80         //- Construct from fine level interface,
81         //  local and neighbour restrict addressing
82         cyclicGAMGInterface
83         (
84             const lduInterface& fineInterface,
85             const labelField& restrictAddressing,
86             const labelField& neighbourRestrictAddressing
87         );
90     // Destructor
92         virtual ~cyclicGAMGInterface();
95     // Member Functions
97         // Interface transfer functions
99             //- Transfer and return neighbour field
100             virtual tmp<labelField> transfer
101             (
102                 const Pstream::commsTypes commsType,
103                 const unallocLabelList& interfaceData
104             ) const;
106             //- Transfer and return internal field adjacent to the interface
107             virtual tmp<labelField> internalFieldTransfer
108             (
109                 const Pstream::commsTypes commsType,
110                 const unallocLabelList& iF
111             ) const;
114         //- Cyclic interface functions
116             //- Return face transformation tensor
117             virtual const tensorField& forwardT() const
118             {
119                 return fineCyclicInterface_.forwardT();
120             }
122             //- Return neighbour-cell transformation tensor
123             virtual const tensorField& reverseT() const
124             {
125                 return fineCyclicInterface_.reverseT();
126             }
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 #endif
138 // ************************************************************************* //