Functions | Variables

prob/linear_wave1d.c File Reference

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

Detailed Description

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.


Function Documentation

void get_eta_user ( GridS pG,
int  i,
int  j,
int  k,
Real eta_O,
Real eta_H,
Real eta_A 
)

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  ) 
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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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.


Variable Documentation

ConsS*** RootSoln = NULL [static]

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().