forked from snytav/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load_data.h
69 lines (49 loc) · 1.72 KB
/
load_data.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
/*
* load_data.h
*
* Created on: Jun 9, 2018
* Author: snytav
*/
#ifndef LOAD_DATA_H_
#define LOAD_DATA_H_
#include "particle.h"
#include <vector>
#include "maxwell.h"
#include <string>
std::string getMumuFileName(int nt);
int readFortranBinaryArray(FILE *f, double* d);
FILE *readPreliminary3Darrays(std::string fn,int nt,int nx,int ny,int nz);
void debugPrintParticleCharacteristicArray(double *p_ch,int np,int nt,std::string name,int sort);
int readBinaryParticleArraysOneSort(
FILE *f,
double **dbg_x,
double **dbg_y,
double **dbg_z,
double **dbg_px,
double **dbg_py,
double **dbg_pz,
double *qq_m,
double *mm,
int nt,
int sort
);
int getParticlesOneSortFromFile(
FILE *f,
particle_sorts sort,
int nt,
std::vector<Particle> & vp,
double *q_m,
double *m
);
void readBinaryParticlesOneSort(FILE *f,std::vector<Particle> & vp,
particle_sorts sort,int nt);
std::vector<Particle> readBinaryParticlesOneSortSTL(FILE *f, particle_sorts sort,int nt);
int readBinaryParticlesAllSorts(FILE *f,int nt,
std::vector<Particle> & ion_vp,
std::vector<Particle> & el_vp,
std::vector<Particle> & beam_vp);
int LoadParticleData(int nt,
std::vector<Particle> & ion_vp,
std::vector<Particle> & el_vp,
std::vector<Particle> & beam_vp, int nx,int ny,int nz);
#endif /* LOAD_DATA_H_ */