00001 /* 00002 * Copyright (c) 2001 The AUTHORS 00003 * Romeu Andre' Pieritz, Ph.D. - romeu_pieritz@hotmail.com 00004 * Rafael Mendes, Eng. – mendes_rafael@yahoo.com 00005 * Rodrigo Ferraz de Andrade, Eng. – rferraz@iname.com 00006 * All rights reserved. 00007 * 00008 * Permission to use, copy and distribute this software and its 00009 * documentation for educational and personal use, without fee is hereby granted, 00010 * provided that the above copyright notice and the following 00011 * two paragraphs appear in all copies of this software. 00012 * 00013 * IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR 00014 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 00015 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS 00016 * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00017 * 00018 * THE AUTHORS SPECIFICALLY DISCLAIMS ANY WARRANTIES, 00019 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00020 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HERE UNDER IS 00021 * ON AN "AS IS" BASIS, AND THE AUTHORS HAVE NO OBLIGATION TO 00022 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 00023 * 00024 * SINMEC Lab. - CFD Sinflow Project - http://www.sinmec.ufsc.br/cfd 00025 */ 00026 00027 00028 // File Define 00029 #ifndef __CSFL_MATH_SOLVER_ITSOLVER_H__ 00030 #define __CSFL_MATH_SOLVER_ITSOLVER_H__ 00031 00032 00033 // Include 00034 #include <csfl/math/solver/solver.h> 00035 #include <csfl/geom/grid/grid.h> 00036 00037 00038 // Namespace 00039 namespace csfl { 00040 00041 //============================================================================== 00042 // Class ISolverIteract 00043 // Description: Basic class to iteractive solvers 00044 //============================================================================== 00045 00046 class ISolverIteract : 00047 public ISolver 00048 00053 00054 { 00055 00056 public: 00057 00065 ISolverIteract( 00066 ILinearSystem * _lsys = NULL, 00067 double _tolerance = 0.00001, 00068 int _iterMax = 10000, 00069 IContainerParameter * _cont = NULL ); 00070 ISolverIteract( ISolverIteract * ); 00071 ~ISolverIteract(); 00072 00077 double Tolerance() { return tolerance; } 00078 00083 void SetTolerance( double _v ) { tolerance = _v; } 00084 00089 int IterMax() { return iterMax; } 00090 00096 void SetIterMax( int _v ) { iterMax = _v; } 00097 00102 int Iteract() { return iter; } 00103 00108 void SetContainerParameter( IContainerParameter *_cont ); 00109 IContainerParameter * ContainerParameter() { return cont; } 00110 00117 virtual void Solve() {} 00118 virtual void Solve( ILinearSystem * ) {} 00119 00123 virtual double SolverError(); 00124 00128 IAction ActionConverge; 00129 00130 protected: 00131 IContainerParameter *cont; 00132 00133 int iterMax, iter; 00134 double tolerance; 00135 }; 00136 } // csfl namespace 00137 00138 #endif // __CSFL_MATH_SOLVER_ITSOLVER_H__
CFD Project
|
Documents |
Downloads |
Contact us |
Use Terms |
|
|||
© SINMEC/EMC/UFSC,
2001. |
All rights
reserved. |
Last Update: Jan. 18, 2002 |
|