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