Sets boundary conditions (quantities in ghost zones) for the gravitational potential on each edge of a Grid. More...
Go to the source code of this file.
Functions | |
static void | reflect_Phi_ix1 (GridS *pG) |
REFLECTING boundary conditions, Inner x1 boundary (ibc_x1=1). | |
static void | reflect_Phi_ox1 (GridS *pG) |
REFLECTING boundary conditions, Outer x1 boundary (obc_x1=1). | |
static void | reflect_Phi_ix2 (GridS *pG) |
REFLECTING boundary conditions, Inner x2 boundary (ibc_x2=1). | |
static void | reflect_Phi_ox2 (GridS *pG) |
REFLECTING boundary conditions, Outer x2 boundary (obc_x2=1). | |
static void | reflect_Phi_ix3 (GridS *pG) |
REFLECTING boundary conditions, Inner x3 boundary (ibc_x3=1). | |
static void | reflect_Phi_ox3 (GridS *pG) |
REFLECTING boundary conditions, Outer x3 boundary (obc_x3=1). | |
static void | periodic_Phi_ix1 (GridS *pG) |
PERIODIC boundary conditions, Inner x1 boundary (ibc_x1=4). | |
static void | periodic_Phi_ox1 (GridS *pG) |
PERIODIC boundary conditions (cont), Outer x1 boundary (obc_x1=4). | |
static void | periodic_Phi_ix2 (GridS *pG) |
PERIODIC boundary conditions (cont), Inner x2 boundary (ibc_x2=4). | |
static void | periodic_Phi_ox2 (GridS *pG) |
PERIODIC boundary conditions (cont), Outer x2 boundary (obc_x2=4). | |
static void | periodic_Phi_ix3 (GridS *pG) |
PERIODIC boundary conditions (cont), Inner x3 boundary (ibc_x3=4). | |
static void | periodic_Phi_ox3 (GridS *pG) |
PERIODIC boundary conditions (cont), Outer x3 boundary (obc_x3=4). | |
static void | ProlongateLater (GridS *pG) |
PROLONGATION boundary conditions. | |
static void | pack_Phi_ix1 (GridS *pG) |
PACK boundary conditions for MPI_Isend, Inner x1 boundary. | |
static void | pack_Phi_ox1 (GridS *pG) |
PACK boundary conditions for MPI_Isend, Outer x1 boundary. | |
static void | pack_Phi_ix2 (GridS *pG) |
PACK boundary conditions for MPI_Isend, Inner x2 boundary. | |
static void | pack_Phi_ox2 (GridS *pG) |
PACK boundary conditions for MPI_Isend, Outer x2 boundary. | |
static void | pack_Phi_ix3 (GridS *pG) |
PACK boundary conditions for MPI_Isend, Inner x3 boundary. | |
static void | pack_Phi_ox3 (GridS *pG) |
PACK boundary conditions for MPI_Isend, Outer x3 boundary. | |
static void | unpack_Phi_ix1 (GridS *pG) |
UNPACK boundary conditions after MPI_Irecv, Inner x1 boundary. | |
static void | unpack_Phi_ox1 (GridS *pG) |
UNPACK boundary conditions after MPI_Irecv, Outer x1 boundary. | |
static void | unpack_Phi_ix2 (GridS *pG) |
UNPACK boundary conditions after MPI_Irecv, Inner x2 boundary. | |
static void | unpack_Phi_ox2 (GridS *pG) |
UNPACK boundary conditions after MPI_Irecv, Outer x2 boundary. | |
static void | unpack_Phi_ix3 (GridS *pG) |
UNPACK boundary conditions after MPI_Irecv, Inner x3 boundary. | |
static void | unpack_Phi_ox3 (GridS *pG) |
UNPACK boundary conditions after MPI_Irecv, Outer x3 boundary. | |
void | bvals_grav (DomainS *pD) |
Calls appropriate functions to set ghost zones. | |
void | bvals_grav_init (MeshS *pM) |
Sets function pointers for physical boundaries during initialization, allocates memory for send/receive buffers with MPI. | |
void | bvals_grav_fun (DomainS *pD, enum BCDirection dir, VGFun_t prob_bc) |
Sets function pointers for user-defined BCs in problem. | |
Variables | |
static double ** | send_buf = NULL |
static double ** | recv_buf = NULL |
static MPI_Request * | recv_rq |
static MPI_Request * | send_rq |
static VGFun_t | ix1_GBCFun = NULL |
static VGFun_t | ox1_GBCFun = NULL |
static VGFun_t | ix2_GBCFun = NULL |
static VGFun_t | ox2_GBCFun = NULL |
static VGFun_t | ix3_GBCFun = NULL |
static VGFun_t | ox3_GBCFun = NULL |
Sets boundary conditions (quantities in ghost zones) for the gravitational potential on each edge of a Grid.
PURPOSE: Sets boundary conditions (quantities in ghost zones) for the gravitational potential on each edge of a Grid. See comments at start of bvals_mhd.c for more details. The only BC functions implemented here are for:
CONTAINS PUBLIC FUNCTIONS:
Definition in file bvals_grav.c.
void bvals_grav | ( | DomainS * | pD | ) |
Calls appropriate functions to set ghost zones.
The function pointers (*_GBCFun) are set during initialization by bvals_grav_init() to be one of the functions corresponding to reflecting or periodic. If the left- or right-Grid ID numbers are >= 1 (neighboring grids exist), then MPI calls are used.
Order for updating boundary conditions must always be x1-x2-x3 in order to fill the corner cells properly
Definition at line 95 of file bvals_grav.c.
References ath_2d_fft_plan::cnt, DomainS::Comm_Domain, get_myGridIndex(), DomainS::Grid, ix1_GBCFun, ix2_GBCFun, ix3_GBCFun, GridS::lx1_id, GridS::lx2_id, GridS::lx3_id, my_iproc, myID_Comm_world, GridS::Nx, ox1_GBCFun, ox2_GBCFun, ox3_GBCFun, pack_ix1(), pack_ix2(), pack_ix3(), pack_ox1(), pack_ox2(), pack_ox3(), recv_buf, recv_rq, GridS::rx1_id, GridS::rx2_id, GridS::rx3_id, send_buf, send_rq, unpack_ix1(), unpack_ix2(), unpack_ix3(), unpack_ox1(), unpack_ox2(), and unpack_ox3().
Referenced by main().
void bvals_grav_fun | ( | DomainS * | pD, | |
enum BCDirection | dir, | |||
VGFun_t | prob_bc | |||
) |
Sets function pointers for user-defined BCs in problem.
Definition at line 774 of file bvals_grav.c.
References ath_perr(), ix1_GBCFun, ix2_GBCFun, ix3_GBCFun, left_x1, left_x2, left_x3, ox1_GBCFun, ox2_GBCFun, ox3_GBCFun, right_x1, right_x2, and right_x3.
void bvals_grav_init | ( | MeshS * | pM | ) |
Sets function pointers for physical boundaries during initialization, allocates memory for send/receive buffers with MPI.
Definition at line 418 of file bvals_grav.c.
References ath_error(), MeshS::BCFlag_ix1, MeshS::BCFlag_ix2, MeshS::BCFlag_ix3, MeshS::BCFlag_ox1, MeshS::BCFlag_ox2, MeshS::BCFlag_ox3, calloc_1d_array(), calloc_2d_array(), DomainS::Disp, MeshS::Domain, MeshS::DomainsPerLevel, DomainS::GData, get_myGridIndex(), DomainS::Grid, GridsDataS::ID_Comm_Domain, DomainS::ix1_BCFun, ix1_GBCFun, DomainS::ix2_BCFun, ix2_GBCFun, DomainS::ix3_BCFun, ix3_GBCFun, GridS::lx1_id, GridS::lx2_id, GridS::lx3_id, myID_Comm_world, n, DomainS::NGrid, MeshS::NLevels, GridsDataS::Nx, MeshS::Nx, DomainS::Nx, GridS::Nx, DomainS::ox1_BCFun, ox1_GBCFun, DomainS::ox2_BCFun, ox2_GBCFun, DomainS::ox3_BCFun, ox3_GBCFun, recv_buf, recv_rq, GridS::rx1_id, GridS::rx2_id, GridS::rx3_id, send_buf, and send_rq.
Referenced by main().
static void pack_Phi_ix1 | ( | GridS * | pG | ) | [static] |
PACK boundary conditions for MPI_Isend, Inner x1 boundary.
Definition at line 1104 of file bvals_grav.c.
References GridS::Phi, and send_buf.
static void pack_Phi_ix2 | ( | GridS * | pG | ) | [static] |
PACK boundary conditions for MPI_Isend, Inner x2 boundary.
Definition at line 1152 of file bvals_grav.c.
References GridS::Phi, and send_buf.
static void pack_Phi_ix3 | ( | GridS * | pG | ) | [static] |
PACK boundary conditions for MPI_Isend, Inner x3 boundary.
Definition at line 1201 of file bvals_grav.c.
References ath_2d_fft_plan::cnt, GridS::lx3_id, GridS::Phi, and send_buf.
static void pack_Phi_ox1 | ( | GridS * | pG | ) | [static] |
PACK boundary conditions for MPI_Isend, Outer x1 boundary.
Definition at line 1128 of file bvals_grav.c.
References GridS::Phi, and send_buf.
static void pack_Phi_ox2 | ( | GridS * | pG | ) | [static] |
PACK boundary conditions for MPI_Isend, Outer x2 boundary.
Definition at line 1176 of file bvals_grav.c.
References GridS::Phi, and send_buf.
static void pack_Phi_ox3 | ( | GridS * | pG | ) | [static] |
PACK boundary conditions for MPI_Isend, Outer x3 boundary.
Definition at line 1231 of file bvals_grav.c.
References GridS::Phi, and send_buf.
static void periodic_Phi_ix1 | ( | GridS * | pG | ) | [static] |
PERIODIC boundary conditions, Inner x1 boundary (ibc_x1=4).
Definition at line 954 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void periodic_Phi_ix2 | ( | GridS * | pG | ) | [static] |
PERIODIC boundary conditions (cont), Inner x2 boundary (ibc_x2=4).
Definition at line 1000 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void periodic_Phi_ix3 | ( | GridS * | pG | ) | [static] |
PERIODIC boundary conditions (cont), Inner x3 boundary (ibc_x3=4).
Definition at line 1045 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void periodic_Phi_ox1 | ( | GridS * | pG | ) | [static] |
PERIODIC boundary conditions (cont), Outer x1 boundary (obc_x1=4).
Definition at line 977 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void periodic_Phi_ox2 | ( | GridS * | pG | ) | [static] |
PERIODIC boundary conditions (cont), Outer x2 boundary (obc_x2=4).
Definition at line 1022 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void periodic_Phi_ox3 | ( | GridS * | pG | ) | [static] |
PERIODIC boundary conditions (cont), Outer x3 boundary (obc_x3=4).
Definition at line 1068 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void ProlongateLater | ( | GridS * | pGrid | ) | [static] |
PROLONGATION boundary conditions.
Nothing is actually done here, the prolongation is actually handled in ProlongateGhostZones in main loop, so this is just a NoOp Grid function.
Definition at line 1094 of file bvals_grav.c.
static void reflect_Phi_ix1 | ( | GridS * | pG | ) | [static] |
REFLECTING boundary conditions, Inner x1 boundary (ibc_x1=1).
Definition at line 816 of file bvals_grav.c.
References GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void reflect_Phi_ix2 | ( | GridS * | pG | ) | [static] |
REFLECTING boundary conditions, Inner x2 boundary (ibc_x2=1).
Definition at line 862 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void reflect_Phi_ix3 | ( | GridS * | pG | ) | [static] |
REFLECTING boundary conditions, Inner x3 boundary (ibc_x3=1).
Definition at line 908 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ks, and GridS::Phi.
static void reflect_Phi_ox1 | ( | GridS * | pG | ) | [static] |
REFLECTING boundary conditions, Outer x1 boundary (obc_x1=1).
Definition at line 839 of file bvals_grav.c.
References GridS::ie, GridS::je, GridS::js, GridS::ke, GridS::ks, and GridS::Phi.
static void reflect_Phi_ox2 | ( | GridS * | pG | ) | [static] |
REFLECTING boundary conditions, Outer x2 boundary (obc_x2=1).
Definition at line 885 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::ke, GridS::ks, and GridS::Phi.
static void reflect_Phi_ox3 | ( | GridS * | pG | ) | [static] |
REFLECTING boundary conditions, Outer x3 boundary (obc_x3=1).
Definition at line 931 of file bvals_grav.c.
References GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, and GridS::Phi.
static void unpack_Phi_ix1 | ( | GridS * | pG | ) | [static] |
UNPACK boundary conditions after MPI_Irecv, Inner x1 boundary.
Definition at line 1256 of file bvals_grav.c.
References GridS::Phi, and recv_buf.
static void unpack_Phi_ix2 | ( | GridS * | pG | ) | [static] |
UNPACK boundary conditions after MPI_Irecv, Inner x2 boundary.
Definition at line 1306 of file bvals_grav.c.
References GridS::Phi, and recv_buf.
static void unpack_Phi_ix3 | ( | GridS * | pG | ) | [static] |
UNPACK boundary conditions after MPI_Irecv, Inner x3 boundary.
Definition at line 1356 of file bvals_grav.c.
References GridS::Phi, and recv_buf.
static void unpack_Phi_ox1 | ( | GridS * | pG | ) | [static] |
UNPACK boundary conditions after MPI_Irecv, Outer x1 boundary.
Definition at line 1281 of file bvals_grav.c.
References GridS::Phi, and recv_buf.
static void unpack_Phi_ox2 | ( | GridS * | pG | ) | [static] |
UNPACK boundary conditions after MPI_Irecv, Outer x2 boundary.
Definition at line 1331 of file bvals_grav.c.
References GridS::Phi, and recv_buf.
static void unpack_Phi_ox3 | ( | GridS * | pG | ) | [static] |
UNPACK boundary conditions after MPI_Irecv, Outer x3 boundary.
Definition at line 1381 of file bvals_grav.c.
References GridS::Phi, and recv_buf.
VGFun_t ix1_GBCFun = NULL [static] |
Definition at line 36 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_fun(), and bvals_grav_init().
VGFun_t ix2_GBCFun = NULL [static] |
Definition at line 37 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_fun(), and bvals_grav_init().
VGFun_t ix3_GBCFun = NULL [static] |
Definition at line 38 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_fun(), and bvals_grav_init().
VGFun_t ox1_GBCFun = NULL [static] |
Definition at line 36 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_fun(), and bvals_grav_init().
VGFun_t ox2_GBCFun = NULL [static] |
Definition at line 37 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_fun(), and bvals_grav_init().
VGFun_t ox3_GBCFun = NULL [static] |
Definition at line 38 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_fun(), and bvals_grav_init().
double ** recv_buf = NULL [static] |
Definition at line 31 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_init(), unpack_Phi_ix1(), unpack_Phi_ix2(), unpack_Phi_ix3(), unpack_Phi_ox1(), unpack_Phi_ox2(), and unpack_Phi_ox3().
MPI_Request* recv_rq [static] |
Definition at line 32 of file bvals_grav.c.
Referenced by bvals_grav(), and bvals_grav_init().
double** send_buf = NULL [static] |
Definition at line 31 of file bvals_grav.c.
Referenced by bvals_grav(), bvals_grav_init(), pack_Phi_ix1(), pack_Phi_ix2(), pack_Phi_ix3(), pack_Phi_ox1(), pack_Phi_ox2(), and pack_Phi_ox3().
MPI_Request * send_rq [static] |
Definition at line 32 of file bvals_grav.c.
Referenced by bvals_grav(), and bvals_grav_init().