OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

cyclicGAMGInterfaceField.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-2009 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     Foam::cyclicGAMGInterfaceField
00027 
00028 Description
00029     GAMG agglomerated cyclic interface field.
00030 
00031 SourceFiles
00032     cyclicGAMGInterfaceField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef cyclicGAMGInterfaceField_H
00037 #define cyclicGAMGInterfaceField_H
00038 
00039 #include "GAMGInterfaceField.H"
00040 #include "cyclicGAMGInterface.H"
00041 #include "cyclicLduInterfaceField.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                   Class cyclicGAMGInterfaceField Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class cyclicGAMGInterfaceField
00053 :
00054     public GAMGInterfaceField,
00055     virtual public cyclicLduInterfaceField
00056 {
00057     // Private data
00058 
00059         //- Local reference cast into the cyclic interface
00060         const cyclicGAMGInterface& cyclicInterface_;
00061 
00062         //- Is the transform required
00063         bool doTransform_;
00064 
00065         //- Rank of component for transformation
00066         int rank_;
00067 
00068 
00069     // Private Member Functions
00070 
00071         //- Disallow default bitwise copy construct
00072         cyclicGAMGInterfaceField(const cyclicGAMGInterfaceField&);
00073 
00074         //- Disallow default bitwise assignment
00075         void operator=(const cyclicGAMGInterfaceField&);
00076     
00077 
00078 public:
00079 
00080     //- Runtime type information
00081     TypeName("cyclic");
00082 
00083 
00084     // Constructors
00085 
00086         //- Construct from GAMG interface and fine level interface field
00087         cyclicGAMGInterfaceField
00088         (
00089             const GAMGInterface& GAMGCp,
00090             const lduInterfaceField& fineInterfaceField
00091         );
00092 
00093 
00094     // Destructor
00095 
00096         virtual ~cyclicGAMGInterfaceField();
00097 
00098 
00099     // Member Functions
00100 
00101         // Access
00102 
00103             //- Return size
00104             label size() const
00105             {
00106                 return cyclicInterface_.size();
00107             }
00108 
00109 
00110         // Interface matrix update
00111 
00112             //- Update result field based on interface functionality
00113             virtual void updateInterfaceMatrix
00114             (
00115                 const scalarField& psiInternal,
00116                 scalarField& result,
00117                 const lduMatrix&,
00118                 const scalarField& coeffs,
00119                 const direction cmpt,
00120                 const Pstream::commsTypes commsType
00121             ) const;
00122 
00123 
00124         //- Cyclic interface functions
00125 
00126             //- Does the interface field perform the transfromation
00127             virtual bool doTransform() const
00128             {
00129                 return doTransform_;
00130             }
00131 
00132             //- Return face transformation tensor
00133             virtual const tensorField& forwardT() const
00134             {
00135                 return cyclicInterface_.forwardT();
00136             }
00137 
00138             //- Return neighbour-cell transformation tensor
00139             virtual const tensorField& reverseT() const
00140             {
00141                 return cyclicInterface_.reverseT();
00142             }
00143 
00144             //- Return rank of component for transform
00145             virtual int rank() const
00146             {
00147                 return rank_;
00148             }
00149 };
00150 
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 } // End namespace Foam
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 #endif
00159 
00160 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd