Functions

prob/kh.c File Reference

Problem generator for KH instability. More...

Go to the source code of this file.

Functions

static double ran2 (long int *idum)
 Extracted from the Numerical Recipes in C (version 2) code.
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.
static Real color (const GridS *pG, const int i, const int j, const int k)
 Returns first passively advected scalar s[0].
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 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.

Detailed Description

Problem generator for KH instability.

PURPOSE: Problem generator for KH instability. Sets up two versions:

Definition in file kh.c.


Function Documentation

static Real color ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

Returns first passively advected scalar s[0].

Definition at line 177 of file kh.c.

References ConsS::d, ConsS::s, and GridS::U.

ConsFun_t get_usr_expr ( const char *  expr  ) 

Sets pointer to expression for special output data.

Definition at line 183 of file kh.c.

VOutFun_t get_usr_out_fun ( const char *  name  ) 

Returns a user defined output function pointer.

Definition at line 191 of file kh.c.

void problem ( DomainS pDomain  ) 

Problem initial conditions, edited for each problem.

Definition at line 31 of file kh.c.

References a, amp, b0, ConsS::B1c, GridS::B1i, cc_pos(), ConsS::d, ConsS::E, eta_Ohm, Gamma_1, DomainS::Grid, GridS::ie, iprob, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, ConsS::M1, ConsS::M2, ConsS::M3, par_getd(), par_geti(), ran2(), ConsS::s, and GridS::U.

Here is the call graph for this function:

void problem_read_restart ( MeshS pM,
FILE *  fp 
)

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

Definition at line 160 of file kh.c.

References eta_Ohm, and par_getd().

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 155 of file kh.c.

double ran2 ( long int *  idum  )  [static]

Extracted from the Numerical Recipes in C (version 2) code.

Modified to use doubles instead of floats. -- T. A. Gardiner -- Aug. 12, 2003

Long period (> 2 x 10^{18}) random number generator of L'Ecuyer with Bays-Durham shuffle and added safeguards. Returns a uniform random deviate between 0.0 and 1.0 (exclusive of the endpoint values). Call with idum = a negative integer to initialize; thereafter, do not alter idum between successive deviates in a sequence. RNMX should appriximate the largest floating point value that is less than 1.

Definition at line 236 of file kh.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 200 of file kh.c.

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 195 of file kh.c.