Functions

particles/output_particle.c File Reference

Contains routines necessary for outputting particles. More...

Go to the source code of this file.

Functions

Real expr_dpar (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle density.
Real expr_M1par (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle 1-momentum.
Real expr_M2par (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle 2-momentum.
Real expr_M3par (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle 3-momentum.
Real expr_V1par (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle 1-velocity.
Real expr_V2par (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle 2-velocity.
Real expr_V3par (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle 3-velocity.
void particle_to_grid (Grid *pG, Domain *pD, PropFun_t par_prop)
 Bin the particles to grid cells.
void dump_particle_binary (Grid *pG, Domain *pD, Output *pOut)
 Dump unbinned particles in binary format.
int property_all (const Grain *gr, const GrainAux *grsub)
 Default choice for binning particles to the grid: All the particles are binned, return true for any value.

Detailed Description

Contains routines necessary for outputting particles.

PURPOSE: contains routines necessary for outputting particles. There are two basic formats:

For particle binning, there can be many choices since particles may have different properties. We provide a default (and trivial) particle selection function, which select all the particles with different properties. The user can define their own particle selection functions in the problem generator and pass them to the main code.

The output quantities include, density, momentum density and velocity of the selected particles averaged in one grid cell. The binned data are saved in arrays dpar, and grid_v. The latter is borrowed from particle.c to save memory. The expression functions expr_??? are used to pick the relevant quantities, which is part of the output data structure. The way to output these binned particle quantities are then exactly the same as other gas quantities.

Dumping particle list has not been developed yet since we need to figure out how to do visualization.

CONTAINS PUBLIC FUNCTIONS:

History:

Definition in file output_particle.c.


Function Documentation

void dump_particle_binary ( Grid *  pG,
Domain *  pD,
Output *  pOut 
)

Dump unbinned particles in binary format.

Definition at line 141 of file output_particle.c.

References ath_error(), ath_fname(), getvalues(), getweight, par_getd(), particle_to_grid(), and property_all().

Here is the call graph for this function:

Real expr_dpar ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle density.

Definition at line 291 of file output_particle.c.

Real expr_M1par ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle 1-momentum.

Definition at line 296 of file output_particle.c.

Real expr_M2par ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle 2-momentum.

Definition at line 302 of file output_particle.c.

Real expr_M3par ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle 3-momentum.

Definition at line 307 of file output_particle.c.

Real expr_V1par ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle 1-velocity.

Definition at line 312 of file output_particle.c.

Real expr_V2par ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle 2-velocity.

Definition at line 319 of file output_particle.c.

Real expr_V3par ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle 3-velocity.

Definition at line 326 of file output_particle.c.

void particle_to_grid ( Grid *  pG,
Domain *  pD,
PropFun_t  par_prop 
)

Bin the particles to grid cells.

Definition at line 68 of file output_particle.c.

References getweight, ilp, iup, jlp, jup, klp, kup, and ncell.

Referenced by data_output(), dump_particle_binary(), dump_particle_history(), and Userwork_after_loop().

Here is the caller graph for this function:

int property_all ( const Grain *  gr,
const GrainAux grsub 
)

Default choice for binning particles to the grid: All the particles are binned, return true for any value.

Definition at line 279 of file output_particle.c.

Referenced by dump_particle_binary(), dump_particle_history(), problem(), problem_read_restart(), and Userwork_after_loop().

Here is the caller graph for this function: