-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparallel_main.cpp
More file actions
67 lines (41 loc) · 1.63 KB
/
parallel_main.cpp
File metadata and controls
67 lines (41 loc) · 1.63 KB
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
//Main Test File for Langevin Simuator
#include "langsim.hpp" //Single File Interface
void callable()
{
//2. Create Simulation Clock Object → SimClock(MaxSteps, Step_Size)
SimClock simclock(1e6, 1e-3);
//3. Create Laser Object → (pulse interval, char, decy time)
Laser laser("always-on"); //Pulse Every 10 dt, char decay time is 5 dt
//4. Create Veff Object → Veff(radius, structure_factor)
Veff veff(600.0, 1);
//5. Create Box Object → LangevinBox(Rho, Part_no, FrameExports, simclock, laser, veff)
int write_frames = 100;
double Rho = 0.1e-6;
int Part_no = 500;
gl::do_pos_plots = true;
//Units(double Sigma, double Temp, double Viscosity)
Units units;
units.setSTV(1e-9, 273.16, CONST_WATER_VISCOSITY);
LangevinBox box(Rho, Part_no, write_frames, simclock, laser, veff, units);
//6. Evolve Box → Run Box
box.Evolve();
}
int main()
{
Modes::SetModeCode(15); //Declare that the working mode is 15
//0. Specify HomePath(that should exist) → Optional
HomePath("/mnt/m/code/FCS/Results/");
//1. Create NewSession(session_name, box_mode) box_modes → "singlebox"/"multibox"
NewSession("Test", "singlebox");
SetParallelBoxes(15, callable);
///////////////////// Test Features --------------------------><
/*
• Check if the extension has a dot in the beginning
• Check if the Gpaths provided obey corresponding operationg system format
• Check if the passed ModeCode Matches the compiled ModeCode
*/
}
double AiryUnit(double wavelength, double NA, double magnification)
{
return 1.22 * wavelength * magnification / NA;
}