17void probability_deviation()
19 DEBUG(
"Sim no slits");
20 WaveSimulation sim_no_slits(.005, 2.5e-5, .008, .25, .5, .05, .05, 200.,
23 DEBUG(
"Sim with slits");
24 WaveSimulation sim_slits(.005, 2.5e-5, .008, .25, .5, .05, .10, 200., 0.,
25 0.02, .5, .05, .05, 2);
27 DEBUG(
"Probability deviation");
28 sim_no_slits.probability_deviation(
29 "data/probability_deviation_no_slits.txt",
true);
30 DEBUG(
"Probability deviation with slits");
31 sim_slits.probability_deviation(
"data/probability_deviation_slits.txt",
37 WaveSimulation sim(.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0., 0.02,
40 std::vector<double> times{0., .001, .002};
41 sim.simulate(
"data/color_map.txt", times);
47 .005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0., 0.02, .5, .05, .05, 1);
49 sim->
simulate(
"data/screen/single_slit.txt");
52 sim =
new WaveSimulation(.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0.,
53 0.02, .5, .05, .05, 2);
55 sim->
simulate(
"data/screen/double_slit.txt");
58 sim =
new WaveSimulation(.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0.,
59 0.02, .5, .05, .05, 3);
61 sim->
simulate(
"data/screen/triple_slit.txt");
67 ofile.open(
"test.txt");
68 WaveSimulation sim(.005, 2.5e-5, .008, .25, .5, .05, .10, 200., 0., 0.02,
70 sim.
simulate(
"data/animation.txt",
true);
75 probability_deviation();
The definition of the WaveSimulation class.
Simulate the evolution of a wave packet in 2 + 1 domensions.
void simulate(std::string outfile, bool write_each_step=false)
Evolve the wave packet until the time T has been reached and write U to file.
Function prototypes and macros that are useful.
#define DEBUG(msg)
Writes a debug message.