Go to the source code of this file.
Data Structures |
struct | cell |
Defines |
#define | cell_err_ok 0 |
#define | cell_err_null -1 |
#define | cell_err_malloc -2 |
#define | cell_err_pthread -3 |
#define | cell_default_size 64 |
#define | cell_incr 10 |
#define | cell_partalign 64 |
#define | cell_flag_none 0 |
#define | cell_flag_ghost 1 |
#define | cell_flag_wait 2 |
#define | cell_flag_waited 4 |
#define | cell_flag_marked 8 |
Functions |
int | cell_init (struct cell *c, int *loc, double *origin, double *dim) |
| Initialize the given cell.
|
struct part * | cell_add (struct cell *c, struct part *p, struct part **partlist) |
| Add a particle to a cell.
|
struct part * | cell_add_incomming (struct cell *c, struct part *p) |
| Add a particle to the incomming array of a cell.
|
int | cell_add_incomming_multiple (struct cell *c, struct part *p, int count) |
| Add one or more particles to the incomming array of a cell.
|
int | cell_welcome (struct cell *c, struct part **partlist) |
| Move particles from the incomming buffer to the cell.
|
int | cell_load (struct cell *c, struct part *parts, int nr_parts, struct part **partlist, struct cell **celllist) |
| Load a block of particles to the cell.
|
int | cell_flush (struct cell *c, struct part **partlist, struct cell **celllist) |
| Flush all the parts from a cell.
|
Variables |
const char | cell_sortlistID [27] |
const FPTYPE | cell_shift [13 *3] |
const char | cell_flip [27] |
int | cell_err |
Define Documentation
Alignment when allocating parts.
Function Documentation
Add a particle to a cell.
- Parameters:
-
c | The cell to which the particle should be added. |
p | The #particle to add to the cell |
- Returns:
- A pointer to the particle data in the cell.
This routine assumes the particle position has already been adjusted to the cell c
.
Add a particle to the incomming array of a cell.
- Parameters:
-
c | The cell to which the particle should be added. |
p | The #particle to add to the cell |
- Returns:
- A pointer to the particle data in the incomming array of the cell.
This routine assumes the particle position has already been adjusted to the cell c
.
Add one or more particles to the incomming array of a cell.
- Parameters:
-
c | The cell to which the particle should be added. |
p | The #particle to add to the cell |
- Returns:
- The number of incomming parts or < 0 on error (see cell_err).
This routine assumes the particle position have already been adjusted to the cell c
.
Flush all the parts from a cell.
- Parameters:
-
c | The cell to flush. |
partlist | A pointer to the partlist to set the part indices. |
celllist | A pointer to the celllist to set the part indices. |
- Returns:
- cell_err_ok or < 0 on error (see cell_err).
int cell_init |
( |
struct cell * |
c, |
|
|
int * |
loc, |
|
|
double * |
origin, |
|
|
double * |
dim |
|
) |
| |
Initialize the given cell.
- Parameters:
-
c | The cell to initialize. |
loc | Array containing the location of this cell in the space. |
origin | The origin of the cell in global coordinates |
dim | The cell dimensions. |
- Returns:
- cell_err_ok or < 0 on error (see cell_err).
Load a block of particles to the cell.
- Parameters:
-
c | The cell. |
parts | Pointer to a block of part. |
nr_parts | The number of parts to load. |
partlist | A pointer to the partlist to set the part indices. |
celllist | A pointer to the celllist to set the part indices. |
- Returns:
- cell_err_ok or < 0 on error (see cell_err).
Move particles from the incomming buffer to the cell.
- Parameters:
-
c | The cell. |
partlist | A pointer to the partlist to set the part indices. |
- Returns:
- cell_err_ok or < 0 on error (see cell_err).
Variable Documentation