Functions | Variables

prob/cpaw1d.c File Reference

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 ConsSRootSoln = NULL

Detailed Description

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.


Function Documentation

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.

Definition at line 200 of file cpaw1d.c.

Referenced by eta_general_user(), and eta_single_user().

Here is the caller graph for this function:

ConsFun_t get_usr_expr ( const char *  expr  ) 

Sets pointer to expression for special output data.

Definition at line 187 of file cpaw1d.c.

VOutFun_t get_usr_out_fun ( const char *  name  ) 

Returns a user defined output function pointer.

Definition at line 192 of file cpaw1d.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 182 of file cpaw1d.c.

void problem_write_restart ( MeshS pM,
FILE *  fp 
)

Problem specific subroutine for use with writing restart files, Edited for each problem.

Definition at line 177 of file cpaw1d.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 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.

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 212 of file cpaw1d.c.


Variable Documentation

ConsS* RootSoln = NULL [static]

Definition at line 35 of file cpaw1d.c.