This is a follow up PR for #266 to enable the followings:
Use eigenspace projection for error calculation
Add boundary condition switch
Clean up to retain only 4 problems, i.e. poisson, heterogeneous diffusion, Schrodinger equation with harmonic potential, Schrodinger equation with Gaussian potential well
FOM solution for eigenvalue 0 = 19.878564
ROM solution for eigenvalue 0 = 19.878631
Absolute error of ROM solution for eigenvalue 0 = 6.6618756e-05
Relative error of ROM solution for eigenvalue 0 = 3.3512861e-06
FOM solution for eigenvalue 1 = 53.177886
ROM solution for eigenvalue 1 = 53.179662
Absolute error of ROM solution for eigenvalue 1 = 0.0017768914
Relative error of ROM solution for eigenvalue 1 = 3.3414104e-05
FOM solution for eigenvalue 2 = 53.177886
ROM solution for eigenvalue 2 = 53.179662
Absolute error of ROM solution for eigenvalue 2 = 0.0017769039
Relative error of ROM solution for eigenvalue 2 = 3.3414339e-05
FOM solution for eigenvalue 3 = 81.245811
ROM solution for eigenvalue 3 = 81.246105
Absolute error of ROM solution for eigenvalue 3 = 0.00029387266
Relative error of ROM solution for eigenvalue 3 = 3.6170808e-06
Relative l2 error of ROM eigenvector 0 = 0.0023815683
Relative l2 error of ROM eigenvector 1 = 0.0097810599
Relative l2 error of ROM eigenvector 2 = 0.0097816076
Relative l2 error of ROM eigenvector 3 = 0.0043291658
N.B.: It is a FOM issue rather than a ROM issue. If the Gaussian center falls on a grid point, the eigenvalue calculation for Schrodinger equation can be very unstable.
This is a follow up PR for #266 to enable the followings:
With the command lines,
the output is
N.B.: It is a FOM issue rather than a ROM issue. If the Gaussian center falls on a grid point, the eigenvalue calculation for Schrodinger equation can be very unstable.