Forward compatibility: flex
[foam-extend-3.2.git] / src / foam / matrices / lduMatrix / solvers / GAMG / interfaces / processorGAMGInterface / processorGAMGInterface.H
blob7e171af771bdfcd5713bcd139ecaaec2fe792aa6
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::processorGAMGInterface
27 Description
28     GAMG agglomerated processor interface.
30 SourceFiles
31     processorGAMGInterface.C
32     processorGAMGInterfaceTemplates.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef processorGAMGInterface_H
37 #define processorGAMGInterface_H
39 #include "GAMGInterface.H"
40 #include "processorLduInterface.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                   Class processorGAMGInterface Declaration
49 \*---------------------------------------------------------------------------*/
51 class processorGAMGInterface
53     public GAMGInterface,
54     public processorLduInterface
56     // Private data
58         //- Reference tor the processorLduInterface from which this is
59         //  agglomerated
60         const processorLduInterface& fineProcInterface_;
63     // Private Member Functions
65         //- Disallow default bitwise copy construct
66         processorGAMGInterface(const processorGAMGInterface&);
68         //- Disallow default bitwise assignment
69         void operator=(const processorGAMGInterface&);
72 public:
74     //- Runtime type information
75     TypeName("processor");
77     // Constructors
79         //- Construct from fine-level interface,
80         //  local and neighbour restrict addressing
81         processorGAMGInterface
82         (
83             const lduPrimitiveMesh& lduMesh,
84             const lduInterface& fineInterface,
85             const labelField& localRestrictAddressing,
86             const labelField& neighbourRestrictAddressing
87         );
90     // Destructor
92         virtual ~processorGAMGInterface();
95     // Member Functions
97         // Access
99             //- Return true if interface is coupled
100             virtual bool coupled() const
101             {
102                 return true;
103             }
106         // Interface transfer functions
108             //- Initialise interface data transfer
109             virtual void initTransfer
110             (
111                 const Pstream::commsTypes commsType,
112                 const unallocLabelList& interfaceData
113             ) const;
115             //- Transfer and return neighbour field
116             virtual tmp<labelField> transfer
117             (
118                 const Pstream::commsTypes commsType,
119                 const unallocLabelList& interfaceData
120             ) const;
122             //- Initialise neighbour field transfer
123             virtual void initInternalFieldTransfer
124             (
125                 const Pstream::commsTypes commsType,
126                 const unallocLabelList& iF
127             ) const;
129             //- Transfer and return internal field adjacent to the interface
130             virtual tmp<labelField> internalFieldTransfer
131             (
132                 const Pstream::commsTypes commsType,
133                 const unallocLabelList& iF
134             ) const;
137         //- Processor interface functions
139             //- Return processor number
140             virtual int myProcNo() const
141             {
142                 return fineProcInterface_.myProcNo();
143             }
145             //- Return neigbour processor number
146             virtual int neighbProcNo() const
147             {
148                 return fineProcInterface_.neighbProcNo();
149             }
151             //- Return face transformation tensor
152             virtual const tensorField& forwardT() const
153             {
154                 return fineProcInterface_.forwardT();
155             }
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 #endif
167 // ************************************************************************* //