- Moving eps=1e-16 to 1e-8 helped on the single precision issue of the Wave Eq not running the SVD decomposition
- Sometimes there is a missmatch on the finite difference solution being ran with 0.1 or 0.05 and not saving the first initial condition
utils/standard.py
contains the finite difference Wave Eq solver (for 2D)experiments/track_wave.py
runs the finite difference solution for the Wave Eq and optionally saves the output.experiments/plot_wave.py
plots the comparison between a NN solution and finite differences. Both visually and relative residual.tests/test_power.py
compares the power iteration eigenvalue computation against a dense method.experiments/merge_files.py
merges all the wave files from the snapshotsexperiments/max_eigen.py
computes the max eigenvalue of a certain run through power itersexperiments/plot_conditioning.py
plots the conditioning number given a set of thetas and a net. Uses the power method.
This is the command to solve the initial condition. It is not necessary to run this
before solving a PDE as the solvers call these routines if they don't contain an
initialization on data/initial_thetas/
.
py experiments/initial_theta0.py --nn-name=wave_tpY --spatial-dim=3 --tune-head=False --save-output=True --epochs=100_000 --batch-size=50_000
Performat (error aroud (1.e-3, 8.e-3) and it runs fast.
py experiments/advection.py --nn-name=ad_SjL --cgtol=1e-8 --maxcgiter=100 --mu=1e-8 --reg=0 --odetol=1e-3 --method=RK45 --grid-size=10_000 --batch-size=10_000 --dtype=single --initial_epochs=100_000
For the heat equation (this problem is even better conditioned than the advection equation).
py experiments/heat.py --nn-name=heat_Rik --cgtol=1e-8 --maxcgiter=100 --mu=1e-8 --reg=0 --rank=200 --odetol=1e-3 --grid_size=10_000 --batch_size=10_000 --method=RK45 --dtype=single --tune-head=False --initial_epochs=100_000
Command to solve the 2D wave equation
py experiments/wave_eq.py --nn-name=wave_kMT --cgtol=1e-8 --maxcgiter=100 --mu=1e-6 --reg=0 --rank=200 --odetol=1e-4 --grid-size=5_000 --batch-size=5_000 --method=RK45 --dtype="double"
py experiments/wave_eq.py --nn-name=wave_kMT --cgtol=1e-8 --maxcgiter=1_000 --mu=1e-6 --reg=0 --rank=300 --odetol=1e-4 --grid-size=5_000 --batch-size=5_000 --method=RK45 --dtype="single"
py experiments/wave_eq.py --nn-name=wave_kMT --cgtol=1e-8 --maxcgiter=1_000 --mu=1e-6 --reg=0 --rank=250 --odetol=1e-4 --grid-size=5_000 --batch-size=5_000 --method=RK45 --dtype="double"
I was able to sucessfuly run the wave equation on single MVMs by using restarts
py experiments/wave_eq.py --nn-name=wave_kMT --run-restarts=True --snaps-num=9 --restart-epochs=10_000 --file-path=./data/initial_thetas/theta0_wave_kMT_20220810_151645.pkl --dtype=single
Command to solve the 3D wave equation (best resul so far)
py experiments/3d_wave_eq.py --nn-name=wave_tpY --cgtol=1e-8 --maxcgiter=2000 --mu=1e-9 --reg=0 --rank=200 --odetol=1e-4 --grid-size=100_000 --batch-size=25_000 --method=RK45
The above is consitently below
To fit snapshot you can run
py experiments/fit_against_snapshots.py --nn-name=wave_kMT --T=7
To run Vlasov
py experiments/vlasov.py --nn_name=multi --ics_type=prod --snaps-num=20 --tf=2. --nT=20 --restart-epochs=50_000 --initial-epochs=50_000