numerics
Loading...
Searching...
No Matches
main.cpp File Reference

Real-time raylib visualisation of the 2-D TDSE solver. More...

#include "raylib.h"
#include "tdse_solver.hpp"
#include <vector>
#include <cmath>
#include <cstdio>
#include <algorithm>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Real-time raylib visualisation of the 2-D TDSE solver.

Visualisation: Default mode – probability density |psi|^2 coloured by quantum phase (HSV: hue = phase, brightness = prob, saturation = 1) Mode key D – probability density only (black -> cyan -> white hot-map) Potential overlay drawn at 30% opacity over the wavefunction

Controls: SPACE pause / resume R reset wavepacket (click to reposition) P cycle potentials (Free -> Barrier -> DoubleSlit -> Harmonic -> CircularWell) E compute eigenmodes (Lanczos, runs in current thread ~1-2 s) 1-8 load eigenmode k (after E) D toggle density-only vs phase colour map Left click place wavepacket at cursor position Scroll up/dn increase / decrease initial momentum (kx)

  • / - substeps per frame ESC / Q quit

Definition in file main.cpp.

Function Documentation

◆ main()