FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

processorGAMGInterfaceField.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::processorGAMGInterfaceField
00026 
00027 Description
00028     GAMG agglomerated processor interface field.
00029 
00030 SourceFiles
00031     processorGAMGInterfaceField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef processorGAMGInterfaceField_H
00036 #define processorGAMGInterfaceField_H
00037 
00038 #include <OpenFOAM/GAMGInterfaceField.H>
00039 #include <OpenFOAM/processorGAMGInterface.H>
00040 #include <OpenFOAM/processorLduInterfaceField.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                   Class processorGAMGInterfaceField Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class processorGAMGInterfaceField
00052 :
00053     public GAMGInterfaceField,
00054     public processorLduInterfaceField
00055 {
00056     // Private data
00057 
00058         //- Local reference cast into the processor interface
00059         const processorGAMGInterface& procInterface_;
00060 
00061         //- Is the transform required
00062         bool doTransform_;
00063 
00064         //- Rank of component for transformation
00065         int rank_;
00066 
00067 
00068     // Private Member Functions
00069 
00070         //- Disallow default bitwise copy construct
00071         processorGAMGInterfaceField(const processorGAMGInterfaceField&);
00072 
00073         //- Disallow default bitwise assignment
00074         void operator=(const processorGAMGInterfaceField&);
00075 
00076 
00077 public:
00078 
00079     //- Runtime type information
00080     TypeName("processor");
00081 
00082 
00083     // Constructors
00084 
00085         //- Construct from GAMG interface and fine level interface field
00086         processorGAMGInterfaceField
00087         (
00088             const GAMGInterface& GAMGCp,
00089             const lduInterfaceField& fineInterface
00090         );
00091 
00092 
00093     // Destructor
00094 
00095         virtual ~processorGAMGInterfaceField();
00096 
00097 
00098     // Member Functions
00099 
00100         // Access
00101 
00102             //- Return size
00103             label size() const
00104             {
00105                 return procInterface_.size();
00106             }
00107 
00108 
00109         // Interface matrix update
00110 
00111             //- Initialise neighbour matrix update
00112             virtual void initInterfaceMatrixUpdate
00113             (
00114                 const scalarField& psiInternal,
00115                 scalarField& result,
00116                 const lduMatrix& m,
00117                 const scalarField& coeffs,
00118                 const direction cmpt,
00119                 const Pstream::commsTypes commsType
00120             ) const;
00121 
00122             //- Update result field based on interface functionality
00123             virtual void updateInterfaceMatrix
00124             (
00125                 const scalarField& psiInternal,
00126                 scalarField& result,
00127                 const lduMatrix&,
00128                 const scalarField& coeffs,
00129                 const direction cmpt,
00130                 const Pstream::commsTypes commsType
00131             ) const;
00132 
00133 
00134         //- Processor interface functions
00135 
00136             //- Return processor number
00137             virtual int myProcNo() const
00138             {
00139                 return procInterface_.myProcNo();
00140             }
00141 
00142             //- Return neigbour processor number
00143             virtual int neighbProcNo() const
00144             {
00145                 return procInterface_.neighbProcNo();
00146             }
00147 
00148             //- Does the interface field perform the transfromation
00149             virtual bool doTransform() const
00150             {
00151                 return doTransform_;
00152             }
00153 
00154             //- Return face transformation tensor
00155             virtual const tensorField& forwardT() const
00156             {
00157                 return procInterface_.forwardT();
00158             }
00159 
00160             //- Return rank of component for transform
00161             virtual int rank() const
00162             {
00163                 return rank_;
00164             }
00165 };
00166 
00167 
00168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00169 
00170 } // End namespace Foam
00171 
00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00173 
00174 #endif
00175 
00176 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines