Functions | Variables

prob/par_friction.c File Reference

Problem generator for particle code test, works for 2D and 3D. More...

Go to the source code of this file.

Functions

static Vector ParticleTroj (Real t)
 Compute particle trajectory.
static Vector ParticleVel (Real t)
 Compute particle velocity.
static int ParticleLocator (Real x1, Real x2, Real x3)
 Judge if the particle is in this cpu.
void problem (Grid *pGrid, Domain *pDomain)
void problem_write_restart (Grid *pG, Domain *pD, FILE *fp)
void problem_read_restart (Grid *pG, Domain *pD, FILE *fp)
Gasfun_t get_usr_expr (const char *expr)
 Sets pointer to expression for special output data.
VGFunout_t get_usr_out_fun (const char *name)
 Returns a user defined output function pointer.
PropFun_t get_usr_par_prop (const char *name)
 Returns a user defined particle selection function.
void gasvshift (const Real x1, const Real x2, const Real x3, Real *u1, Real *u2, Real *u3)
 Gas velocity shift.
void Userforce_particle (Vector *ft, const Real x1, const Real x2, const Real x3, const Real v1, const Real v2, const Real v3)
void Userwork_in_loop (Grid *pGrid, Domain *pDomain)
void Userwork_after_loop (Grid *pGrid, Domain *pDomain)

Variables

Real x1c
Real x2c
Real x3c
Real v01
Real v02
Real v03
Real x1min
Real x1max
Real x2min
Real x2max
Real x3min
Real x3max
char name [50]

Detailed Description

Problem generator for particle code test, works for 2D and 3D.

PURPOSE: Problem generator for particle code test, works for 2D and 3D. The fluid is set to be at rest. One test particle with initial velocity v0 is then stopped by the gas. This problem is used to test particle integrator performance in weak coupling regime.

USERWORK_IN_LOOP function is used to output particle positions.

Definition in file par_friction.c.


Function Documentation

void gasvshift ( const Real  x1,
const Real  x2,
const Real  x3,
Real u1,
Real u2,
Real u3 
)

Gas velocity shift.

Definition at line 197 of file par_friction.c.

Gasfun_t get_usr_expr ( const char *  expr  ) 

Sets pointer to expression for special output data.

Definition at line 182 of file par_friction.c.

VGFunout_t get_usr_out_fun ( const char *  name  ) 

Returns a user defined output function pointer.

Definition at line 187 of file par_friction.c.

PropFun_t get_usr_par_prop ( const char *  name  ) 

Returns a user defined particle selection function.

Definition at line 192 of file par_friction.c.

static int ParticleLocator ( Real  x1,
Real  x2,
Real  x3 
) [static]

Judge if the particle is in this cpu.

Definition at line 289 of file par_friction.c.

References x1lpar, x1upar, x2lpar, x2upar, x3lpar, and x3upar.

Referenced by problem().

Here is the caller graph for this function:

static Vector ParticleTroj ( Real  t  )  [static]

Compute particle trajectory.

Definition at line 256 of file par_friction.c.

References tstop0, v01, v02, v03, x1c, x1max, x1min, x2c, x2max, x2min, x3c, x3max, and x3min.

Referenced by Userwork_in_loop().

Here is the caller graph for this function:

static Vector ParticleVel ( Real  t  )  [static]

Compute particle velocity.

Definition at line 276 of file par_friction.c.

References tstop0, v01, v02, v03, and vel.

Referenced by Userwork_in_loop().

Here is the caller graph for this function:

void problem ( Grid *  pGrid,
Domain *  pDomain 
)

Definition at line 52 of file par_friction.c.

References ath_error(), name, par_getd(), par_geti(), particle_realloc(), ParticleLocator(), tstop0, v01, v02, v03, x1c, x1max, x1min, x2c, x2max, x2min, x3c, x3max, and x3min.

Here is the call graph for this function:

void problem_read_restart ( Grid *  pG,
Domain *  pD,
FILE *  fp 
)

Definition at line 159 of file par_friction.c.

References name, par_getd(), v01, v02, v03, x1c, x1max, x1min, x2c, x2max, x2min, x3c, x3max, and x3min.

Here is the call graph for this function:

void problem_write_restart ( Grid *  pG,
Domain *  pD,
FILE *  fp 
)

Definition at line 153 of file par_friction.c.

References name.

void Userforce_particle ( Vector *  ft,
const Real  x1,
const Real  x2,
const Real  x3,
const Real  v1,
const Real  v2,
const Real  v3 
)

Definition at line 203 of file par_friction.c.

void Userwork_after_loop ( Grid *  pGrid,
Domain *  pDomain 
)

Definition at line 246 of file par_friction.c.

void Userwork_in_loop ( Grid *  pGrid,
Domain *  pDomain 
)

Definition at line 210 of file par_friction.c.

References name, ParticleTroj(), and ParticleVel().

Here is the call graph for this function:


Variable Documentation

char name[50]

Definition at line 45 of file par_friction.c.

Definition at line 43 of file par_friction.c.

Referenced by ParticleTroj(), ParticleVel(), problem(), and problem_read_restart().

Definition at line 43 of file par_friction.c.

Referenced by ParticleTroj(), ParticleVel(), problem(), and problem_read_restart().

Definition at line 43 of file par_friction.c.

Referenced by ParticleTroj(), ParticleVel(), problem(), and problem_read_restart().

Definition at line 43 of file par_friction.c.

Definition at line 44 of file par_friction.c.

Definition at line 44 of file par_friction.c.

Definition at line 43 of file par_friction.c.

Definition at line 44 of file par_friction.c.

Definition at line 44 of file par_friction.c.

Definition at line 43 of file par_friction.c.

Definition at line 44 of file par_friction.c.

Definition at line 44 of file par_friction.c.