Functions to compute (x1,x2,x3) positions of cells i,j,k. More...
Go to the source code of this file.
Functions | |
void | cc_pos (const GridS *pG, const int i, const int j, const int k, Real *px1, Real *px2, Real *px3) |
given i,j,k returns cell-centered x1,x2,x3 | |
void | fc_pos (const GridS *pG, const int i, const int j, const int k, Real *px1, Real *px2, Real *px3) |
given i,j,k returns face-centered x1,x2,x3 | |
Real | x1vc (const GridS *pG, const int i) |
int | celli (const GridS *pGrid, const Real x, const Real dx1_1, int *i, Real *a) |
given x, returns containing cell first index. | |
Real | x1cc (const Grid *pGrid, const int i) |
given i, returns cell-centered x1. | |
int | cellj (const Grid *pGrid, const Real y, const Real dx2_1, int *j, Real *b) |
given y, returns containing cell first index. | |
Real | x2cc (const Grid *pGrid, const int j) |
given j, returns cell-centered x2. | |
int | cellk (const Grid *pGrid, const Real z, const Real dx3_1, int *k, Real *c) |
given z, returns containing cell first index. | |
Real | x3cc (const Grid *pGrid, const int k) |
given k, returns cell-centered x3. |
Functions to compute (x1,x2,x3) positions of cells i,j,k.
PURPOSE: Functions to compute (x1,x2,x3) positions of cells i,j,k. In a nested grid, each Grid structure is a patch in a larger computational domain (with the exception of the level0 grid). The displacement of the origin of the Grid from the origin of the computational domain (level0 grid) is x1_{disp} = idisp*dx1. Furthermore, the origin of the level0 grid can be displaced by a distance x1_{0} from the origin of x1. Thus, the x1 position of the center of cell i (x1_{cc,i}) in any level Grid is x1_{cc,i} = x1_{0} + ((i + idisp) + 0.5)*dx1 Similarly for x2 and x3.
CONTAINS PUBLIC FUNCTIONS:
Definition in file cc_pos.c.
void cc_pos | ( | const GridS * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k, | |||
Real * | px1, | |||
Real * | px2, | |||
Real * | px3 | |||
) |
given i,j,k returns cell-centered x1,x2,x3
Definition at line 36 of file cc_pos.c.
References GridS::dx1, GridS::dx2, GridS::dx3, GridS::is, GridS::js, GridS::ks, and GridS::MinX.
Referenced by avg1d(), avg2d(), avg3d(), avgXZ(), compute_div_b(), compute_l1_error(), constant_iib(), constant_oib(), cylbr_ix1(), cylbr_ox1(), disk_ir(), disk_or(), dmrbv_ijb(), dmrbv_ojb(), dump_binary(), dump_history(), dump_tab_cons(), dump_tab_prim(), dump_vtksub(), expr_beta(), expr_dV2(), expr_dV3(), expr_dV3par(), expr_dVx(), expr_dVxpar(), expr_dVy(), expr_dVypar(), expr_KE(), expr_ME(), expr_rhodif(), expr_rhopardif(), Fargo(), hst_dBy(), hst_dEw2(), hst_E_total(), hst_rho_dVy2(), hst_rho_Vx_dVy(), integrate_1d_ctu(), integrate_1d_vl(), integrate_2d_ctu(), integrate_2d_vl(), integrate_3d_ctu(), integrate_3d_vl(), jet_iib(), MdotR1(), MdotR2(), MdotR3(), MdotR4(), new_dt(), noh3d_oib(), noh3d_ojb(), noh3d_okb(), outflow_ix1(), outflow_ix3(), outflow_ox1(), outflow_ox2(), outflow_ox3(), problem(), selfg_multig_3d(), Userwork_after_loop(), Userwork_in_loop(), vecpot2b1i(), vecpot2b2i(), vecpot2b3i(), viscosity(), and Volume().
given x, returns containing cell first index.
Definition at line 86 of file cc_pos.c.
Referenced by getwei_linear(), getwei_QP(), and getwei_TSC().
given y, returns containing cell first index.
Definition at line 104 of file cc_pos.c.
Referenced by getwei_linear(), getwei_QP(), getwei_TSC(), and problem().
given z, returns containing cell first index.
Definition at line 122 of file cc_pos.c.
Referenced by getwei_linear(), getwei_QP(), getwei_TSC(), and problem().
void fc_pos | ( | const GridS * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k, | |||
Real * | px1, | |||
Real * | px2, | |||
Real * | px3 | |||
) |
given i,j,k returns face-centered x1,x2,x3
Definition at line 51 of file cc_pos.c.
References GridS::dx1, GridS::dx2, GridS::dx3, GridS::is, GridS::js, GridS::ks, and GridS::MinX.
Referenced by OutData1(), and OutData2().
Real x1cc | ( | const Grid * | pGrid, | |
const int | i | |||
) |
Definition at line 61 of file cc_pos.c.
References GridS::dx1, GridS::is, GridS::MinX, and x1cc().
Referenced by Bpsub(), Bzsub(), integrate_1d_ctu(), integrate_2d_ctu(), integrate_3d_ctu(), Mrpsub(), Msub(), Pbsub(), and problem().
Real x2cc | ( | const Grid * | pGrid, | |
const int | j | |||
) |