00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2007 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: SpectralMethod.hpp,v 1.7 2008/02/13 22:05:38 delpinux Exp $ 00019 00020 #ifndef SPECTRAL_METHOD_HPP 00021 #define SPECTRAL_METHOD_HPP 00022 00023 #include <DegreeOfFreedomSet.hpp> 00024 00025 #include <BaseMatrix.hpp> 00026 #include <BaseVector.hpp> 00027 00028 #include <Method.hpp> 00029 00030 #include <Problem.hpp> 00031 #include <Solution.hpp> 00032 00033 #include <Mesh.hpp> 00034 00042 class SpectralMethod 00043 : public Method 00044 { 00045 private: 00046 ReferenceCounting<BaseMatrix> __A; 00047 ReferenceCounting<BaseVector> __b; 00048 00049 ConstReferenceCounting<Mesh> __mesh; 00050 00051 ConstReferenceCounting<Problem> __problem; 00052 00053 const DegreeOfFreedomSet& __degreeOfFreedomSet; 00054 00055 void __discretizeOnConformingMesh(); 00056 void __discretizeOnOctreeMesh(); 00057 void __discretize(); 00058 00059 public: 00060 00061 void Discretize(ConstReferenceCounting<Problem> Pb); 00062 00063 void Compute(Solution& u); 00064 00065 const Problem& problem() const 00066 { 00067 return *__problem; 00068 } 00069 00070 const Mesh& mesh() const 00071 { 00072 return *__mesh; 00073 } 00074 00075 SpectralMethod(const DiscretizationType& discretizationType, 00076 ConstReferenceCounting<Mesh> M, 00077 const DegreeOfFreedomSet& dOfFreedom); 00078 00079 ~SpectralMethod(); 00080 }; 00081 00082 #endif // SPECTRAL_METHOD_HPP
1.5.6