Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

System-FIGL-Loeser-par.hpp

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // VFIS 
00003 // ----------------------------------------------------------------------------
00004 // Verified Fredholm Integral Equation Solver
00005 // for linear Fredholm Integral Equations of the second kind
00006 // (Parallel System Version)
00007 // ----------------------------------------------------------------------------
00008 // Verifizierter Integralgleichungsloeser 
00009 // fuer lineare Fredholmsche Integralgleichungen zweiter Art
00010 // (Parallele Systemversion)
00011 // ----------------------------------------------------------------------------
00012 // Copyright (c) 2004-2007 Markus Grimmer
00013 //
00014 // markus.grimmer@math.uni-wuppertal.de
00015 // ----------------------------------------------------------------------------
00016 
00017 // This file is part of the Verified Fredholm Integral Equation Solver VFIS.
00018 // 
00019 // VFIS is free software; you can redistribute it and/or modify
00020 // it under the terms of the GNU General Public License as published by
00021 // the Free Software Foundation; either version 2 of the License, or
00022 // (at your option) any later version.
00023 // 
00024 // VFIS is distributed in the hope that it will be useful,
00025 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00026 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00027 // GNU General Public License for more details.
00028 // 
00029 // You should have received a copy of the GNU General Public License
00030 // along with VFIS; if not, write to the Free Software
00031 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00032 
00033 // ----------------------------------------------------------------------------
00034 // ----------------------------------------------------------------------------
00035 // ----------------------------------------------------------------------------
00036 
00043 #include <mpi.h>
00044 #include <string>
00045 #include <iostream>    
00046 #include <fstream>    
00047 #include <sstream>
00048 #include <ctime>
00049 #include <vector>
00050 
00051 #include "dim2taylor.hpp"
00052 #include "itaylor.hpp"   
00053 
00054 #include "vectoroperations.hpp"
00055 #include "taylor_mpicomm.hpp"
00056 #include "vector_mpicomm.hpp"
00057 
00058 #include "ilss_par.hpp"
00059 
00060 #include "interval.hpp"
00061 #include "ivector.hpp"
00062 #include "intvector.hpp"
00063 #include "imatrix.hpp"
00064 #include "real.hpp"
00065 
00066 #include "dot.hpp"
00067 #include "idot.hpp"
00068 
00069 
00070 using namespace std;
00071 using namespace cxsc;
00072 using namespace taylor;
00073 
00074 void start_clock(clock_t&);
00075 void print_time_used(clock_t, ofstream&);
00076 
00077 interval Imid(interval&);
00078 itaylor blow(itaylor&, real);
00079 vector<itaylor> blow(vector<itaylor>&, real);
00080 ivector Powers (interval, int);
00081 void Systembasis_Integration(imatrix&, imatrix&,
00082                              int, int, ivector);
00083 
00093 class IntegralSystemOperatorRG
00094 {
00095   private:
00099     vector<vector<ivector> > KSys0;
00103     ivector      SSys;
00107     ivector      SmidSys;
00108 
00109   public:
00110     IntegralSystemOperatorRG(const IntegralSystemOperatorRG&);
00111     IntegralSystemOperatorRG(vector<vector<ivector> >&, ivector&, ivector&);
00112     vector<itaylor> operator()(vector<itaylor>&, int, int,
00113                                imatrix&, imatrix&); 
00114 };
00115 
00116 // -----------------------------------------------------------------------------
00117 
00118 vector<itaylor> IterativesVerfahren (IntegralSystemOperatorRG&, 
00119                              vector<itaylor>&, 
00120                              int, int, 
00121                              imatrix&, imatrix&, int&, ofstream&);
00122 
00123 // -----------------------------------------------------------------------------
00124 
00132 class IntegralGleichungsSystem
00133 {
00134   private:
00138     typedef dim2taylor (*KFkt)(dim2taylor_vector&);
00142     typedef itaylor (*ReFkt)(itaylor&);
00146     vector<vector<KFkt> > KernFktSys0;
00150     vector<ReFkt> RechtsFktSys0;
00151 
00155     vector<vector<dim2taylor> > KernSys0;
00159     vector<itaylor> RSSys0;
00160         
00165     interval     Sglob, Tglob, RS_Sglob;
00166     ivector      SSys, TSys, SmidSys, TmidSys;
00167     ivector      RS_SSys, RS_SmidSys;
00169 
00172     ivector         ILGS_Lsg;
00176     vector<itaylor> Lsg0;
00180     int sysord;
00184     int ord;
00188     imatrix BasisInt_a;
00192     imatrix BasisInt_b;
00196     vector<vector<ivector> > RestkernSys0;
00197 
00198   public:
00199 
00205     vector<vector<dim2taylor> >& getKern() { return KernSys0; }
00206     dim2taylor& getKern(int i, int j) { return (KernSys0.at(i)).at(j); }
00207     vector<itaylor>& getRS()          { return RSSys0; }
00208     itaylor& getRS(int i)             { return RSSys0.at(i); }
00209     ivector& getSSys()      { return SSys; }    
00210     ivector& getTSys()      { return SSys; }    
00211     ivector& getRS_SSys()   { return RS_SSys; }
00212     interval getS()         { return Sglob; }
00213     interval getS(int i)    { return SSys[i+1]; }     // Indexbereich "0..n-1"
00214     interval getSmid(int i) { return SmidSys[i+1]; }  // Indexbereich "0..n-1"
00215     interval getT()         { return Tglob; }
00216     interval getT(int i)    { return TSys[i+1]; }     // Indexbereich "0..n-1"
00217     interval getTmid(int i) { return TmidSys[i+1]; }  // Indexbereich "0..n-1"
00218     interval getRS_S()        { return RS_Sglob; }
00219     vector<itaylor>& getLsg() { return Lsg0; }
00220     itaylor& getLsg(int i)    { return Lsg0.at(i); }
00222   
00223     IntegralGleichungsSystem (int sysord=0, int ord=0);
00224     IntegralGleichungsSystem (KFkt,interval, interval,
00225                               ReFkt, interval, int, int, ofstream&, string);  
00226 
00227     void PartInitIntegralGleichungsSystem (KFkt,interval, interval,
00228                               ReFkt, interval, int, int, ofstream&, string); 
00229     int DistributeValues(int);
00230  
00231     void Einschliessung_berechnen(ofstream&,string,int,int,int&);
00232     void SystemLoesungsansatz(vector<vector<vector<itaylor> > >&,
00233                               vector<itaylor>&, int, ofstream&, string, 
00234                               int, int, int, int&);
00235     void SystemLoesung_bilden(vector<vector<vector<itaylor> > >&,
00236                               vector<itaylor>&, int, ofstream&);
00237     real Genauigkeit(int);
00238 
00239     void Export(string dest, string fname, string varname="IGLSys_Lsg");
00240     void Export_Plot(string dest, string fname, int steps, 
00241                      string varname="IGLSys_Lsg", 
00242                      string plottitle="Integral Equation System Solution Enclosure");
00243 
00244     
00245     friend ostream& operator<< (ostream&, IntegralGleichungsSystem&);
00246 
00247 };
00248 
00249 

Generated on Tue Feb 27 21:19:13 2007 for VFIS by  doxygen 1.4.4