-
Notifications
You must be signed in to change notification settings - Fork 39
Modifications to elliptic eigenproblem example #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -43,7 +43,7 @@ | |||
// Elapsed time for assembling FOM: 1.471708e-03 second | |||
// Elapsed time for solving FOM: 3.416310e-01 second | |||
// | |||
// Online phase: elliptic_eigenproblem_global_rom -online -p 2 -a 0.5 | |||
// Online phase: elliptic_eigenproblem_global_rom -online -p 2 -a 0.50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting the following dramatically different outputs in Ruby for ROMs:
Number of unknowns: 289
Opening file: elliptic_eigenproblem_basis.000000
spatial basis dimension is 289 x 14
Eigenvalue 0: = 26.893636
Eigenvalue 1: = 67.093674
Eigenvalue 2: = 69.162828
Eigenvalue 3: = 109.44197
Eigenvalue 4: = 136.84225
norm_ref[i] = 273.80793
norm_ev[i] = 270.02649
ip[i] = 1.8178431
norm_ref[i] = 259.39492
norm_ev[i] = 264.66499
ip[i] = -12.477348
norm_ref[i] = 264.55127
norm_ev[i] = 264.93123
ip[i] = -22.66543
norm_ref[i] = 264.64771
norm_ev[i] = 259.31325
ip[i] = -97.06303
norm_ref[i] = 269.74102
norm_ev[i] = 273.78523
ip[i] = -18.535971
FOM solution for eigenvalue 0 = 26.893632
ROM solution for eigenvalue 0 = 26.893636
Absolute error of ROM solution for eigenvalue 0 = 3.97966e-06
Relative error of ROM solution for eigenvalue 0 = 1.4797778e-07
FOM solution for eigenvalue 1 = 67.093653
ROM solution for eigenvalue 1 = 67.093674
Absolute error of ROM solution for eigenvalue 1 = 2.1396013e-05
Relative error of ROM solution for eigenvalue 1 = 3.1889772e-07
FOM solution for eigenvalue 2 = 69.162823
ROM solution for eigenvalue 2 = 69.162828
Absolute error of ROM solution for eigenvalue 2 = 4.853771e-06
Relative error of ROM solution for eigenvalue 2 = 7.0178902e-08
FOM solution for eigenvalue 3 = 109.44196
ROM solution for eigenvalue 3 = 109.44197
Absolute error of ROM solution for eigenvalue 3 = 4.1389821e-06
Relative error of ROM solution for eigenvalue 3 = 3.7818969e-08
FOM solution for eigenvalue 4 = 136.84157
ROM solution for eigenvalue 4 = 136.84225
Absolute error of ROM solution for eigenvalue 4 = 0.0006786573
Relative error of ROM solution for eigenvalue 4 = 4.9594382e-06
Relative l2 error of ROM eigenvector 0 = 0.51582637
Relative l2 error of ROM eigenvector 1 = 1.9924533
Relative l2 error of ROM eigenvector 2 = 1.8788293
Relative l2 error of ROM eigenvector 3 = 1.9193804
Relative l2 error of ROM eigenvector 4 = 0.18407987
Unable to connect to GLVis server at localhost:19916
GLVis visualization disabled.
Elapsed time for assembling ROM: 1.196660e-02 second
Elapsed time for solving ROM: 5.293224e-02 second
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting the same results as you. I think the sample output comments in the header are old and haven't been updated with new values from the changes made in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is correct, then the relative l2 error for eigenvectors are pretty off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am updating some examples and parameters with outputing more information. Eventually, I want to use this example:
./elliptic_eigenproblem_global_rom -offline -p 2 -id 0 -a 0.0
./elliptic_eigenproblem_global_rom -offline -p 2 -id 1 -a 1.0
./elliptic_eigenproblem_global_rom -merge -p 2 -ns 2
./elliptic_eigenproblem_global_rom -fom -p 2 -a 0.5 -visit
./elliptic_eigenproblem_global_rom -online -p 2 -a 0.5 -visit
With the most recent commit 11d63b0, the results are
Warning: eigenvector 1 in FOM and ROM are not directly comparable.
Inner product = 0.78603098
TODO: Projection error of eigenvector.
Warning: eigenvector 2 in FOM and ROM are not directly comparable.
Inner product = 0.78603092
TODO: Projection error of eigenvector.
FOM solution for eigenvalue 0 = 19.921322
ROM solution for eigenvalue 0 = 19.92139
Absolute error of ROM solution for eigenvalue 0 = 6.7559202e-05
Relative error of ROM solution for eigenvalue 0 = 3.391301e-06
FOM solution for eigenvalue 1 = 52.415509
ROM solution for eigenvalue 1 = 52.416907
Absolute error of ROM solution for eigenvalue 1 = 0.0013989485
Relative error of ROM solution for eigenvalue 1 = 2.6689592e-05
FOM solution for eigenvalue 2 = 52.415509
ROM solution for eigenvalue 2 = 52.416908
Absolute error of ROM solution for eigenvalue 2 = 0.0013990685
Relative error of ROM solution for eigenvalue 2 = 2.6691881e-05
FOM solution for eigenvalue 3 = 81.244631
ROM solution for eigenvalue 3 = 81.245048
Absolute error of ROM solution for eigenvalue 3 = 0.00041707441
Relative error of ROM solution for eigenvalue 3 = 5.1335627e-06
Relative l2 error of ROM eigenvector 0 = 0.0010013981
Relative l2 error of ROM eigenvector 1 = 0.65416973
Relative l2 error of ROM eigenvector 2 = 0.65416982
Relative l2 error of ROM eigenvector 3 = 0.0025055664
Right now, the L2 error of the eigenvectors with non-simple eigenvalues (eigenvector 1 and 2 above) are large because of the way it is calculated, which is direct comparison of the FOM/ROM eigenvectors of the same index.
I will update the results in the header of the script and on the libROM webpage soon after the next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
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.