src/expde/grid/mgcoeff.cc

Go to the documentation of this file.
00001 //    expde: expression templates for partial differential equations.
00002 //    Copyright (C) 2001  Christoph Pflaum
00003 //    This program is free software; you can redistribute it and/or modify
00004 //    it under the terms of the GNU General Public License as published by
00005 //    the Free Software Foundation; either version 2 of the License, or
00006 //    (at your option) any later version.
00007 //
00008 //    This program is distributed in the hope that it will be useful,
00009 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 //    GNU General Public License for more details.
00012 //
00013 //                 SEE  Notice1.doc made by 
00014 //                 LAWRENCE LIVERMORE NATIONAL LABORATORY
00015 //
00016 
00017 // ------------------------------------------------------------
00018 //
00019 // mgcoeff.cc
00020 //
00021 // ------------------------------------------------------------
00022 
00023 // Include level 0:
00024 #ifdef COMP_GNUOLD
00025  #include <iostream.h>
00026  #include <fstream.h>
00027  #include <time.h>
00028  #include <math.h>
00029 #else
00030  #include <iostream>
00031  #include <fstream>
00032  #include <ctime>
00033  #include <cmath>
00034 #endif 
00035 
00036 
00037 // Include level 0:
00038 #include "../parser.h"   
00039 
00040 // Include level 1:
00041 #include "../paramete.h"
00042 #include "../abbrevi.h"
00043 #include "../math_lib/math_lib.h"
00044 
00045 // Include level 2:
00046 #include "../basic/basic.h"
00047 
00048 // Include level 3:
00049 #include "../domain/domain.h"
00050 #include "../domain/d_exam.h"
00051 
00052 // Include level 4:
00053 #include "../formulas/boundy.h"
00054 #include "../formulas/diffop.h"
00055 #include "../formulas/loc_sten.h"
00056 
00057 // Include level 5:
00058 #include "gpar.h"
00059 #include "parallel.h"
00060 #include "mgcoeff.h"
00061 #include "sto_man.h"
00062 #include "gridbase.h"
00063 #include "grid.h"
00064 // #include "SSten.h"
00065 
00067 //  1. Calc_multigrid_points_part2()
00068 //  2. von alter version; muss mal erneuert werden
00070 
00071 //  1. Calc_multigrid_points_part2()
00073 
00074 
00075 void Grid_base::Calc_multigrid_points_part2() {
00076   int level;
00077   Index3D I, Iop, Iproc;
00078   Pointtype typI;
00079   int i;
00080 
00081   //Test_just_this();
00082 
00083 
00084   D3vector v;
00085   D3vector w;
00086 
00087   if(I_am_active()) {
00088     // first part: finest points
00089     // -----------
00090     level = max_level;
00091     // interior points
00092     iterate_hash1 {
00093       I = point1->Give_Index();
00094       typI = Give_type(I);
00095       if(typI>=interior && I.Tiefe()==level) 
00096         Add_interpolation_point(I,level);
00097     }
00098     
00099     // Zellfreiheitgrade
00100     iterate_hash2 {
00101       if(bocell->Exists_bocellpoint()) {
00102         I = bocell->Give_Index();
00103         for(i=0;i<8;++i)
00104           Add_interpolation_point(I.neighbour((dir_sons)i),level);
00105       }
00106     }
00107     
00108     // boundary points
00109     iterate_hash3 {
00110       I   = bo2point->ind;
00111       Iop = I.next(bo2point->direction,level);
00112       Add_interpolation_point(I,level);
00113       Add_interpolation_point(Iop,level);
00114     }
00115     
00116     // parallelization
00117     if(parallel_version) {
00118       Send_multi_grid_points_parallel(max_level-1);
00119     }
00120 
00121     Index3D my_lev_index;
00122 
00123     // second part: coarser points
00124     // -----------
00125     //    for(level=max_level-1;level>=1;--level) {
00126 
00127     for(level = max_level-1;
00128         level >= Give_my_coarsest_level() && level >1;
00129         --level) {
00130       my_lev_index = Give_my_level_index(level+1);
00131       
00132       iterate_hash1 {
00133         I = point1->Give_Index();
00134         if(I << my_lev_index) {
00135             typI = Give_type(I);
00136 
00137             if(typI>interior && I.Tiefe()==level) {
00138               Add_interpolation_point(I,level);
00139             }
00140             //      if(typI==multigrid && I.Tiefe()==level) {
00141             if(typI==multigrid && I.Tiefe()==level) {
00142 
00143 
00144               if(point1->finest_level>=level)
00145                 Add_interpolation_point(I,level);
00146             }
00147           }
00148         }
00149       
00150       // parallelization
00151       if(parallel_version) {
00152         Send_multi_grid_points_parallel(level-1);
00153       }
00154     }
00155     
00156     // three part: make non-multigrid points exterior
00157     // -----------
00158     iterate_hash1 {
00159       I = point1->Give_Index();
00160       typI               = point1->Give_typ();
00161       if(typI==multigrid && I.Tiefe()<max_level && 
00162          point1->finest_level==0) {
00163         point1->typ=exterior;
00164       }
00165       point1->global_typ = point1->Give_typ();
00166     }
00167   }
00168 
00169   //Test_just_this();
00170 
00171 
00172 
00173   if(parallel_version) {
00174     // fourth part: find out responsibility
00175     //-------------
00176     int number_of_adjecent;
00177     Index3D adjecent_proc[8];
00178     int     adjecent_rank[8];
00179 
00180     int lowest_rank;
00181     bool found_responsibility;
00182     bool I_am_responsible;
00183     
00184 
00185     /*
00186      
00187      case i)
00188 
00189      *---*
00190      |  I|
00191      | + |
00192      |   |
00193      *---*
00194 
00195      case ii)
00196 
00197      *---*---*
00198      |   |   |
00199      | + I + |
00200      |   |   |
00201      *---*---*
00202 
00203      case iii)
00204 
00205      *---*---*
00206      |   |   |
00207      | + | + |
00208      |   |   |
00209      *---I---*
00210      |   |   |
00211      | + | + |
00212      |   |   |
00213      *---*---*
00214 
00215      +                 : is the center of the adjecent processors
00216      number_of_adjecent: is the number of thoses adjecent processors 
00217                          which exists
00218 
00219 
00220      */
00221 
00222 
00223 
00224     iterate_hash1 {
00225       // start
00226       I_am_responsible     = false;
00227       found_responsibility = false;
00228       
00229       I = point1->Give_Index();
00230       typI = Give_type(I);
00231       if(typI==multigrid) {
00232         // study this multigrid point I
00233         if(I<my_index) {
00234           // resonsibility case i)
00235           I_am_responsible     = true;
00236           found_responsibility = true;
00237         }
00238         else {
00239           // find processors which are adjecent to I
00240           number_of_adjecent = 0;
00241           /*
00242             for(p_iter=0;p_iter<hashtable_proc_leng;++p_iter) 
00243             for(point_proc=hashtable_proc_start[p_iter];point_proc!=NULL;
00244             point_proc=point_proc->next) {
00245           */
00246           iterate_hash_proc {
00247             Iproc=point_proc->Give_Index();
00248             if(Iproc.Tiefe()==n_parallel) {
00249               if(I<<Iproc) {
00250                 // found one adjecent processor
00251                 adjecent_proc[number_of_adjecent] = Iproc;
00252                 adjecent_rank[number_of_adjecent] = 
00253                   point_proc->Give_num_proc();
00254                 ++number_of_adjecent;
00255                 if(I<Iproc) {
00256                   // resonsibility case i)
00257                   found_responsibility = true;
00258                 }
00259               }
00260             }
00261             /*
00262               if(found_responsibility) {
00263               // stop iterate_hash_proc
00264               p_iter     = hashtable_proc_leng;
00265               point_proc = NULL;
00266               }
00267             */
00268           }
00269 
00270           if(developer_version) {
00271             if(found_responsibility==false &&
00272                I.Tiefe() >= n_parallel &&
00273                number_of_adjecent==0) {
00274               cout << " error 1 in Calc_multigrid_points_part2(); " << endl;
00275             }
00276           }
00277 
00278           if(found_responsibility == false) {
00279             if(I.Tiefe() >= n_parallel) {
00280               // responsibility case ii) 
00281               // point is contained in an edge or face of 
00282               // processor level n_parallel
00283               // (therefore not needed on coarser grids).
00284               
00285               // search lowest rank of adjecent processors
00286               lowest_rank = adjecent_rank[0];
00287               for(i=1;i<number_of_adjecent;++i) {
00288                 if(lowest_rank > adjecent_rank[i])
00289                   lowest_rank = adjecent_rank[i];
00290               }
00291               found_responsibility = true;
00292               if(lowest_rank == my_rank) 
00293                 I_am_responsible = true;
00294             }
00295             else {
00296               // resonsibility case iii)
00297               // point is corner of processor level n_parallel or coarser
00298               // (therefore also needed on coarser grids).
00299               if(developer_version) {
00300                 if(Exists_proc_corner(I)==false) 
00301                   cout << " error 2 in Calc_multigrid_points_part2(); " 
00302                        << endl;
00303               }
00304               if(Give_proc_corner_number(I)==my_rank) {
00305                 I_am_responsible = true;
00306               }
00307               else {
00308                 I_am_responsible = false;
00309               }
00310             }
00311           }
00312         }
00313         if(I_am_responsible==false) {
00314           level = Give_finest_level(I);
00315           Set_point_typ(I,level,parallel_p);
00316         }
00317       }
00318     }
00319   }
00320 }
00321 
00322 
00323 void Grid_base::Add_interpolation_point(Index3D I, int level) {
00324   if(I.I_x().Tiefe()==level) {
00325     if(I.I_y().Tiefe()==level) {
00326       if(I.I_z().Tiefe()==level) {
00327         // middle point
00328         // edge between EST-WND
00329         Add_multigrid_point(I.next_EST(level),level-1);
00330         Add_multigrid_point(I.next_WND(level),level-1);
00331       }
00332       else {
00333         // TD-surface
00334         // edge between ES-WN
00335         Add_multigrid_point(I.next_ES(level),level-1);
00336         Add_multigrid_point(I.next_WN(level),level-1);
00337       }
00338     }
00339     else {
00340       if(I.I_z().Tiefe()==level) {
00341         // NS-surface
00342         // edge between WT-ED
00343         Add_multigrid_point(I.next_WT(level),level-1);
00344         Add_multigrid_point(I.next_ED(level),level-1);
00345       }
00346       else {
00347         // EW-edge
00348         Add_multigrid_point(I.next_E(level),level-1);
00349         Add_multigrid_point(I.next_W(level),level-1);
00350       }
00351     }
00352   }
00353   else {
00354     if(I.I_y().Tiefe()==level) {
00355       if(I.I_z().Tiefe()==level) {
00356         // EW-surface
00357         // edge between ST-ND
00358         Add_multigrid_point(I.next_ST(level),level-1);
00359         Add_multigrid_point(I.next_ND(level),level-1);
00360       }
00361       else {
00362         // NS-edge
00363         Add_multigrid_point(I.next_N(level),level-1);
00364         Add_multigrid_point(I.next_S(level),level-1);
00365       }
00366     }
00367     else {
00368       if(I.I_z().Tiefe()==level) {
00369         // TD-edge
00370         Add_multigrid_point(I.next_T(level),level-1);
00371         Add_multigrid_point(I.next_D(level),level-1);
00372       }
00373     }
00374   }
00375 }
00376 
00377 
00378 // schneller machen mit point1 anstatt I
00379 void Grid_base::Add_multigrid_point(Index3D I, int level) {
00380   Pointtype typI;
00381   typI = Give_type(I);
00382 
00383   // hinzufuegen von Punkten die wegen der Restriktionsformel
00384   // zu grob sind
00385   if(typI==exterior) {
00386     Add_point(I,multigrid);
00387     typI = multigrid;
00388   }
00389 
00390 
00391   if(typI==multigrid) {
00392     Put_finest_level_minimal(I,level);
00393   }
00394 
00395 
00396   if(developer_version) {
00397     if(typI==exterior) {
00398       cout << " Error in Add_multigrid_point: my_rank: " << my_rank
00399            << " x: " << I.I_x().get()
00400            << " y: " << I.I_y().get()
00401            << " z: " << I.I_z().get()
00402            << " level: " << level
00403            << " Exists: " << Exists_Point(I) 
00404            << endl;
00405     }
00406   }
00407 }
00408 
00409 
00410 
00411 
00412 //  2. von alter version; muss mal erneuert werden
00414 
00415 
00416 
00417 
00418 
00419 inline double Inverse_of_weight(int anz) {
00420   if(anz==0) return 0.0;
00421   else       return 1.0 / anz;
00422 }
00423 
00424 
00425 // cc: coarse cell
00426 // fc: fine   cell
00427 // co: corner
00428 inline double Calc_trans_weight(dir_sons cc, dir_sons fc, dir_sons co,
00429                                 double* weights) {
00430   int i,j,k;
00431   i = 2*  (cc&1)     +  (fc&1)     +  (co&1);
00432   j = 2* ((cc>>1)&1) + ((fc>>1)&1) + ((co>>1)&1);
00433   k = 2* ((cc>>2)&1) + ((fc>>2)&1) + ((co>>2)&1);
00434 
00435   if(i==0 || i==4 ||
00436      j==0 || j==4 ||
00437      k==0 || k==4) return 0.0;
00438   else 
00439     return weights[(i-1) + 3*(j-1) + 9*(k-1)];
00440 }
00441 
00442 
00443 void Grid::Calc_Near_bo_MG_Coefficients(Index3D I, int l, double weight) {
00444   list_bilding_nearb = new Point_mg_coeff_nearb(I,Give_variable(I,l+1),weight,
00445                                                 list_bilding_nearb);
00446 
00447   for(int i=0;i<6;++i) {
00448     if(Exists_Bo_Point(I,(dir_3D)i)) {
00449       list_bilding_bo = new Point_mg_coeff_bo(I,(dir_3D)i,
00450                                               Give_variable(I,(dir_3D)i),
00451                                               weight,list_bilding_bo);
00452     }
00453   }
00454 };
00455 
00456 // Berechnung der Mehrgitterkoeffizienten
00457 void Grid::Calc_MG_Coefficients() {
00458   P_nearb    *it_n;
00459   Index3D I, next, next_cell;
00460   int color;
00461 
00462 
00463 
00464   cout << " Error! Do not use Calc_MG_Coefficients()!" << endl;
00465 
00466   for(int lev=Max_level()-1;lev>=Min_level();--lev) {
00467    for(color=0;color<8;++color)
00468     for(it_n=Start_P_nearb(lev,color);it_n!=NULL;it_n=it_n->Next()) {
00469     I = it_n->Ind();
00470 
00471     // Start:
00472     list_bilding_nearb = NULL;
00473     list_bilding_bo = NULL;
00474 
00475     // M:
00476     list_bilding_nearb = new Point_mg_coeff_nearb(I,Give_variable(I,lev+1),
00477                                                   1.0,
00478                                                   list_bilding_nearb);
00479     weight_27[trans27(MOrt,MOrt,MOrt)] = 1.0;
00480 
00481     /*
00482       BoCeData* bocedata;
00483       int k;
00484       int i,j;
00485       int Inv_weight;
00486       double weight;
00487       double* UU;
00488     // edges:
00489     // N 
00490     next = I.next_N(lev+1);
00491     Inv_weight = Give_Prolongation_weight(next);
00492     weight = Inverse_of_weight(Inv_weight);
00493     if(Inv_weight!=0) 
00494       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00495     weight_27[trans27(MOrt,ROrt,MOrt)] = weight;
00496     // S
00497     next = I.next_S(lev+1);
00498     Inv_weight = Give_Prolongation_weight(next);
00499     weight = Inverse_of_weight(Inv_weight);
00500     if(Inv_weight!=0)   
00501       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00502     weight_27[trans27(MOrt,LOrt,MOrt)] = weight;
00503     // E
00504     next = I.next_E(lev+1);
00505     Inv_weight = Give_Prolongation_weight(next);
00506     weight = Inverse_of_weight(Inv_weight);
00507     if(Inv_weight!=0)   
00508       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00509     weight_27[trans27(ROrt,MOrt,MOrt)] = weight;
00510     // W
00511     next = I.next_W(lev+1);
00512     Inv_weight = Give_Prolongation_weight(next);
00513     weight = Inverse_of_weight(Inv_weight);
00514     if(Inv_weight!=0)   
00515       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00516     weight_27[trans27(LOrt,MOrt,MOrt)] = weight;
00517     // T
00518     next = I.next_T(lev+1);
00519     Inv_weight = Give_Prolongation_weight(next);
00520     weight = Inverse_of_weight(Inv_weight);
00521     if(Inv_weight!=0)   
00522       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00523     weight_27[trans27(MOrt,MOrt,ROrt)] = weight;
00524     // D
00525     next = I.next_D(lev+1);
00526     Inv_weight = Give_Prolongation_weight(next);
00527     weight = Inverse_of_weight(Inv_weight);
00528     if(Inv_weight!=0)   
00529       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00530     weight_27[trans27(MOrt,MOrt,LOrt)] = weight;
00531 
00532 
00533     // classic faces:
00534     // ND
00535     next = I.next_ND(lev+1);
00536     Inv_weight = Give_Prolongation_weight(next);
00537     weight = Inverse_of_weight(Inv_weight);
00538     if(Inv_weight==4)
00539       list_bilding_nearb = 
00540         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00541                                  list_bilding_nearb);
00542     if(Inv_weight!=0)   
00543       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00544     weight_27[trans27(MOrt,ROrt,LOrt)] = weight;
00545     // WN
00546     next = I.next_WN(lev+1);
00547     Inv_weight = Give_Prolongation_weight(next);
00548     weight = Inverse_of_weight(Inv_weight);
00549     if(Inv_weight==4)
00550       list_bilding_nearb = 
00551         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00552                                  list_bilding_nearb);
00553     if(Inv_weight!=0)   
00554       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00555     weight_27[trans27(LOrt,ROrt,MOrt)] = weight;
00556     // WT
00557     next = I.next_WT(lev+1);
00558     Inv_weight = Give_Prolongation_weight(next);
00559     weight = Inverse_of_weight(Inv_weight);
00560     if(Inv_weight==4)
00561       list_bilding_nearb = 
00562         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00563                                  list_bilding_nearb);
00564     if(Inv_weight!=0)   
00565       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00566     weight_27[trans27(LOrt,MOrt,ROrt)] = weight;
00567     // ED
00568     next = I.next_ED(lev+1);
00569     Inv_weight = Give_Prolongation_weight(next);
00570     weight = Inverse_of_weight(Inv_weight);
00571     if(Inv_weight==4)
00572       list_bilding_nearb = 
00573         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00574                                  list_bilding_nearb);
00575     if(Inv_weight!=0)   
00576       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00577     weight_27[trans27(ROrt,MOrt,LOrt)] = weight;
00578     // ST
00579     next = I.next_ST(lev+1);
00580     Inv_weight = Give_Prolongation_weight(next);
00581     weight = Inverse_of_weight(Inv_weight);
00582     if(Inv_weight==4)
00583       list_bilding_nearb = 
00584         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00585                                  list_bilding_nearb);
00586     if(Inv_weight!=0)   
00587       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00588     weight_27[trans27(MOrt,LOrt,ROrt)] = weight;
00589     // ES
00590     next = I.next_ES(lev+1);
00591     Inv_weight = Give_Prolongation_weight(next);
00592     weight = Inverse_of_weight(Inv_weight);
00593     if(Inv_weight==4)
00594       list_bilding_nearb = 
00595         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00596                                  list_bilding_nearb);
00597     if(Inv_weight!=0)   
00598       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00599     weight_27[trans27(ROrt,LOrt,MOrt)] = weight;
00600 
00601 
00602 
00603     // only near boundary faces:
00604     // SD
00605     next = I.next_SD(lev+1);
00606     Inv_weight = Give_Prolongation_weight(next);
00607     weight = Inverse_of_weight(Inv_weight);
00608     if(Inv_weight!=0 && Inv_weight!=4)   
00609       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00610     weight_27[trans27(MOrt,LOrt,LOrt)] = weight;
00611     // NT
00612     next = I.next_NT(lev+1);
00613     Inv_weight = Give_Prolongation_weight(next);
00614     weight = Inverse_of_weight(Inv_weight);
00615     if(Inv_weight!=0 && Inv_weight!=4)   
00616       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00617     weight_27[trans27(MOrt,ROrt,ROrt)] = weight;
00618     // EN
00619     next = I.next_EN(lev+1);
00620     Inv_weight = Give_Prolongation_weight(next);
00621     weight = Inverse_of_weight(Inv_weight);
00622     if(Inv_weight!=0 && Inv_weight!=4)   
00623       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00624     weight_27[trans27(ROrt,ROrt,MOrt)] = weight;
00625     // WS
00626     next = I.next_WS(lev+1);
00627     Inv_weight = Give_Prolongation_weight(next);
00628     weight = Inverse_of_weight(Inv_weight);
00629     if(Inv_weight!=0 && Inv_weight!=4)   
00630       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00631     weight_27[trans27(LOrt,LOrt,MOrt)] = weight;
00632     // ET
00633     next = I.next_ET(lev+1);
00634     Inv_weight = Give_Prolongation_weight(next);
00635     weight = Inverse_of_weight(Inv_weight);
00636     if(Inv_weight!=0 && Inv_weight!=4)   
00637       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00638     weight_27[trans27(ROrt,MOrt,ROrt)] = weight;
00639     // WD
00640     next = I.next_WD(lev+1);
00641     Inv_weight = Give_Prolongation_weight(next);
00642     weight = Inverse_of_weight(Inv_weight);
00643     if(Inv_weight!=0 && Inv_weight!=4)   
00644       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00645     weight_27[trans27(LOrt,MOrt,LOrt)] = weight;
00646 
00647 
00648     // classic cells:
00649     // EST
00650     next = I.next_EST(lev+1);
00651     Inv_weight = Give_Prolongation_weight(next);
00652     weight = Inverse_of_weight(Inv_weight);
00653     if(Inv_weight==8)
00654       list_bilding_nearb = 
00655         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00656                                  list_bilding_nearb);
00657     if(Inv_weight!=0)   
00658       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00659     weight_27[trans27(ROrt,LOrt,ROrt)] = weight;
00660 
00661     // WND
00662     next = I.next_WND(lev+1);
00663     Inv_weight = Give_Prolongation_weight(next);
00664     weight = Inverse_of_weight(Inv_weight);
00665     if(Inv_weight==8)
00666       list_bilding_nearb = 
00667         new Point_mg_coeff_nearb(next,Give_variable(next,lev+1),0.5,
00668                                  list_bilding_nearb);
00669     if(Inv_weight!=0)   
00670       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00671     weight_27[trans27(LOrt,ROrt,LOrt)] = weight;
00672 
00673     // only near boundary cells:
00674     // ESD
00675     next = I.next_ESD(lev+1);
00676     Inv_weight = Give_Prolongation_weight(next);
00677     weight = Inverse_of_weight(Inv_weight);
00678     if(Inv_weight!=0 && Inv_weight!=8)   
00679       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00680     weight_27[trans27(ROrt,LOrt,LOrt)] = weight;
00681     // ENT
00682     next = I.next_ENT(lev+1);
00683     Inv_weight = Give_Prolongation_weight(next);
00684     weight = Inverse_of_weight(Inv_weight);
00685     if(Inv_weight!=0 && Inv_weight!=8)   
00686       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00687     weight_27[trans27(ROrt,ROrt,ROrt)] = weight;
00688     // END
00689     next = I.next_END(lev+1);
00690     Inv_weight = Give_Prolongation_weight(next);
00691     weight = Inverse_of_weight(Inv_weight);
00692     if(Inv_weight!=0 && Inv_weight!=8)   
00693       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00694     weight_27[trans27(ROrt,ROrt,LOrt)] = weight;
00695     // WSD
00696     next = I.next_WSD(lev+1);
00697     Inv_weight = Give_Prolongation_weight(next);
00698     weight = Inverse_of_weight(Inv_weight);
00699     if(Inv_weight!=0 && Inv_weight!=8)   
00700       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00701     weight_27[trans27(LOrt,LOrt,LOrt)] = weight;
00702     // WNT
00703     next = I.next_WNT(lev+1);
00704     Inv_weight = Give_Prolongation_weight(next);
00705     weight = Inverse_of_weight(Inv_weight);
00706     if(Inv_weight!=0 && Inv_weight!=8)   
00707       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00708     weight_27[trans27(LOrt,ROrt,ROrt)] = weight;
00709     // WST
00710     next = I.next_WST(lev+1);
00711     Inv_weight = Give_Prolongation_weight(next);
00712     weight = Inverse_of_weight(Inv_weight);
00713     if(Inv_weight!=0 && Inv_weight!=8)   
00714       Calc_Near_bo_MG_Coefficients(next,lev,weight);
00715     weight_27[trans27(LOrt,LOrt,ROrt)] = weight;
00716 
00717     // bocell point (Randzellfreiheitsgrad)
00718     for(i=0;i<8;++i) {    // go to middle point of neighbour coarse cells
00719       next_cell = I.next((dir_sons)i,lev+1); 
00720       for(j=0;j<8;++j) {    // go to middle point of neighbour fine cells
00721         next = next_cell.next((dir_sons)i,lev+2); 
00722         bocedata = Give_Bo_cell(next);
00723         if(bocedata!=NULL) {
00724           if(bocedata->Exists_bocellpoint()) {
00725             //    cout << " fine_bo_cell " << endl;
00726             UU = Give_vector_ablage();
00727             
00728             for(k=0;k<8;++k) {
00729               UU[k] = Calc_trans_weight((dir_sons)i,(dir_sons)j,(dir_sons)k,
00730                                         weight_27);
00731             }
00732             list_bilding_nearb = new Point_mg_coeff_nearb(I,
00733                       bocedata->vars[bocedata->Give_number_points()],
00734                       bocedata->Weight_bocellpoint() *
00735                         bocedata->Interpolation_interior_corners(UU),
00736                       list_bilding_nearb);
00737           }
00738         }
00739       }
00740     }
00741     it_n->Set_first_mg_coeff_nearb(list_bilding_nearb);
00742     it_n->Set_first_mg_coeff_bo(list_bilding_bo);
00743     */
00744 
00745     }
00746   }
00747 };

Generated on Mon Jan 16 13:23:41 2006 for IPPL by  doxygen 1.4.6