00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
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]; }
00214 interval getSmid(int i) { return SmidSys[i+1]; }
00215 interval getT() { return Tglob; }
00216 interval getT(int i) { return TSys[i+1]; }
00217 interval getTmid(int i) { return TmidSys[i+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