Problem generator for 1-D circularly polarized Alfven wave (CPAW) test. 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) |
Get user defined resistivity. | |
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 |
Problem generator for 1-D circularly polarized Alfven wave (CPAW) test.
PURPOSE: Problem generator for 1-D circularly polarized Alfven wave (CPAW) test. Only works in 1D (wavevector in x). Tests in 2D and 3D are initialized with different functions.
Can be used for either standing (problem/v_par=1.0) or travelling (problem/v_par=0.0) waves.
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.
REFERENCE: G. Toth, "The div(B)=0 constraint in shock capturing MHD codes", JCP, 161, 605 (2000)
Definition in file cpaw1d.c.
Get user defined resistivity.
Definition at line 200 of file cpaw1d.c.
Referenced by eta_general_user(), and eta_single_user().
ConsFun_t get_usr_expr | ( | const char * | expr | ) |
VOutFun_t get_usr_out_fun | ( | const char * | name | ) |
void problem | ( | DomainS * | pDomain | ) |
Problem initial conditions, edited for each problem.
Definition at line 40 of file cpaw1d.c.
References ath_error(), ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, b_par, b_perp, cc_pos(), ConsS::d, d_ind, ConsS::E, fac, Gamma_1, DomainS::Grid, GridS::ie, GridS::is, GridS::js, k_par, GridS::ks, lambda, DomainS::Level, ConsS::M1, ConsS::M2, ConsS::M3, GridS::Nx, par_getd(), par_geti_def(), Q_Hall, DomainS::RootMaxX, DomainS::RootMinX, Soln, and GridS::U.
void problem_read_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
void problem_write_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
void Userwork_after_loop | ( | MeshS * | pM | ) |
Problem work executed after the main Athena loop, see main.c Edited for each problem.
Definition at line 222 of file cpaw1d.c.
References ath_error(), ConsS::B1c, ConsS::B2c, ConsS::B3c, ConsS::d, MeshS::Domain, ConsS::E, error, DomainS::Grid, GridS::ie, GridS::is, GridS::js, GridS::ks, ConsS::M1, ConsS::M2, ConsS::M3, and GridS::U.
void Userwork_in_loop | ( | MeshS * | pM | ) |