00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #define initialize_nearb false
00019
00020
00021 class P_nearb {
00022 public:
00023 P_nearb(Index3D I, P_nearb* Next) : ind(I), next(Next) {};
00024
00025
00026 void initialize(const Grid* gitter, int level);
00027
00028
00029 double *varM(const Grid* gitter,int level) const;
00030 double *varP_slow(const Grid* gitter,int var_ebene, Ort1D i,Ort1D j,Ort1D k,
00031 int level) const;
00032
00033
00034 double *varN(const Grid* gitter, int level) const;
00035 double *varS(const Grid* gitter, int level) const;
00036 double *varW(const Grid* gitter, int level) const;
00037 double *varE(const Grid* gitter, int level) const;
00038 double *varT(const Grid* gitter, int level) const;
00039 double *varD(const Grid* gitter, int level) const;
00040
00041 double *varND(const Grid* gitter, int level) const;
00042 double *varWN(const Grid* gitter, int level) const;
00043 double *varWT(const Grid* gitter, int level) const;
00044 double *varED(const Grid* gitter, int level) const;
00045 double *varST(const Grid* gitter, int level) const;
00046 double *varES(const Grid* gitter, int level) const;
00047
00048 double *varEST(const Grid* gitter, int level) const;
00049 double *varWND(const Grid* gitter, int level) const;
00050
00051
00052 double *varWD(const Grid* gitter, int level) const;
00053 double *varET(const Grid* gitter, int level) const;
00054
00055
00056 Celltype Give_cell_typ(const Grid* grid, dir_sons i, int l) const;
00057 BoCeData* Give_Bo_cell( const Grid* grid, dir_sons i, int l) const;
00058
00059
00060 D3vector coordinate(const Grid* gitter) const;
00061 double coordinateX(const Grid* gitter) const;
00062 double coordinateY(const Grid* gitter) const;
00063 double coordinateZ(const Grid* gitter) const;
00064
00065
00066 P_nearb* Next() const { return next; };
00067
00068
00069 Index3D Ind() const { return ind; };
00070
00071
00072 void Set_first_mg_coeff_nearb(Point_mg_coeff_nearb* first) {
00073 cout << "Error: mg coefficients are not allowed in listnbi with i<4"
00074 << endl;
00075 }
00076 void Set_first_mg_coeff_bo( Point_mg_coeff_bo* first) {
00077 cout << "Error: mg coefficients are not allowed in listnbi with i<4"
00078 << endl;
00079 }
00080 Point_mg_coeff_nearb* Give_first_mg_coeff_nearb() const {
00081 cout << "Error: mg coefficients are not allowed in listnbi with i<4"
00082 << endl;
00083 return NULL;
00084 }
00085 Point_mg_coeff_bo* Give_first_mg_coeff_bo() const {
00086 cout << "Error: mg coefficients are not allowed in listnbi with i<4"
00087 << endl;
00088 return NULL;
00089 }
00090 private:
00091 Index3D ind;
00092 P_nearb *next;
00093 };
00094
00095
00096 inline void P_nearb::initialize(const Grid* gitter, int level) {
00097
00098 }
00099
00100
00101
00102
00103 inline D3vector P_nearb::coordinate(const Grid* gitter) const {
00104 return gitter->transform_coord(ind);
00105 };
00106 inline double P_nearb::coordinateX(const Grid* gitter) const {
00107 return gitter->transform_coordX(ind);
00108 };
00109 inline double P_nearb::coordinateY(const Grid* gitter) const {
00110 return gitter->transform_coordY(ind);
00111 };
00112 inline double P_nearb::coordinateZ(const Grid* gitter) const {
00113 return gitter->transform_coordZ(ind);
00114 };
00115
00116
00117
00118
00119
00120 inline double *P_nearb::varN(const Grid* gitter, int level)
00121 const {
00122 return gitter->Give_variable(ind.next_NS(Rd,level),level);
00123 };
00124 inline double *P_nearb::varS(const Grid* gitter, int level)
00125 const {
00126 return gitter->Give_variable(ind.next_NS(Ld,level),level);
00127 };
00128 inline double *P_nearb::varE(const Grid* gitter, int level)
00129 const {
00130 return gitter->Give_variable(ind.next_EW(Rd,level),level);
00131 };
00132 inline double *P_nearb::varW(const Grid* gitter, int level)
00133 const {
00134 return gitter->Give_variable(ind.next_EW(Ld,level),level);
00135 };
00136 inline double *P_nearb::varT(const Grid* gitter, int level)
00137 const {
00138 return gitter->Give_variable(ind.next_TD(Rd,level),level);
00139 };
00140 inline double *P_nearb::varD(const Grid* gitter, int level)
00141 const {
00142 return gitter->Give_variable(ind.next_TD(Ld,level),level);
00143 };
00144
00145 inline double *P_nearb::varND(const Grid* gitter, int level)
00146 const {
00147 return gitter->Give_variable(ind.next_NS(Rd,level).next_TD(Ld,level),level);
00148 };
00149 inline double *P_nearb::varWN(const Grid* gitter, int level)
00150 const {
00151 return gitter->Give_variable(ind.next_NS(Rd,level).next_EW(Ld,level),
00152 level);
00153 };
00154 inline double *P_nearb::varWT(const Grid* gitter, int level)
00155 const {
00156 return gitter->Give_variable(ind.next_TD(Rd,level).next_EW(Ld,level),
00157 level);
00158 };
00159 inline double *P_nearb::varED(const Grid* gitter, int level)
00160 const {
00161 return gitter->Give_variable(ind.next_TD(Ld,level).next_EW(Rd,level),
00162 level);
00163 };
00164 inline double *P_nearb::varST(const Grid* gitter, int level)
00165 const {
00166 return gitter->Give_variable(ind.next_TD(Rd,level).next_NS(Ld,level),
00167 level);
00168 };
00169 inline double *P_nearb::varES(const Grid* gitter, int level)
00170 const {
00171 return gitter->Give_variable(ind.next_EW(Rd,level).next_NS(Ld,level),
00172 level);
00173 };
00174
00175 inline double *P_nearb::varEST(const Grid* gitter, int level)
00176 const {
00177 return gitter->Give_variable(
00178 ind.next_EW(Rd,level).next_NS(Ld,level).next_TD(Rd,level),level);
00179 };
00180 inline double *P_nearb::varWND(const Grid* gitter, int level)
00181 const {
00182 return gitter->Give_variable(
00183 ind.next_EW(Ld,level).next_NS(Rd,level).next_TD(Ld,level),level);
00184 };
00185
00186
00187 inline double *P_nearb::varWD(const Grid* gitter, int level)
00188 const {
00189 return gitter->Give_variable(ind.next_WD(level),level);
00190 };
00191 inline double *P_nearb::varET(const Grid* gitter, int level)
00192 const {
00193 return gitter->Give_variable(ind.next_ET(level),level);
00194 };
00195
00197
00198
00199 inline double *P_nearb::varM(const Grid* gitter, int var_ebene) const {
00200 return gitter->Give_variable(ind,var_ebene);
00201 };
00202
00203 inline double *P_nearb::varP_slow(const Grid* gitter,int var_ebene,
00204 Ort1D i, Ort1D j, Ort1D k, int level) const {
00205 return gitter->Give_variable_slow(ind.next(i,j,k,level),var_ebene);
00206 };
00207
00208
00209 inline Celltype P_nearb::Give_cell_typ(const Grid* grid, dir_sons i, int l)
00210 const {
00211 return grid->Give_cell_typ(ind.next((dir_sons)i,l+1));
00212 };
00213 inline BoCeData* P_nearb::Give_Bo_cell(const Grid* grid, dir_sons i, int l)
00214 const {
00215 return grid->Give_Bo_cell(ind.next((dir_sons)i,l+1));
00216 };
00217