1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
25 Foam::processorGAMGInterface
28 GAMG agglomerated processor interface.
31 processorGAMGInterface.C
32 processorGAMGInterfaceTemplates.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef processorGAMGInterface_H
37 #define processorGAMGInterface_H
39 #include "GAMGInterface.H"
40 #include "processorLduInterface.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class processorGAMGInterface Declaration
49 \*---------------------------------------------------------------------------*/
51 class processorGAMGInterface
54 public processorLduInterface
58 //- Reference tor the processorLduInterface from which this is
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&);
74 //- Runtime type information
75 TypeName("processor");
79 //- Construct from fine-level interface,
80 // local and neighbour restrict addressing
81 processorGAMGInterface
83 const lduPrimitiveMesh& lduMesh,
84 const lduInterface& fineInterface,
85 const labelField& localRestrictAddressing,
86 const labelField& neighbourRestrictAddressing
92 virtual ~processorGAMGInterface();
99 //- Return true if interface is coupled
100 virtual bool coupled() const
106 // Interface transfer functions
108 //- Initialise interface data transfer
109 virtual void initTransfer
111 const Pstream::commsTypes commsType,
112 const unallocLabelList& interfaceData
115 //- Transfer and return neighbour field
116 virtual tmp<labelField> transfer
118 const Pstream::commsTypes commsType,
119 const unallocLabelList& interfaceData
122 //- Initialise neighbour field transfer
123 virtual void initInternalFieldTransfer
125 const Pstream::commsTypes commsType,
126 const unallocLabelList& iF
129 //- Transfer and return internal field adjacent to the interface
130 virtual tmp<labelField> internalFieldTransfer
132 const Pstream::commsTypes commsType,
133 const unallocLabelList& iF
137 //- Processor interface functions
139 //- Return processor number
140 virtual int myProcNo() const
142 return fineProcInterface_.myProcNo();
145 //- Return neigbour processor number
146 virtual int neighbProcNo() const
148 return fineProcInterface_.neighbProcNo();
151 //- Return face transformation tensor
152 virtual const tensorField& forwardT() const
154 return fineProcInterface_.forwardT();
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 // ************************************************************************* //