![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 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 amgCoupledInterface 00027 00028 Description 00029 The coupled matrix multiplication for an lduMatrix is done by 00030 using the lduCoupledInterface objects. On the finest level, 00031 this role is performed by the patch fields. 00032 amgCoupledInterface performs the same function on coarse 00033 levels, as here the field is not available to perform the same 00034 function. 00035 00036 SourceFiles 00037 amgCoupledInterface.C 00038 newAmgCoupledInterface.C 00039 00040 \*---------------------------------------------------------------------------*/ 00041 00042 #ifndef amgCoupledInterface_H 00043 #define amgCoupledInterface_H 00044 00045 #include "lduCoupledInterface.H" 00046 #include "autoPtr.H" 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 namespace Foam 00051 { 00052 00053 /*---------------------------------------------------------------------------*\ 00054 Class amgCoupledInterface Declaration 00055 \*---------------------------------------------------------------------------*/ 00056 00057 class amgCoupledInterface 00058 : 00059 virtual public lduCoupledInterface 00060 { 00061 // Private data 00062 00063 //- Index of the interface in the list 00064 const label index_; 00065 00066 //- Dummy addressing array 00067 labelField addr_; 00068 00069 00070 // Private Member Functions 00071 00072 //- Disallow default bitwise copy construct 00073 amgCoupledInterface(const amgCoupledInterface&); 00074 00075 //- Disallow default bitwise assignment 00076 void operator=(const amgCoupledInterface&); 00077 00078 00079 public: 00080 00081 //- Runtime type information 00082 TypeName("amgCoupledInterface"); 00083 00084 00085 // Declare run-time constructor selection tables 00086 00087 declareRunTimeSelectionTable 00088 ( 00089 autoPtr, 00090 amgCoupledInterface, 00091 lduInterface, 00092 (const lduCoupledInterface* fineInterfacePtr, const label intIndex), 00093 (fineInterfacePtr, intIndex) 00094 ); 00095 00096 00097 // Selectors 00098 00099 //- Return a pointer to a new interface created on freestore given 00100 // the fine interface 00101 static autoPtr<amgCoupledInterface> New 00102 ( 00103 const lduCoupledInterface* fineInterfacePtr, 00104 const label intIndex 00105 ); 00106 00107 00108 // Constructors 00109 00110 //- Construct from fine coupled interface 00111 amgCoupledInterface 00112 ( 00113 const lduCoupledInterface*, 00114 const label intIndex 00115 ) 00116 : 00117 index_(intIndex), 00118 addr_(0) 00119 {} 00120 00121 00122 // Member Functions 00123 00124 // Access 00125 00126 //- Return interface index 00127 label index() const 00128 { 00129 return index_; 00130 } 00131 00132 //- Return neighbour colouring 00133 virtual tmp<labelField> nbrColour 00134 ( 00135 const labelField& 00136 ) const 00137 { 00138 // Dummy return for uncoupled patches 00139 return tmp<labelField>(new labelField(0)); 00140 } 00141 00142 //- Return interface coefficients given colouring and fine coeffs 00143 virtual tmp<scalarField> coeffs 00144 ( 00145 const labelField&, 00146 const labelField&, 00147 const scalarField& 00148 ) const 00149 { 00150 // Dummy return for uncoupled patches 00151 return tmp<scalarField>(new scalarField(0)); 00152 } 00153 00154 //- Return addressing 00155 virtual const labelField& addressing() const 00156 { 00157 // Return dummy (zero-sized) addressing 00158 return addr_; 00159 } 00160 }; 00161 00162 00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00164 00165 } // End namespace Foam 00166 00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00168 00169 #endif 00170 00171 // ************************************************************************* //