00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef EXTRA_H_
00024 #define EXTRA_H_
00025
00026
00027 class DVar_Extra_Op {
00028 private:
00029 Variable v_;
00030 double Give_at_Index(const Index3D I, const Grid* grid) const;
00031
00032 public:
00033 DVar_Extra_Op(const Variable& v) : v_(v) {};
00034 double Give_interior(const P_interior* it_i,const Grid* gr, double h_mesh,
00035 int l, double_stencils_in) const {
00036 return v_.Give_interior(it_i,gr,h_mesh,l, double_stencils_out);
00037 }
00038 double Give_interior_coarse(const P_interior* it_i,const Grid* gr,
00039 double h_mesh,
00040 int l, double_stencils_in) const {
00041 return v_.Give_interior_coarse(it_i,gr,h_mesh,l,double_stencils_out);
00042 }
00043 double Give_nearb(const P_nearb* it_n,const Grid* gr, double h_mesh, int l,
00044 const Nearb_Ablage* nearb_ablage)
00045 const {
00046 return Give_at_Index(it_n->Ind(),gr);
00047 };
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 double Give_Bo2p(const P_Bo2p* it_b,const Grid* gr, int l) const {
00109 Index3D In, Inn;
00110 dir_3D dd;
00111 double un, unn, h_mesh, h_d;
00112 Pointtype Ptypnn;
00113
00114 In = it_b->Ind();
00115 dd = it_b->d();
00116 if(dd==Wdir) { Inn = In.next_E(l); }
00117 if(dd==Edir) { Inn = In.next_W(l); }
00118
00119 if(dd==Ndir) { Inn = In.next_S(l); }
00120 if(dd==Sdir) { Inn = In.next_N(l); }
00121
00122 if(dd==Tdir) { Inn = In.next_D(l); }
00123 if(dd==Ddir) { Inn = In.next_T(l); }
00124
00125 if(gr->Point_in_domain(Inn)) {
00126 Ptypnn = gr->Give_type(Inn);
00127 if(Ptypnn >= interior) {
00128 un = Give_at_Index(In,gr);
00129 if(interior == Ptypnn || uniform <= Ptypnn)
00130 unn = gr->Give_variable(Inn,l)[v_.Number_variable()];
00131 else
00132 unn = Give_at_Index(Inn,gr);
00133
00134 h_mesh = gr->H_mesh() / Zweipotenz(gr->Max_level());
00135 h_d = gr->Give_h(In,dd);
00136
00137 return ((un - unn) / h_mesh) * h_d + un;
00138 }
00139 }
00140
00141 return v_.Give_Bo2p(it_b,gr,l);
00142 };
00143 double Give_cellpoi(const P_cellpoi* it_cf,const Grid* gr,
00144 const BoCeData* bocedata) const {
00145 return v_.Give_cellpoi(it_cf,gr,bocedata);
00146 };
00147
00148
00149 int Sice_stencil() const { return 1; }
00150
00151
00152 int Level() const {
00153 return v_.Give_grid()->Max_level();
00154 }
00155 Dominace_label Dominant_lev() const { return yes_dominant; }
00156 Dominace_label Dominant_poi() const { return yes_dominant; }
00157 bool run_interior() const { return v_.run_interior(); }
00158 bool run_nearb() const { return v_.run_nearb(); }
00159 int run_boundary() const { return v_.run_boundary(); }
00160
00161
00162 int ops_interior() const { return 0; }
00163
00164
00165 void Active_Sim_Level( int lev) const { }
00166 void Active_Sim_interior(bool run) const { }
00167 void Active_Sim_nearb(bool run) const { }
00168 void Active_Sim_boundary( int run) const { }
00169 void Active_Sim_update(Evaluation_Parallelization_object* evpar,
00170 int level, type_of_update typ) const { };
00171
00172
00173 void Put_grid_rbo(Grid* gr, int r_bo) const { }
00174
00175
00176
00177
00178 Differential_op_typ Abstract_differential_operator() const {
00179 return not_abstract;
00180 }
00181
00182 int Give_number_var_of_abstract_op() const { return 0; }
00183
00184
00185 void Add_variables_for_parallel(Evaluation_Parallelization_object *evpar)
00186 const {
00187 evpar->Variable_contained_in_expression(v_.Number_variable());
00188 }
00189 bool GS_type(int var_number_left, int dim) const {
00190 return false;
00191 };
00192
00193
00194 void clean() const { };
00195 };
00196
00197
00198
00199 DExpr<DVar_Extra_Op>
00200 Extrapolate_near_boundary(Variable a);
00201
00202
00203 #endif
00204
00205