PLUTO
particles.h
Go to the documentation of this file.
1 /* **************************************************************
2  Header file for particle module.
3  ************************************************************** */
4 
5 #define NPARTICLES 256
6 
7 typedef struct PARTICLES
8 {
9  int identity ; /* identifiant of particle */
10  int cell [DIMENSIONS] ; /* particle' cell index */
11  real coor [DIMENSIONS] ; /* coordinates of particle */
12  real speed[DIMENSIONS] ; /* speed of particle */
13  real mag [DIMENSIONS] ; /* magnetic field */
14  real density ; /* density in part.coor */
15  real pression ; /* pression in part.coor */
16  real divv ; /* speed divergence */
17 
18 }particle;
19 
20 typedef struct head {
21  struct cell *first;
22 }HEAD;
23 
24 typedef struct cell{
25  struct PARTICLES part;
26  struct cell *next;
27 }CELL;
28 
29 /* ---- Prototyping goes here ---- */
30 
31 void SET_PARTICLES (HEAD *list, HEAD *temp_list, struct GRID gxyz[],
32  real ***uu[] );
33 void ADVANCE_PARTICLES_predictor (HEAD *list,HEAD *temp_list, real ***uu[],
34  struct GRID gxyz[], real dt, real striction);
35 void ADVANCE_PARTICLES_corrector (HEAD *list,HEAD *temp_list, real ***uu[],
36  struct GRID gxyz[], real dt, real striction);
37 void SAVE_PARTICLES(HEAD *list, int nt, real t,
38  real striction, real ***uu[]);
39 void SAVE_STEP ( HEAD *list, real dt, int nop );
40 void RENAME_PARTICLES( HEAD *list);
41 
42 /* ROUTINES FOR LINKED LIST */
43 
44 void ADD_CELL(HEAD *list, struct PARTICLES *pl);
45 void DELETE_CELL(HEAD *list, int i);
46 void DISPLAY_LIST(HEAD *list);
47 
48 
49 
50 
int identity
Definition: particles.h:9
double real
Definition: pluto.h:488
void RENAME_PARTICLES(HEAD *list)
struct head HEAD
struct cell * next
Definition: particles.h:26
void SAVE_PARTICLES(HEAD *list, int nt, real t, real striction, real ***uu[])
Definition: setparticles.c:854
void ADVANCE_PARTICLES_corrector(HEAD *list, HEAD *temp_list, real ***uu[], struct GRID gxyz[], real dt, real striction)
Definition: setparticles.c:436
real mag[DIMENSIONS]
Definition: particles.h:13
real density
Definition: particles.h:14
Definition: particles.h:20
Definition: structs.h:78
Definition: particles.h:24
struct PARTICLES particle
struct PARTICLES part
Definition: particles.h:25
real speed[DIMENSIONS]
Definition: particles.h:12
void DISPLAY_LIST(HEAD *list)
real pression
Definition: particles.h:15
void DELETE_CELL(HEAD *list, int i)
int i
Definition: analysis.c:2
struct cell CELL
struct cell * first
Definition: particles.h:21
void SET_PARTICLES(HEAD *list, HEAD *temp_list, struct GRID gxyz[], real ***uu[])
Definition: setparticles.c:40
void ADD_CELL(HEAD *list, struct PARTICLES *pl)
Definition: setparticles.c:22
int nop
real coor[DIMENSIONS]
Definition: particles.h:11
void SAVE_STEP(HEAD *list, real dt, int nop)
real divv
Definition: particles.h:16
#define DIMENSIONS
Definition: definitions_01.h:2
void ADVANCE_PARTICLES_predictor(HEAD *list, HEAD *temp_list, real ***uu[], struct GRID gxyz[], real dt, real striction)
Definition: setparticles.c:199