|
|
|
processorGAMGInterfaceField.HGo 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 processorGAMGInterfaceField 00027 00028 Description 00029 GAMG agglomerated processor interface field. 00030 00031 SourceFiles 00032 processorGAMGInterfaceField.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef processorGAMGInterfaceField_H 00037 #define processorGAMGInterfaceField_H 00038 00039 #include "GAMGInterfaceField.H" 00040 #include "processorGAMGInterface.H" 00041 #include "processorLduInterfaceField.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class processorGAMGInterfaceField Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class processorGAMGInterfaceField 00053 : 00054 public GAMGInterfaceField, 00055 public processorLduInterfaceField 00056 { 00057 // Private data 00058 00059 //- Local reference cast into the processor interface 00060 const processorGAMGInterface& procInterface_; 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 processorGAMGInterfaceField(const processorGAMGInterfaceField&); 00073 00074 //- Disallow default bitwise assignment 00075 void operator=(const processorGAMGInterfaceField&); 00076 00077 00078 public: 00079 00080 //- Runtime type information 00081 TypeName("processor"); 00082 00083 00084 // Constructors 00085 00086 //- Construct from GAMG interface and fine level interface field 00087 processorGAMGInterfaceField 00088 ( 00089 const GAMGInterface& GAMGCp, 00090 const lduInterfaceField& fineInterface 00091 ); 00092 00093 00094 // Destructor 00095 00096 virtual ~processorGAMGInterfaceField(); 00097 00098 00099 // Member Functions 00100 00101 // Access 00102 00103 //- Return size 00104 label size() const 00105 { 00106 return procInterface_.size(); 00107 } 00108 00109 00110 // Interface matrix update 00111 00112 //- Initialise neighbour matrix update 00113 virtual void initInterfaceMatrixUpdate 00114 ( 00115 const scalarField& psiInternal, 00116 scalarField& result, 00117 const lduMatrix& m, 00118 const scalarField& coeffs, 00119 const direction cmpt, 00120 const bool bufferedTransfer 00121 ) const; 00122 00123 //- Update result field based on interface functionality 00124 virtual void updateInterfaceMatrix 00125 ( 00126 const scalarField& psiInternal, 00127 scalarField& result, 00128 const lduMatrix&, 00129 const scalarField& coeffs, 00130 const direction cmpt 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 // ************************************************************************* // |