Shearing sheet boundary conditions at ix1 and ox1 for both 2D and 3D. More...
Go to the source code of this file.
Classes | |
struct | Remap |
Define structure which holds variables remapped by shearing sheet BCs. More... | |
struct | FConsS |
Define structure for variables used in FARGO algorithm. More... | |
Enumerations | |
enum | { NREMAP = 4, NFARGO = 4 } |
enum | { NREMAP = 4, NFARGO = 4 } |
enum | { NREMAP = 4, NFARGO = 4 } |
enum | { NREMAP = 4, NFARGO = 4 } |
Functions | |
void | RemapFlux (const Real *U, const Real eps, const int ji, const int jo, Real *F) |
void | ShearingSheet_ix1 (DomainS *pD) |
3D shearing-sheet BCs in x1. | |
void | ShearingSheet_ox1 (DomainS *pD) |
3D shearing-sheet BCs in x1. | |
void | RemapEy_ix1 (DomainS *pD, Real ***emfy, Real **tEy) |
Remaps Ey at [is] due to background shear, and then averages remapped and original field. | |
void | RemapEy_ox1 (DomainS *pD, Real ***emfy, Real **tEy) |
Remaps Ey at [ie+1] due to background shear, and then averages remapped and original field. | |
Variables | |
static Remap *** | GhstZns = NULL |
static Remap *** | GhstZnsBuf = NULL |
static Real * | U = NULL |
static Real * | Flx = NULL |
static Real ** | tEyBuf = NULL |
static Real * | Uhalf = NULL |
static double * | send_buf = NULL |
static double * | recv_buf = NULL |
int | nfghost |
static FConsS *** | FargoVars = NULL |
static FConsS *** | FargoFlx = NULL |
Shearing sheet boundary conditions at ix1 and ox1 for both 2D and 3D.
PURPOSE: Shearing sheet boundary conditions at ix1 and ox1 for both 2D and 3D Called by bvals_mhd. Decomposition of the Domain into MPI grids in X,Y and/or Z is allowed. The RemapEy() function (which applies the shearing sheet boundary conditions to the y-component of the EMF to keep <Bz>=const) is called directly by the 3D integrator. Configure code with --enable-shearing-box to use.
FARGO (orbital advection) algorithm is implemented in the Fargo() function called in the main loop directly after the integrator and before bvals_mhd. Code must be configured with --enable-shearing-box --enable-fargo to use this option.
CONTAINS PUBLIC FUNCTIONS:
PRIVATE FUNCTION PROTOTYPES:
Definition in file bvals_shear.c.
anonymous enum |
Definition at line 47 of file bvals_shear.c.
anonymous enum |
Definition at line 50 of file bvals_shear.c.
anonymous enum |
Definition at line 54 of file bvals_shear.c.
anonymous enum |
Definition at line 57 of file bvals_shear.c.
Remaps Ey at [is] due to background shear, and then averages remapped and original field.
This guarantees the sums of Ey along the x1 boundaries at [is] and [ie+1] are identical -- thus net Bz is conserved
This is a public function which is called by integrator (inside a SHEARING_BOX macro).
Definition at line 1318 of file bvals_shear.c.
References DomainS::Comm_Domain, GridS::dx2, Flx, DomainS::GData, get_myGridIndex(), DomainS::Grid, GridsDataS::ID_Comm_Domain, GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, Lx, GridS::lx1_id, GridS::lx2_id, Ly, my_iproc, my_jproc, my_kproc, myID_Comm_world, DomainS::NGrid, GridS::Nx, Omega_0, qshear, recv_buf, RemapFlux(), DomainS::RootMaxX, DomainS::RootMinX, GridS::rx2_id, send_buf, tEyBuf, GridS::time, xmax, and xmin.
Referenced by integrate_3d_ctu().
Remaps Ey at [ie+1] due to background shear, and then averages remapped and original field.
This guarantees the sums of Ey along the x1 boundaries at [is] and [ie+1] are identical -- thus net Bz is conserved
This is a public function which is called by integrator (inside a SHEARING_BOX macro).
Definition at line 1647 of file bvals_shear.c.
References DomainS::Comm_Domain, GridS::dx2, Flx, DomainS::GData, get_myGridIndex(), DomainS::Grid, GridsDataS::ID_Comm_Domain, GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, Lx, GridS::lx2_id, Ly, my_iproc, my_jproc, my_kproc, myID_Comm_world, DomainS::NGrid, GridS::Nx, Omega_0, qshear, recv_buf, RemapFlux(), DomainS::RootMaxX, DomainS::RootMinX, GridS::rx1_id, GridS::rx2_id, send_buf, tEyBuf, GridS::time, xmax, and xmin.
Referenced by integrate_3d_ctu().
third order reconstruction for conservative remap using Colella & Sekora extremum preserving algorithm (PPME)
Referenced by Fargo(), RemapEy_ix1(), RemapEy_ox1(), ShearingSheet_ix1(), and ShearingSheet_ox1().
void ShearingSheet_ix1 | ( | DomainS * | pD | ) |
3D shearing-sheet BCs in x1.
It applies a remap in Y after the ghost cells have been set by the usual periodic BCs in X and Y implemented in bvals_mhd.c
This is a public function which is called by bvals_mhd() inside a SHEARING_BOX macro.
Definition at line 130 of file bvals_shear.c.
References ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, DomainS::Comm_Domain, ConsS::d, GridS::dx2, ConsS::E, Flx, DomainS::GData, get_myGridIndex(), GhstZnsBuf, DomainS::Grid, GridsDataS::ID_Comm_Domain, GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, ku, Lx, GridS::lx2_id, Ly, ConsS::M1, ConsS::M2, ConsS::M3, my_iproc, my_jproc, my_kproc, myID_Comm_world, n, DomainS::NGrid, NREMAP, GridS::Nx, Omega_0, qshear, recv_buf, RemapFlux(), DomainS::RootMaxX, DomainS::RootMinX, GridS::rx2_id, Remap::s, ConsS::s, s, send_buf, ShBoxCoord, GridS::time, U, GridS::U, Remap::U, xmax, and xmin.
Referenced by bvals_mhd().
void ShearingSheet_ox1 | ( | DomainS * | pD | ) |
3D shearing-sheet BCs in x1.
It applies a remap in Y after the ghost cells have been set by the usual periodic BCs in X and Y implemented in bvals_mhd.c
This is a public function which is called by bvals_mhd() inside a SHEARING_BOX macro.
Definition at line 724 of file bvals_shear.c.
References ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, DomainS::Comm_Domain, ConsS::d, GridS::dx2, ConsS::E, Flx, DomainS::GData, get_myGridIndex(), GhstZnsBuf, DomainS::Grid, GridsDataS::ID_Comm_Domain, GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, ku, Lx, GridS::lx2_id, Ly, ConsS::M1, ConsS::M2, ConsS::M3, my_iproc, my_jproc, my_kproc, myID_Comm_world, n, DomainS::NGrid, NREMAP, GridS::Nx, Omega_0, qshear, recv_buf, RemapFlux(), DomainS::RootMaxX, DomainS::RootMinX, GridS::rx2_id, Remap::s, ConsS::s, s, send_buf, ShBoxCoord, GridS::time, U, GridS::U, Remap::U, xmax, and xmin.
Referenced by bvals_mhd().
Definition at line 105 of file bvals_shear.c.
Referenced by Fargo().
Definition at line 105 of file bvals_shear.c.
Definition at line 90 of file bvals_shear.c.
Referenced by Fargo(), RemapEy_ix1(), RemapEy_ox1(), ShearingSheet_ix1(), and ShearingSheet_ox1().
Definition at line 88 of file bvals_shear.c.
Remap *** GhstZnsBuf = NULL [static] |
Definition at line 88 of file bvals_shear.c.
Referenced by Fargo(), ShearingSheet_ix1(), and ShearingSheet_ox1().
int nfghost |
Definition at line 104 of file bvals_shear.c.
Referenced by Fargo().
double * recv_buf = NULL [static] |
Definition at line 101 of file bvals_shear.c.
Referenced by Fargo(), RemapEy_ix1(), RemapEy_ox1(), ShearingSheet_ix1(), and ShearingSheet_ox1().
double* send_buf = NULL [static] |
Definition at line 101 of file bvals_shear.c.
Referenced by Fargo(), RemapEy_ix1(), RemapEy_ox1(), ShearingSheet_ix1(), and ShearingSheet_ox1().
Definition at line 93 of file bvals_shear.c.
Referenced by Fargo(), RemapEy_ix1(), and RemapEy_ox1().
Definition at line 90 of file bvals_shear.c.
Referenced by check_Prim(), Cons_to_Prim(), entropy_fix(), Fargo(), fix_vsq(), integrate_1d_vl(), Prim_to_Cons(), problem(), ShearingSheet_ix1(), and ShearingSheet_ox1().
Definition at line 97 of file bvals_shear.c.
Referenced by Fargo().