Problem generator for plane-parallel, grid-aligned linear wave tests. More...
Go to the source code of this file.
Functions | |
void | problem (DomainS *pDomain) |
Problem initial conditions, edited for each problem. | |
void | problem_write_restart (MeshS *pM, FILE *fp) |
Problem specific subroutine for use with writing restart files, Edited for each problem. | |
void | problem_read_restart (MeshS *pM, FILE *fp) |
Problem specific subroutine for use with reading restart files, Edited for each problem. | |
ConsFun_t | get_usr_expr (const char *expr) |
Sets pointer to expression for special output data. | |
VOutFun_t | get_usr_out_fun (const char *name) |
Returns a user defined output function pointer. | |
void | get_eta_user (GridS *pG, int i, int j, int k, Real *eta_O, Real *eta_H, Real *eta_A) |
void | Userwork_in_loop (MeshS *pM) |
Problem work executed during each step in the main Athena loop, see main.c. | |
void | Userwork_after_loop (MeshS *pM) |
Problem work executed after the main Athena loop, see main.c Edited for each problem. | |
Variables | |
static ConsS *** | RootSoln = NULL |
static int | wave_flag |
Problem generator for plane-parallel, grid-aligned linear wave tests.
PURPOSE: Problem generator for plane-parallel, grid-aligned linear wave tests. If wavevector is in x2 (x3) direction, then the grid must be 2D (3D). Only works for wavevector parallel to grid. Tests in 2D and 3D with wavevector at an arbitrary angle are initialized with different functions (linear_wave2d/3d).
Can be used for either standing (problem/vflow=1.0) or travelling (problem/vflow=0.0) waves.
Configure --with-gravity=fft to check Jeans stability of plane waves propagating parallel to grid.
Configure --enable-resistivity and/or --with-viscosity=ns to check damping of linear waves by resistivity/ambipolar diffusion and/or viscosity
USERWORK_AFTER_LOOP function computes L1 error norm in solution by comparing to initial conditions. Problem must be evolved for an integer number of wave periods for this to work (only works for ideal MHD).
Definition in file linear_wave1d.c.
Definition at line 380 of file linear_wave1d.c.
ConsFun_t get_usr_expr | ( | const char * | expr | ) |
Sets pointer to expression for special output data.
Definition at line 367 of file linear_wave1d.c.
VOutFun_t get_usr_out_fun | ( | const char * | name | ) |
Returns a user defined output function pointer.
Definition at line 372 of file linear_wave1d.c.
void problem | ( | DomainS * | pDomain | ) |
Problem initial conditions, edited for each problem.
Definition at line 42 of file linear_wave1d.c.
References amp, ath_error(), ath_pout(), ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, bx0, by0, bz0, calloc_3d_array(), cc_pos(), ConsS::d, d0, d_ind, ConsS::E, esys_roe_adb_hyd(), esys_roe_adb_mhd(), esys_roe_iso_hyd(), esys_roe_iso_mhd(), eta_Ohm, four_pi_G, free_3d_array(), Gamma, Gamma_1, grav_mean_rho, DomainS::Grid, GridS::ie, GridS::is, Iso_csound, GridS::je, GridS::js, GridS::ke, GridS::ks, DomainS::Level, ConsS::M1, ConsS::M2, ConsS::M3, n, GridS::Nx, nx1, nx2, nx3, p0, par_getd(), par_getd_def(), par_geti(), Q_AD, r, ConsS::s, s, Soln, GridS::U, and wave_flag.
void problem_read_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
Problem specific subroutine for use with reading restart files, Edited for each problem.
Definition at line 349 of file linear_wave1d.c.
References d0, eta_Ohm, four_pi_G, grav_mean_rho, par_getd(), par_getd_def(), Q_AD, and Q_Hall.
void problem_write_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
Problem specific subroutine for use with writing restart files, Edited for each problem.
Definition at line 344 of file linear_wave1d.c.
void Userwork_after_loop | ( | MeshS * | pM | ) |
Problem work executed after the main Athena loop, see main.c Edited for each problem.
Definition at line 403 of file linear_wave1d.c.
References ath_error(), ath_fname(), ConsS::B1c, ConsS::B2c, ConsS::B3c, ConsS::d, MeshS::Domain, ConsS::E, error, DomainS::Grid, GridS::ie, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, ConsS::M1, ConsS::M2, ConsS::M3, n, ConsS::s, GridS::U, and wave_flag.
void Userwork_in_loop | ( | MeshS * | pM | ) |
Problem work executed during each step in the main Athena loop, see main.c.
Edited for each problem.
Definition at line 391 of file linear_wave1d.c.
Definition at line 35 of file linear_wave1d.c.
int wave_flag [static] |
Definition at line 36 of file linear_wave1d.c.
Referenced by problem(), and Userwork_after_loop().