|
|
|
ICCG.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 ICCG 00027 00028 Description 00029 Incomplete Cholesky preconditioned CG solver derived from the general 00030 preconditioned CG solver PCG but with the choice of preconditioner 00031 pre-selected. 00032 00033 This solver is present for backward-compatibility and the PCG solver 00034 should be used for preference. 00035 00036 SourceFiles 00037 ICCG.C 00038 00039 \*---------------------------------------------------------------------------*/ 00040 00041 #ifndef ICCG_H 00042 #define ICCG_H 00043 00044 #include "PCG.H" 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 00051 /*---------------------------------------------------------------------------*\ 00052 Class ICCG Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 class ICCG 00056 : 00057 public PCG 00058 { 00059 // Private Member Functions 00060 00061 //- Disallow default bitwise copy construct 00062 ICCG(const ICCG&); 00063 00064 //- Disallow default bitwise assignment 00065 void operator=(const ICCG&); 00066 00067 //- Return the dictionary data-stream constructed from the components. 00068 // Needed for backward compatibility 00069 IStringStream solverDataStream 00070 ( 00071 const scalar tolerance, 00072 const scalar relTol 00073 ) const; 00074 00075 //- Return the dictionary data-stream constructed from the old-style 00076 // data-stream. Needed for backward compatibility 00077 IStringStream solverDataStream 00078 ( 00079 const word& solverName, 00080 Istream& solverData 00081 ) const; 00082 00083 00084 public: 00085 00086 //- Runtime type information 00087 TypeName("ICCG"); 00088 00089 00090 // Constructors 00091 00092 //- Construct from matrix components and tolerances 00093 ICCG 00094 ( 00095 const word& fieldName, 00096 const lduMatrix& matrix, 00097 const FieldField<Field, scalar>& interfaceBouCoeffs, 00098 const FieldField<Field, scalar>& interfaceIntCoeffs, 00099 const lduInterfaceFieldPtrsList& interfaces, 00100 const scalar tolerance, 00101 const scalar relTol = 0.0 00102 ); 00103 00104 //- Construct from matrix components and solver data stream 00105 ICCG 00106 ( 00107 const word& fieldName, 00108 const lduMatrix& matrix, 00109 const FieldField<Field, scalar>& interfaceBouCoeffs, 00110 const FieldField<Field, scalar>& interfaceIntCoeffs, 00111 const lduInterfaceFieldPtrsList& interfaces, 00112 Istream& solverData 00113 ); 00114 00115 00116 // Destructor 00117 00118 virtual ~ICCG() 00119 {} 00120 00121 00122 // Member Functions 00123 00124 //- Read and reset the solver parameters from the given stream 00125 void read(Istream& solverData); 00126 }; 00127 00128 00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00130 00131 } // End namespace Foam 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 #endif 00136 00137 // ************************************************************************* // |