OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

processorGAMGInterface.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2007 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     processorGAMGInterface
00027 
00028 Description
00029     GAMG agglomerated processor interface.
00030 
00031 SourceFiles
00032     processorGAMGInterface.C
00033     processorGAMGInterfaceTemplates.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef processorGAMGInterface_H
00038 #define processorGAMGInterface_H
00039 
00040 #include "GAMGInterface.H"
00041 #include "processorLduInterface.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                   Class processorGAMGInterface Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class processorGAMGInterface
00053 :
00054     public GAMGInterface,
00055     public processorLduInterface
00056 {
00057     // Private data
00058 
00059         //- Reference tor the processorLduInterface from which this is
00060         //  agglomerated
00061         const processorLduInterface& fineProcInterface_;
00062 
00063 
00064     // Private Member Functions
00065 
00066         //- Disallow default bitwise copy construct
00067         processorGAMGInterface(const processorGAMGInterface&);
00068 
00069         //- Disallow default bitwise assignment
00070         void operator=(const processorGAMGInterface&);
00071 
00072 
00073 public:
00074 
00075     //- Runtime type information
00076     TypeName("processor");
00077 
00078     // Constructors
00079 
00080         //- Construct from fine-level interface,
00081         //  local and neighbour restrict addressing
00082         processorGAMGInterface
00083         (
00084             const lduInterface& fineInterface,
00085             const labelField& restrictAddressing,
00086             const labelField& neighbourRestrictAddressing
00087         );
00088 
00089 
00090     // Destructor
00091 
00092         virtual ~processorGAMGInterface();
00093 
00094 
00095     // Member Functions
00096 
00097         // Interface transfer functions
00098 
00099             //- Initialise interface data transfer
00100             virtual void initTransfer
00101             (
00102                 const unallocLabelList& interfaceData,
00103                 const bool bufferedTransfer
00104             ) const;
00105 
00106             //- Transfer and return neighbour field
00107             virtual tmp<labelField> transfer
00108             (
00109                 const unallocLabelList& interfaceData
00110             ) const;
00111 
00112             //- Initialise neighbour field transfer
00113             virtual void initInternalFieldTransfer
00114             (
00115                 const unallocLabelList& iF,
00116                 const bool bufferedTransfer
00117             ) const;
00118 
00119             //- Transfer and return internal field adjacent to the interface
00120             virtual tmp<labelField> internalFieldTransfer
00121             (
00122                 const unallocLabelList& iF
00123             ) const;
00124 
00125 
00126         //- Processor interface functions
00127 
00128             //- Return processor number
00129             virtual int myProcNo() const
00130             {
00131                 return fineProcInterface_.myProcNo();
00132             }
00133 
00134             //- Return neigbour processor number
00135             virtual int neighbProcNo() const
00136             {
00137                 return fineProcInterface_.neighbProcNo();
00138             }
00139 
00140             //- Return face transformation tensor
00141             virtual const tensorField& forwardT() const
00142             {
00143                 return fineProcInterface_.forwardT();
00144             }
00145 };
00146 
00147 
00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00149 
00150 } // End namespace Foam
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 #endif
00155 
00156 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd