initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / matrices / lduMatrix / solvers / GAMG / interfaceFields / cyclicGAMGInterfaceField / cyclicGAMGInterfaceField.H
blob3d445a3d30fb3e14372b0738c1b1791fa03e665d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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::cyclicGAMGInterfaceField
28 Description
29     GAMG agglomerated cyclic interface field.
31 SourceFiles
32     cyclicGAMGInterfaceField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef cyclicGAMGInterfaceField_H
37 #define cyclicGAMGInterfaceField_H
39 #include "GAMGInterfaceField.H"
40 #include "cyclicGAMGInterface.H"
41 #include "cyclicLduInterfaceField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                   Class cyclicGAMGInterfaceField Declaration
50 \*---------------------------------------------------------------------------*/
52 class cyclicGAMGInterfaceField
54     public GAMGInterfaceField,
55     virtual public cyclicLduInterfaceField
57     // Private data
59         //- Local reference cast into the cyclic interface
60         const cyclicGAMGInterface& cyclicInterface_;
62         //- Is the transform required
63         bool doTransform_;
65         //- Rank of component for transformation
66         int rank_;
69     // Private Member Functions
71         //- Disallow default bitwise copy construct
72         cyclicGAMGInterfaceField(const cyclicGAMGInterfaceField&);
74         //- Disallow default bitwise assignment
75         void operator=(const cyclicGAMGInterfaceField&);
76     
78 public:
80     //- Runtime type information
81     TypeName("cyclic");
84     // Constructors
86         //- Construct from GAMG interface and fine level interface field
87         cyclicGAMGInterfaceField
88         (
89             const GAMGInterface& GAMGCp,
90             const lduInterfaceField& fineInterfaceField
91         );
94     // Destructor
96         virtual ~cyclicGAMGInterfaceField();
99     // Member Functions
101         // Access
103             //- Return size
104             label size() const
105             {
106                 return cyclicInterface_.size();
107             }
110         // Interface matrix update
112             //- Update result field based on interface functionality
113             virtual void updateInterfaceMatrix
114             (
115                 const scalarField& psiInternal,
116                 scalarField& result,
117                 const lduMatrix&,
118                 const scalarField& coeffs,
119                 const direction cmpt,
120                 const Pstream::commsTypes commsType
121             ) const;
124         //- Cyclic interface functions
126             //- Does the interface field perform the transfromation
127             virtual bool doTransform() const
128             {
129                 return doTransform_;
130             }
132             //- Return face transformation tensor
133             virtual const tensorField& forwardT() const
134             {
135                 return cyclicInterface_.forwardT();
136             }
138             //- Return neighbour-cell transformation tensor
139             virtual const tensorField& reverseT() const
140             {
141                 return cyclicInterface_.reverseT();
142             }
144             //- Return rank of component for transform
145             virtual int rank() const
146             {
147                 return rank_;
148             }
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 #endif
160 // ************************************************************************* //