forked from snytav/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaxwell.h
executable file
·72 lines (59 loc) · 2.2 KB
/
maxwell.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* init.h
*
* Created on: Apr 14, 2016
* Author: snytav
*/
#ifndef MAXWELL_H_
#define MAXWELL_H_
#include "particle.h"
#include "read_particles.h"
#include <vector>
double rnd_uniform();
double rnd_gaussian(double a,double b);
int getMassCharge(ParticleArrays *ions,ParticleArrays *electrons,ParticleArrays *beam_electrons,
double ni,double rbd,int lp);
int InitUniformMaxwellianParticles(int beamf,int jmb,
double tex0,double tey0,double tez0,
double beam_lx, double beam_ly, double beam_lz,int *jmb_real,
double lx,double ly,double lz, int meh,double Tb,double rimp,double rbd,
double *xi,double *yi, double *zi,double *ui,double *vi, double *wi,
double *xb,double *yb, double *zb,double *ub,double *vb, double *wb,
double *xf,double *yf, double *zf,double *uf,double *vf, double *wf
);
int AddBeamParticles(int jmb,
double tex0,double tey0,double tez0,
double beam_lx, double beam_ly,int *jmb_real,
double lx,double ly,double lz, int meh,double Tb,double rimp,double rbd,
double *xb,double *yb, double *zb,double *ub,double *vb, double *wb
);
int writeParamsFile(double tex0,double tey0,double tez0,
double Tb,double rimp,
double rbd,double ni,
double lx,double ly,double lz,
int lp,int nx,int ny,int nz,
double tau,double B0,
double bx,double by,double bz,
double py,double pz,
int beam_plasma,int start_from_file,
int ts,int ms,int phase
);
int getUniformMaxwellianParticles(
std::vector<Particle> & ion_vp,
std::vector<Particle> & el_vp,
std::vector<Particle> & beam_vp
);
int convertParticleArraysToSTLvector(
double *dbg_x,
double *dbg_y,
double *dbg_z,
double *dbg_px,
double *dbg_py,
double *dbg_pz,
double q_m,
double m,
int total_particles,
particle_sorts sort,
std::vector<Particle> & vp
);
#endif /* INIT_H_ */