-
Notifications
You must be signed in to change notification settings - Fork 37
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
Modifications to elliptic eigenproblem example #280
Merged
Merged
Changes from 10 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
ff004a4
Add boundary condition switch
siuwuncheung af1f38d
Output eigenvalue absolute error
siuwuncheung 861bcdb
Make eigenfunction sign in FOM and ROM consistent
siuwuncheung e60ca5d
Clean up problems
siuwuncheung c523237
Change Gaussian radius
siuwuncheung 333103d
Change calculation of Gaussian width
siuwuncheung 0e1f903
Slight changes in example command lines
siuwuncheung 8239b14
Change filenames
siuwuncheung 157a2e9
Remove TODO
siuwuncheung 6c7a0f8
Astyle
siuwuncheung 8ab3481
Change filenames. Change calculation of Gaussian width
siuwuncheung e2add1b
Slight changes to filenames
siuwuncheung 8e17778
Consistent sign over parameters and eigenvector ordering
siuwuncheung 69812cf
Astyle
siuwuncheung 958bd25
Fix visualization signs
siuwuncheung ec0d4c1
Fix stream names
siuwuncheung 9e78052
Reset stream name
siuwuncheung 1e864d6
Reorganize reference mode sign logic
siuwuncheung 95d9533
Clean up
siuwuncheung 8760daf
Change variable names
siuwuncheung 1ebd1f2
Warning meesages
siuwuncheung 91fba19
Astyle
siuwuncheung 11d63b0
Normalize
siuwuncheung a819f82
Adjust Gaussian
siuwuncheung b4fc1fd
Rename variables
siuwuncheung 88a9368
Remove verbose
siuwuncheung 60f0013
Update example in header
siuwuncheung 4d0abab
Fix failing CI
siuwuncheung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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.