Functions to handle static mesh refinement (SMR). More...
Go to the source code of this file.
Functions | |
void | ProCon (const ConsS Uim1, const ConsS Ui, const ConsS Uip1, const ConsS Ujm1, const ConsS Ujp1, const ConsS Ukm1, const ConsS Ukp1, ConsS PCon[][2][2]) |
Prolongates conserved variables in a 2x2x2 cube. | |
void | ProFld (Real3Vect BGZ[][3][3], Real3Vect PFld[][3][3], const Real dx1c, const Real dx2c, const Real dx3c) |
Uses the divergence-preserving prolongation operators of Toth & Roe (JCP, 180, 736, 2002) to interpolate the face centered fields in a 3x2x2 block for Bx, 2x3x2 block for By, and 2x2x3 block for Bz. | |
static Real | mcd_slope (const Real vl, const Real vc, const Real vr) |
Computes monotonized linear slope. | |
void | RestrictCorrect (MeshS *pM) |
Restricts (averages) fine Grid solution to coarse, and corrects cells at fine/coarse boundaries using restricted fine Grid fluxes. | |
void | Prolongate (MeshS *pM) |
Sets BC on fine Grid by prolongation (interpolation) of coarse Grid solution into fine grid ghost zones. | |
void | SMR_init (MeshS *pM) |
Allocates memory for send/receive buffers. | |
Variables | |
static double ** | send_bufP = NULL |
static double ** | send_bufRC = NULL |
static double *** | recv_bufP = NULL |
static double *** | recv_bufRC = NULL |
static MPI_Request *** | recv_rq = NULL |
static MPI_Request ** | send_rq = NULL |
static int | maxND |
static int * | start_addrP |
static ConsS *** | GZ [3] |
Real ** | SMRemf1 |
Real ** | SMRemf2 |
Real ** | SMRemf3 |
Real3Vect *** | BFld [3] |
Functions to handle static mesh refinement (SMR).
PURPOSE: Functions to handle static mesh refinement (SMR).
REFERENCES:
CONTAINS PUBLIC FUNCTIONS:
PRIVATE FUNCTION PROTOTYPES:
Definition in file smr.c.
void ProCon | ( | const ConsS | Uim1, | |
const ConsS | Ui, | |||
const ConsS | Uip1, | |||
const ConsS | Ujm1, | |||
const ConsS | Ujp1, | |||
const ConsS | Ukm1, | |||
const ConsS | Ukp1, | |||
ConsS | PCon[][2][2] | |||
) |
Prolongates conserved variables in a 2x2x2 cube.
Definition at line 1918 of file smr.c.
References ConsS::B1c, ConsS::B2c, ConsS::B3c, check_Prim(), PrimS::d, d(), ConsS::d, ConsS::E, ConsS::M1, M2(), ConsS::M2, ConsS::M3, mcd_slope(), n, PrimS::P, ConsS::s, s, PrimS::V1, PrimS::V2, PrimS::V3, and W.
Referenced by Prolongate().
void ProFld | ( | Real3Vect | BGZ[][3][3], | |
Real3Vect | PFld[][3][3], | |||
const Real | dx1c, | |||
const Real | dx2c, | |||
const Real | dx3c | |||
) |
Uses the divergence-preserving prolongation operators of Toth & Roe (JCP, 180, 736, 2002) to interpolate the face centered fields in a 3x2x2 block for Bx, 2x3x2 block for By, and 2x2x3 block for Bz.
Definition at line 2186 of file smr.c.
References mcd_slope(), Real3Vect::x, Real3Vect::y, and Real3Vect::z.
Referenced by Prolongate().
void Prolongate | ( | MeshS * | pM | ) |
Sets BC on fine Grid by prolongation (interpolation) of coarse Grid solution into fine grid ghost zones.
Definition at line 1227 of file smr.c.
References ath_error(), ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, GridS::CGrid, DomainS::Comm_Children, DomainS::Comm_Parent, ConsS::d, dim, MeshS::Domain, MeshS::DomainsPerLevel, GridOvrlpS::DomN, GridS::dx1, GridS::dx2, GridS::dx3, ConsS::E, DomainS::Grid, GridOvrlpS::ID, GridOvrlpS::ijke, GridOvrlpS::ijks, ConsS::M1, ConsS::M2, ConsS::M3, maxND, GridOvrlpS::myFlx, n, GridS::NCGrid, MeshS::NLevels, GridS::NmyCGrid, GridS::NmyPGrid, GridS::NPGrid, GridOvrlpS::nWordsP, GridS::Nx, MeshS::Nx, GridS::PGrid, ProCon(), ProFld(), recv_bufP, recv_rq, ConsS::s, send_bufP, send_rq, start_addrP, GridS::U, Real3Vect::x, Real3Vect::y, and Real3Vect::z.
Referenced by main().
void RestrictCorrect | ( | MeshS * | pM | ) |
Restricts (averages) fine Grid solution to coarse, and corrects cells at fine/coarse boundaries using restricted fine Grid fluxes.
Definition at line 77 of file smr.c.
References ath_error(), ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, GridS::CGrid, DomainS::Comm_Children, DomainS::Comm_Parent, ConsS::d, dim, MeshS::Domain, MeshS::DomainsPerLevel, GridOvrlpS::DomN, GridS::dt, GridS::dx1, GridS::dx2, GridS::dx3, ConsS::E, DomainS::Grid, GridOvrlpS::ID, GridS::ie, GridOvrlpS::ijke, GridOvrlpS::ijks, GridS::je, kb, GridS::ke, ConsS::M1, ConsS::M2, ConsS::M3, GridOvrlpS::myEMF1, GridOvrlpS::myEMF2, GridOvrlpS::myEMF3, GridOvrlpS::myFlx, n, GridS::NCGrid, MeshS::NLevels, GridS::NmyCGrid, GridS::NmyPGrid, GridS::NPGrid, GridOvrlpS::nWordsRC, GridS::Nx, MeshS::Nx, GridS::PGrid, recv_bufRC, recv_rq, ConsS::s, send_bufRC, send_rq, SMRemf1, SMRemf2, SMRemf3, and GridS::U.
Referenced by main().
void SMR_init | ( | MeshS * | pM | ) |
Allocates memory for send/receive buffers.
Definition at line 1799 of file smr.c.
References ath_error(), calloc_1d_array(), calloc_2d_array(), calloc_3d_array(), GridS::CGrid, MeshS::Domain, MeshS::DomainsPerLevel, DomainS::Grid, maxND, GridS::NCGrid, MeshS::NLevels, GridS::NPGrid, GridOvrlpS::nWordsP, GridOvrlpS::nWordsRC, GridS::Nx, GridS::PGrid, recv_bufP, recv_bufRC, recv_rq, send_bufP, send_bufRC, send_rq, SMRemf1, SMRemf2, SMRemf3, and start_addrP.
Referenced by main().
int maxND [static] |
Definition at line 44 of file smr.c.
Referenced by Prolongate(), and SMR_init().
double*** recv_bufP = NULL [static] |
Definition at line 38 of file smr.c.
Referenced by Prolongate(), and SMR_init().
double*** recv_bufRC = NULL [static] |
Definition at line 40 of file smr.c.
Referenced by RestrictCorrect(), and SMR_init().
MPI_Request*** recv_rq = NULL [static] |
Definition at line 41 of file smr.c.
Referenced by Prolongate(), RestrictCorrect(), and SMR_init().
double** send_bufP = NULL [static] |
Definition at line 36 of file smr.c.
Referenced by Prolongate(), and SMR_init().
double** send_bufRC = NULL [static] |
Definition at line 37 of file smr.c.
Referenced by RestrictCorrect(), and SMR_init().
MPI_Request** send_rq = NULL [static] |
Definition at line 42 of file smr.c.
Referenced by Prolongate(), RestrictCorrect(), and SMR_init().
Definition at line 48 of file smr.c.
Referenced by RestrictCorrect(), and SMR_init().
Definition at line 48 of file smr.c.
Referenced by RestrictCorrect(), and SMR_init().
Definition at line 48 of file smr.c.
Referenced by RestrictCorrect(), and SMR_init().
int * start_addrP [static] |
Definition at line 44 of file smr.c.
Referenced by Prolongate(), and SMR_init().