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

src/expde/extemp/operav.h

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 #ifndef OPERAV_H_
00018 #define OPERAV_H_
00019         
00020 // ------------------------------------------------------------
00021 // operatorv.h
00022 //
00023 // ------------------------------------------------------------
00024 
00025 // Remark: this file uses the formulas in source/formulas/diffopv.h
00026 
00028 //   Variable coefficient Differential operators
00030 
00031  
00032 // a.: Operator
00034 
00035 
00036 
00037 
00038 /* DExprDiff_17S_Op for Differential operators */
00039 template<class Vv, class Va, class DiffOp>
00040 class DVarDiff_17S_Op_var {
00041   Va a_;
00042   Vv v_;
00043   double *Stencil;      // stencil independent of meshsize
00044 
00045  public:
00046   // Constructor for concrete operators
00047   /*
00048   DVarDiff_17S_Op_var(const Va& a, const Vv& v)
00049     : v_(v), a_(a) {
00050     DiffOp opp;
00051     if(opp.typ_u()==Poisson_type ||
00052        opp.typ_v()==Poisson_type) 
00053       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00054     else {
00055       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00056     }
00057   }
00058   DVarDiff_17S_Op_var(const Va& a, const DExpr<Vv>& v)
00059     : v_(v), a_(a) {
00060     DiffOp opp;
00061     if(opp.typ_u()==Poisson_type ||
00062        opp.typ_v()==Poisson_type) 
00063       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00064     else {
00065       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00066     }
00067   }
00068   DVarDiff_17S_Op_var(const DExpr<DExprVAR_ARR>& a, const Vv& v)
00069     : v_(v), a_(a) {
00070     DiffOp opp;
00071     if(opp.typ_u()==Poisson_type ||
00072        opp.typ_v()==Poisson_type) 
00073       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00074     else {
00075       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00076     }
00077   }
00078   */
00079 
00080   DVarDiff_17S_Op_var(const Va& a, const Vv& v)
00081     : a_(a), v_(v) {
00082     DiffOp opp;
00083     if(opp.typ_u()==Poisson_type ||
00084        opp.typ_v()==Poisson_type) 
00085       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00086     else {
00087       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00088     }
00089   }
00090 
00091   /*
00092   DVarDiff_17S_Op_var(const Variable& a, const Variable& v)
00093     : v_(v), a_(a) {
00094     DiffOp opp;
00095     if(opp.typ_u()==Poisson_type ||
00096        opp.typ_v()==Poisson_type) 
00097       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00098     else {
00099       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00100     }
00101   }
00102   DVarDiff_17S_Op_var(const Variable& a, const DExpr<Vv>& v)
00103     : v_(v), a_(a) {
00104     DiffOp opp;
00105     if(opp.typ_u()==Poisson_type ||
00106        opp.typ_v()==Poisson_type) 
00107       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00108     else {
00109       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00110     }
00111   }
00112   DVarDiff_17S_Op_var(const DExpr<DExprVAR_ARR>& a, const Variable& v)
00113     : v_(v), a_(a) {
00114     DiffOp opp;
00115     if(opp.typ_u()==Poisson_type ||
00116        opp.typ_v()==Poisson_type) 
00117       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00118     else {
00119       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00120     }
00121   }
00122   DVarDiff_17S_Op_var(const DExpr<DExprVAR_ARR>& a, 
00123                       const DExpr<DExprVAR_ARR>& v)
00124     : v_(v), a_(a) {
00125     DiffOp opp;
00126     if(opp.typ_u()==Poisson_type ||
00127        opp.typ_v()==Poisson_type) 
00128       Stencil = v.Give_grid()->Give_Loc_stencil_Poisson();
00129     else {
00130       Stencil = v.Give_grid()->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00131     }
00132   }
00133   */
00134   double Give_interior(const P_interior* it_i, const Grid* grid, double h_mesh,
00135                        int lev, double_stencils_in) const {
00136     return Give_interior_here(it_i,grid,h_mesh,lev, double_stencils_out);
00137   }
00138   double Give_interior_coarse(const P_interior* it_i, const Grid* grid,
00139                               double h_mesh,
00140                               int lev, double_stencils_in) const {
00141     return Give_interior_here(it_i,grid,h_mesh,lev, double_stencils_out);
00142   }
00143   double Give_interior_here(const P_interior* it_i, const Grid* gr,
00144                             double h_mesh,
00145                             int l, double_stencils_in) const {
00146     return DiffOp::stencil(LuN[v_.Number_variable()],
00147                           LuW[v_.Number_variable()],
00148                           LuM[v_.Number_variable()],
00149                           LuE[v_.Number_variable()],
00150                           LuS[v_.Number_variable()],
00151                           LuT[v_.Number_variable()],
00152                           LuD[v_.Number_variable()],
00153                           LuND[v_.Number_variable()],
00154                           LuWN[v_.Number_variable()],
00155                           LuWT[v_.Number_variable()],
00156                           LuED[v_.Number_variable()],
00157                           LuST[v_.Number_variable()],
00158                           LuES[v_.Number_variable()],
00159                           LuEST[v_.Number_variable()],
00160                           LuWND[v_.Number_variable()],
00161                           LuN[a_.Number_variable()],
00162                           LuW[a_.Number_variable()],
00163                           LuM[a_.Number_variable()],
00164                           LuE[a_.Number_variable()],
00165                           LuS[a_.Number_variable()],
00166                           LuT[a_.Number_variable()],
00167                           LuD[a_.Number_variable()],
00168                           LuST[a_.Number_variable()],
00169                           LuET[a_.Number_variable()],
00170                           LuES[a_.Number_variable()],
00171                           LuND[a_.Number_variable()],
00172                           LuWD[a_.Number_variable()],
00173                           LuWN[a_.Number_variable()],
00174                           LuEST[a_.Number_variable()],
00175                           LuWND[a_.Number_variable()],
00176                           h_mesh);
00177 
00178   };
00179   double Give_nearb(const P_nearb* it_n, const Grid* gr, double h_mesh, int l,
00180                     const Nearb_Ablage* nearb_ablage) const {
00181     static int i;
00182     static BoCeData* bocedata;
00183     static Celltype cetyp;
00184     static double sum;
00185     static int num_v;
00186     dir_sons dir_v;
00187 
00188     sum = 0.0;
00189     for(i=0;i<8;++i) {    // Durchlaufen aller Nachbarzellen
00190       dir_v = opposite3D((dir_sons)i);
00191       // Hole Info ueber i-Randzelle
00192       cetyp = nearb_ablage->Give_Celltyp((dir_sons)i);
00193       if(cetyp==fine_bo_cell) {
00194         bocedata = nearb_ablage->Give_BoData((dir_sons)i);
00195         // Berechnung der Nummer der Testfunktion auf i-Randzelle
00196         for(num_v=0;(!(bocedata->corner(num_v)==dir_v)) ||
00197               bocedata->edge_point(num_v);) { ++num_v; }
00198         // Auswertung
00199         sum = sum + DiffOp::F_bo_cell(bocedata,num_v,v_.Number_variable(),
00200                                       a_.Number_variable());
00201       }
00202       else if(cetyp==int_cell) {
00203         sum = sum +
00204           F_reg_cell(nearb_ablage->Give_u_Recell((dir_sons)i),
00205                      v_.Number_variable(),
00206                      dir_v,h_mesh,Stencil) *
00207           F_interpolate_var_on_cell(nearb_ablage->Give_u_Recell((dir_sons)i),
00208                                     a_.Number_variable());
00209       }
00210     }
00211     return sum;
00212   };
00213   double F_interpolate_var_on_cell(double*const * u_Recell, int num_a) const {
00214     return 0.5 * (u_Recell[ESTd][num_a] +
00215                   u_Recell[WNDd][num_a]);
00216   }
00217   double F_reg_cell(double*const * u_Recell, int num_var,
00218                                   dir_sons dir_v,
00219                                   double h_mesh, double* sten) const {
00220     static int i;
00221     static double sum;
00222     sum = 0.0;
00223     for(i=0;i<8;++i) sum = sum + sten[dir_v+8*i] * u_Recell[i][num_var];
00224     return sum * DiffOp::Factor_reg_cell(h_mesh);
00225   }
00226   double Give_cellpoi(const P_cellpoi* it_cf, const Grid* gr,
00227                       const BoCeData* bocedata) const {
00228     // Auswertung 
00229     return DiffOp::F_bo_cell(bocedata,bocedata->Give_number_points(),
00230                              v_.Number_variable(),a_.Number_variable());
00231   };
00232   double Give_Bo2p(const P_Bo2p* it_b, const Grid* gr,int l)  const {
00233     static int i;
00234     static BoCeData* bocedata;
00235     static double sum;
00236     static int num_v;
00237     dir_sons dir_v;
00238     bool stop;
00239 
00240     sum = 0.0;
00241     for(i=0;i<8;++i) {    // Durchlaufen aller Nachbarzellen
00242       dir_v = opposite3D((dir_sons)i);
00243       // Info ueber i-Randzelle
00244       bocedata = it_b->Give_BoData((dir_sons)i); 
00245       if(bocedata!=NULL) {
00246         // Berechnung der Nummer der Testfunktion auf i-Randzelle
00247         stop = false;
00248         for(num_v=0;!stop && bocedata->Give_number_points() > num_v;) {
00249           stop = bocedata->corner(num_v)   == dir_v      &&
00250                  bocedata->edge_dir(num_v) == it_b->d()  &&
00251                  bocedata->edge_point(num_v);
00252           if(!stop) ++num_v;
00253         }
00254 
00255         if(bocedata->Give_number_points() > num_v) {
00256           // Auswertung
00257           sum = sum + 
00258             DiffOp::F_bo_cell(bocedata,num_v,v_.Number_variable(),
00259                               a_.Number_variable());
00260         }
00261       }
00262     }
00263     return sum;
00264   };
00265   // Size of necessary stencil
00266   int Sice_stencil() const { return 17; }
00267 
00268   // activity of points
00269   int Level() const { return (v_).Level(); }
00270   Dominace_label Dominant_lev() const { return not_dominant; }
00271   Dominace_label Dominant_poi() const { return not_dominant; }
00272   bool run_interior() const { return (v_).run_interior(); }
00273   bool run_nearb()    const { return (v_).run_nearb(); }
00274   int run_boundary() const { return (v_).run_boundary(); }
00275 
00276   // number of operations
00277   int ops_interior() const { return DiffOp::ops_interior(); }
00278 
00279   // For operator ==
00280   void Active_Sim_Level( int lev) const {  };
00281   void Active_Sim_interior(bool run) const {  };
00282   void Active_Sim_nearb(bool run) const {  };
00283   void Active_Sim_boundary( int run) const {  };
00284   void Active_Sim_update(Evaluation_Parallelization_object* evpar,
00285                          int level, type_of_update typ) const {  };
00286 
00287   // Put pointer to grid and activity of boundary points of test space  
00288   void Put_grid_rbo(const Grid* gr, int r_bo) const {}; 
00289 
00290 
00291   // For abstract differential operators:
00292   // --------------------------------------
00293   // Is the expression an abstract differential operator?
00294   Differential_op_typ Abstract_differential_operator() const
00295     { return abstract_with_var; }
00296   int Give_number_var_of_abstract_op() const { 
00297     return v_.Number_variable_start();
00298   }
00299   bool Give_array_variable_inserted() const {
00300     if(a_.Give_array_variable_inserted() !=
00301        v_.Give_array_variable_inserted()) 
00302       cout << " wrong usage of operator in array " << endl;
00303     return v_.Give_array_variable_inserted();
00304   }
00305   int Give_length_of_array_variable_inserted() const {
00306     return v_.Give_length_of_array_variable_inserted();
00307   }
00308   // For restriction of stencils
00309   // --------------------------------------
00310   double Give_interior_sten_element(Index3D I, double meshsize,
00311                                     int stelle,
00312                                     const Grid* grid, int level) const {
00313     return 0.5 *
00314       (grid->Give_variable(I.neighbour(ESTd),
00315                            level)[a_.Number_variable()] +
00316        grid->Give_variable(I.neighbour(WNDd),
00317                            level)[a_.Number_variable()])
00318       * Stencil[stelle] * DiffOp::Factor_reg_cell(meshsize);
00319   }
00320   double Give_boundary_sten_element(const Grid* grid, BoCeData* b_cell,
00321                                     double* u_ablage, int num_v) const {
00322     return DiffOp::Local_matrix_bo_cell(b_cell,u_ablage,num_v,
00323                                         a_.Number_variable());
00324   }
00325   // for Parallelization
00326   void Add_variables_for_parallel(Evaluation_Parallelization_object *evpar) 
00327     const {
00328     evpar->Variable_contained_in_expression(v_.Number_variable());
00329     evpar->Variable_contained_in_expression(a_.Number_variable());
00330   }
00331   bool GS_type(int var_number_left, int dim) const {
00332     if(var_number_left<=v_.Number_variable() &&
00333        var_number_left+dim>=v_.Number_variable())
00334       return true;
00335     if(var_number_left<=a_.Number_variable() &&
00336        var_number_left+dim>=a_.Number_variable())
00337       return true;
00338     return false; 
00339   };
00340   // at the and of an iteration of an expression
00341   void clean() const { };
00342 };
00343 
00344 
00345 /* Unary operators */
00346 // Laplace
00347 
00348 #define Macro_operator_var_definition(insertA,insertB) \
00349 DExpr<DVarDiff_17S_Op_var<insertA, insertB, laplace_FE_variable> > \
00350 Laplace_FE_var(insertA a, insertB v); \
00351 /* DxDx */ \
00352 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dxdx_FE_variable> > \
00353 DxDx_FE_var(insertA a, insertB v); \
00354 /* Dydy */ \
00355 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dydy_FE_variable> > \
00356 DyDy_FE_var(insertA a, insertB v); \
00357 /* Dzdz */ \
00358 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dzdz_FE_variable> > \
00359 DzDz_FE_var(insertA a, insertB v); \
00360 /* Helm */ \
00361 DExpr<DVarDiff_17S_Op_var<insertA, insertB, helm_FE_variable> > \
00362 Helm_FE_var(insertA a, insertB v); \
00363 /* //////////////////////// \
00364 // Nichsymmetrische Terme \
00366 /* Dxdy */ \
00367 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dxdy_FE_variable> > \
00368 DxDy_FE_var(insertA a, insertB v); \
00369 /* Dydx */ \
00370 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dydx_FE_variable> > \
00371 DyDx_FE_var(insertA a, insertB v); \
00372 /* Dxdz */ \
00373 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dxdz_FE_variable> > \
00374 DxDz_FE_var(insertA a, insertB v); \
00375 /* Dzdx */ \
00376 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dzdx_FE_variable> > \
00377 DzDx_FE_var(insertA a, insertB v); \
00378 /* Dydz */ \
00379 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dydz_FE_variable> > \
00380 DyDz_FE_var(insertA a, insertB v); \
00381 /* Dzdy */ \
00382 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dzdy_FE_variable> > \
00383 DzDy_FE_var(insertA a, insertB v); \
00384 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dxhelm_FE_variable> > \
00385 DX_FE_var(insertA a, insertB v); \
00386 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dyhelm_FE_variable> > \
00387 DY_FE_var(insertA a, insertB v); \
00388 DExpr<DVarDiff_17S_Op_var<insertA, insertB, dzhelm_FE_variable> > \
00389 DZ_FE_var(insertA a, insertB v); \
00390 DExpr<DVarDiff_17S_Op_var<insertA, insertB, helmdx_FE_variable> > \
00391 DX_FE_var_t(insertA a, insertB v); \
00392 DExpr<DVarDiff_17S_Op_var<insertA, insertB, helmdy_FE_variable> > \
00393 DY_FE_var_t(insertA a, insertB v); \
00394 DExpr<DVarDiff_17S_Op_var<insertA, insertB, helmdz_FE_variable> > \
00395 DZ_FE_var_t(insertA a, insertB v); \
00396 /* //////////////////////// \
00397 // Rand-operatoren \
00399 DExpr<DVarDiff_17S_Op_var<insertA, insertB, L2boundary_variable> > \
00400 Int_boundary_var(insertA a, insertB v);
00401 
00402 Macro_operator_var_definition(Variable,Variable);
00403 // other usage of Macro_operator_definition in array.h
00404  
00405 // b.: Diagonal operator
00407 
00408 
00409 /* DExprDiff_15S_Op for Differential operators */
00410 template<class DiffOp>
00411 class DiagonalDiff_Op_var {
00412  private:
00413   Grid* grid;
00414   Variable a_;
00415   Storage_for_one_Stencil* OS; 
00416  public:
00417   DiagonalDiff_Op_var(const Variable& a)
00418     : a_(a) {
00419     OS = new Storage_for_one_Stencil;
00420   }
00421   double Give_interior(const P_interior* it_i, const Grid* grid, double h_mesh,
00422                        int lev, double_stencils_in) const {
00423     return Give_interior_here(it_i,grid,h_mesh,lev, double_stencils_out);
00424   }
00425   double Give_interior_coarse(const P_interior* it_i, const Grid* grid,
00426                               double h_mesh,
00427                               int lev, double_stencils_in) const {
00428     return Give_interior_here(it_i,grid,h_mesh,lev, double_stencils_out);
00429   }
00430   double Give_interior_here(const P_interior* it_i, const Grid* gr,
00431                             double h_mesh,
00432                             int l, double_stencils_in) const {
00433     return DiffOp::diag_stencil(h_mesh,
00434                                 LuN[a_.Number_variable()],
00435                                 LuW[a_.Number_variable()],
00436                                 LuM[a_.Number_variable()],
00437                                 LuE[a_.Number_variable()],
00438                                 LuS[a_.Number_variable()],
00439                                 LuT[a_.Number_variable()],
00440                                 LuD[a_.Number_variable()],
00441                                 LuST[a_.Number_variable()],
00442                                 LuET[a_.Number_variable()],
00443                                 LuES[a_.Number_variable()],
00444                                 LuND[a_.Number_variable()],
00445                                 LuWD[a_.Number_variable()],
00446                                 LuWN[a_.Number_variable()],
00447                                 LuEST[a_.Number_variable()],
00448                                 LuWND[a_.Number_variable()]);
00449   };
00450   double Give_nearb(const P_nearb* it_n, const Grid* gr, double h_mesh, int l,
00451                     const Nearb_Ablage* nearb_ablage) const {
00452     static int i;
00453     static BoCeData* bocedata;
00454     static double sum;
00455     static Celltype cetyp;
00456     static int num_v;
00457     dir_sons dir_v;
00458 
00459     sum = 0.0;
00460     for(i=0;i<8;++i) {    // Durchlaufen aller Nachbarzellen
00461       dir_v = opposite3D((dir_sons)i);
00462       cetyp = nearb_ablage->Give_Celltyp((dir_sons)i);
00463       if(cetyp==fine_bo_cell) {
00464         // Hole Info ueber i-Randzelle
00465         bocedata = nearb_ablage->Give_BoData((dir_sons)i); 
00466         // Berechnung der Nummer der Testfunktion auf i-Randzelle
00467         for(num_v=0;(!(bocedata->corner(num_v)==dir_v)) ||
00468               bocedata->edge_point(num_v);) { ++num_v; }
00469         // Auswertung
00470         sum = sum + DiffOp::diag_F_bo_cell(bocedata,num_v,
00471                                            a_.Number_variable());       
00472       }
00473       else if(cetyp==int_cell) {
00474         sum = sum +
00475           diag_F_reg_cell(dir_v,h_mesh,OS->Stencil) *
00476           F_interpolate_var_on_cell(nearb_ablage->Give_u_Recell((dir_sons)i),
00477                                     a_.Number_variable());
00478       }
00479     }
00480     return sum;
00481   };
00482   double F_interpolate_var_on_cell(double*const * u_Recell, int num_a) const {
00483     return 0.5 * (u_Recell[ESTd][num_a] +
00484                   u_Recell[WNDd][num_a]);
00485   }
00486   static inline double diag_F_reg_cell(dir_sons dir_v,
00487                                        double h_mesh, double* sten) {
00488     return sten[dir_v*9] * DiffOp::Factor_reg_cell(h_mesh);
00489   }
00490   double Give_cellpoi(const P_cellpoi* it_cf, const Grid* gr,
00491                       const BoCeData* bocedata) const {
00492     // Auswertung 
00493     return DiffOp::diag_F_bo_cell(bocedata,bocedata->Give_number_points(),
00494                                   a_.Number_variable());
00495   };
00496   double Give_Bo2p(const P_Bo2p* it_b, const Grid* gr,int l)  const {
00497     static int i;
00498     static BoCeData* bocedata;
00499     static double sum;
00500     static int num_v;
00501     dir_sons dir_v;
00502     bool stop;
00503 
00504     sum = 0.0;
00505     for(i=0;i<8;++i) {    // Durchlaufen aller Nachbarzellen
00506       dir_v = opposite3D((dir_sons)i);
00507       // Info ueber i-Randzelle
00508        bocedata = it_b->Give_BoData((dir_sons)i); 
00509       if(bocedata!=NULL) {
00510         // Berechnung der Nummer der Testfunktion auf i-Randzelle
00511         stop = false;
00512         for(num_v=0;!stop && bocedata->Give_number_points() > num_v;) {
00513           stop = bocedata->corner(num_v)   == dir_v      &&
00514                  bocedata->edge_dir(num_v) == it_b->d()  &&
00515                  bocedata->edge_point(num_v);
00516           if(!stop) ++num_v;
00517         }
00518 
00519         if(bocedata->Give_number_points() > num_v) {
00520           // Auswertung
00521           sum = sum + 
00522             DiffOp::diag_F_bo_cell(bocedata,num_v,a_.Number_variable());
00523         }
00524       }
00525     }
00526     return sum;
00527   };
00528   // Size of necessary stencil
00529   int Sice_stencil() const { return 17; }
00530 
00531   // activity of points
00532   int Level() const { return 0; }
00533   Dominace_label Dominant_lev() const { return anti_dominant; }
00534   Dominace_label Dominant_poi() const { return anti_dominant; }
00535   bool run_interior() const { return true; }
00536   bool run_nearb()    const { return true; }
00537   int run_boundary() const { return true; }
00538 
00539   // number of operations
00540   int ops_interior() const { return DiffOp::ops_diag_interior(); }
00541 
00542   // For operator ==
00543   void Active_Sim_Level( int lev) const {  };
00544   void Active_Sim_interior(bool run) const {  };
00545   void Active_Sim_nearb(bool run) const {  };
00546   void Active_Sim_boundary( int run) const {  };
00547   void Active_Sim_update(Evaluation_Parallelization_object* evpar,
00548                          int level, type_of_update typ) const {  };
00549 
00550   // Put pointer to grid and activity of boundary points of test space  
00551   void Put_grid_rbo(Grid* gr, int r_bo) const { 
00552     DiffOp opp;
00553     if(opp.typ_u()==Poisson_type ||
00554        opp.typ_v()==Poisson_type) 
00555       OS->Stencil = gr->Give_Loc_stencil_Poisson();
00556     else {
00557       OS->Stencil = gr->Give_Loc_stencil(opp.typ_u(),opp.typ_v());
00558     }
00559   };
00560   // Is the expression an abstract differential operator?
00561   Differential_op_typ Abstract_differential_operator() const
00562     { return abstract_diag; }
00563   int Give_number_var_of_abstract_op() const { return -1; }
00564   // for Parallelization
00565   void Add_variables_for_parallel(Evaluation_Parallelization_object *evpar)
00566     const {
00567     evpar->Variable_contained_in_expression(a_.Number_variable());
00568   }
00569   bool GS_type(int var_number_left, int dim) const {
00570     if(var_number_left<=a_.Number_variable() &&
00571        var_number_left+dim>=a_.Number_variable())
00572       return true;
00573     return false; 
00574   };
00575   // at the and of an iteration of an expression
00576   void clean() const { delete(OS); };
00577 };
00578 
00579 
00580 /* Unary operators */
00581 
00582 // Laplace
00583 DExpr<DiagonalDiff_Op_var<laplace_FE_variable> >
00584 Diag_Laplace_FE_var(Variable a);
00585 
00586 // DxDx
00587 DExpr<DiagonalDiff_Op_var<dxdx_FE_variable> >
00588 Diag_DxDx_FE_var(Variable a);
00589 
00590 // DyDy
00591 DExpr<DiagonalDiff_Op_var<dydy_FE_variable> >
00592 Diag_DyDy_FE_var(Variable a);
00593 
00594 // DzDz
00595 DExpr<DiagonalDiff_Op_var<dzdz_FE_variable> >
00596 Diag_DzDz_FE_var(Variable a);
00597 
00598 // Helm
00599 DExpr<DiagonalDiff_Op_var<helm_FE_variable> >
00600 Diag_Helm_FE_var(Variable a);
00601 
00602 
00604 // Nichsymmetrische Terme
00606 
00607 // DxDy
00608 DExpr<DiagonalDiff_Op_var<dxdy_FE_variable> >
00609 Diag_DxDy_FE_var(Variable a);
00610 
00611 // DyDx
00612 DExpr<DiagonalDiff_Op_var<dydx_FE_variable> >
00613 Diag_DyDx_FE_var(Variable a);
00614 
00615 // DxDz
00616 DExpr<DiagonalDiff_Op_var<dxdz_FE_variable> >
00617 Diag_DxDz_FE_var(Variable a);
00618 
00619 // DzDx
00620 DExpr<DiagonalDiff_Op_var<dzdx_FE_variable> >
00621 Diag_DzDx_FE_var(Variable a);
00622 
00623 // DyDz
00624 DExpr<DiagonalDiff_Op_var<dydz_FE_variable> >
00625 Diag_DyDz_FE_var(Variable a);
00626 
00627 // DzDy
00628 DExpr<DiagonalDiff_Op_var<dzdy_FE_variable> >
00629 Diag_DzDy_FE_var(Variable a);
00630 
00631 // DX
00632 DExpr<DiagonalDiff_Op_var<dxhelm_FE_variable> >
00633 Diag_DX_FE_var(Variable a);
00634 
00635 // DY
00636 DExpr<DiagonalDiff_Op_var<dyhelm_FE_variable> >
00637 Diag_DY_FE_var(Variable a);
00638 
00639 // DZ
00640 DExpr<DiagonalDiff_Op_var<dzhelm_FE_variable> >
00641 Diag_DZ_FE_var(Variable a);
00642 
00643 // DX
00644 DExpr<DiagonalDiff_Op_var<helmdx_FE_variable> >
00645 Diag_DX_FE_var_t(Variable a);
00646 
00647 // DY
00648 DExpr<DiagonalDiff_Op_var<helmdy_FE_variable> >
00649 Diag_DY_FE_var_t(Variable a);
00650 
00651 // DZ
00652 DExpr<DiagonalDiff_Op_var<helmdz_FE_variable> >
00653 Diag_DZ_FE_var_t(Variable a);
00654 
00655 
00657 // Rand-operatoren
00659 
00660 DExpr<DiagonalDiff_Op_var<L2boundary_variable> >
00661 Diag_Int_boundary_var(Variable a);
00662 
00663 
00664 
00665 
00666 
00667 
00668 
00669 #endif
00670          

Generated on Fri Nov 2 01:25:57 2007 for IPPL by doxygen 1.3.5