00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2001, 2002, 2003 Stéphane Del Pino 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: Solver.hpp,v 1.1.1.1 2003/02/17 16:32:51 delpinux Exp $ 00019 00020 #ifndef SOLVER_HPP 00021 #define SOLVER_HPP 00022 00023 #include <Solution.hpp> 00024 #include <Problem.hpp> 00025 #include <Method.hpp> 00026 00035 class Solver 00036 { 00037 protected: 00039 ConstReferenceCounting<Problem> __problem; 00040 00042 ReferenceCounting<Method> __method; 00043 00045 Solution& __unknown; 00046 00047 public: 00048 00050 virtual const Solution& Solve ( ) = 0; 00051 00053 Solver(ConstReferenceCounting<Problem> P, 00054 ReferenceCounting<Method> M, 00055 Solution& U) 00056 : __problem(P), 00057 __method(M), 00058 __unknown(U) 00059 { 00060 ; 00061 } 00062 00063 virtual ~Solver() 00064 { 00065 ; 00066 } 00067 }; 00068 00069 #endif // SOLVER_HPP 00070
1.5.6