-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add QDEIM option to some examples #229
Conversation
@dylan-copeland is this ready for review? |
I am planning to add a hyperreduction function that will reduce the boilerplate code for the various types of hyperreduction methods. |
…of hyperreduction sampling functions.
// | ||
// Online phase with full sampling: | ||
// ./nonlinear_elasticity_global_rom -online -dt 0.01 -tf 5.0 -s 14 -vs 100 -hyp -rvdim 40 -rxdim 10 -hdim 71 -nsr 1170 -sc 1.00 | ||
// ./nonlinear_elasticity_global_rom -online -dt 0.01 -tf 5.0 -s 14 -vs 100 -hyp -hrtype gnat -rvdim 40 -rxdim 10 -hdim 71 -nsr 1170 -sc 1.0 |
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 added this to expose the api
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 in general. Tried the nonlinear elastic examples on my local machine and the results are as before. Varying the hyperreduction options works. I added some lines to the nlelast examples so that the new api gets shown.
Not a big fan of this many formatting changes in a PR. It makes it harder to read and review.
Sorry for the unnecessary commits. I thought that I committed on another branch. |
This PR needs 1 more review @chldkdtn @siuwuncheung @dreamer2368 |
args.AddOption(&use_sopt, "-sopt", "--sopt", "-no-sopt", "--no-sopt", | ||
"Use S-OPT sampling instead of DEIM for the hyperreduction."); | ||
args.AddOption(&samplingType, "-hrtype", "--hrsamplingtype", | ||
"Sampling type for hyperreduction."); |
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 recommend adding different hyper-reduction sampling types in the regression test for this example, similar to the mixed nonlinear diffusion.
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.
Done.
// mpirun -n 1 ./mixed_nonlinear_diffusion -online -rrdim 8 -rwdim 8 -nldim 20 -nsdim 20 -sopt | ||
// mpirun -n 1 ./mixed_nonlinear_diffusion -online -rrdim 8 -rwdim 8 -nldim 20 -nsdim 20 -hrtype deim | ||
// mpirun -n 1 ./mixed_nonlinear_diffusion -online -rrdim 8 -rwdim 8 -nldim 20 -nsdim 20 -hrtype qdeim | ||
// mpirun -n 1 ./mixed_nonlinear_diffusion -online -rrdim 8 -rwdim 8 -nldim 20 -nsdim 20 -hrtype sopt | ||
// mpirun -n 1 ./mixed_nonlinear_diffusion -online -rrdim 8 -rwdim 8 -nldim 20 -nsdim 20 -ns 1 -eqp | ||
// | ||
// Relative l2 error of ROM solution at final timestep using DEIM sampling: 1.096776797994166e-08 |
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 believe this result corresponds to -hrtype deim
? Perhaps we should report the example results for Q-DEIM and S-OPT here and in the libROM webpage.
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.
My first thought was not to add it, because the QDEIM result is almost the same as DEIM. For completeness, I went ahead and added it. I agree that the webpage should be updated as well, to let users know about the QDEIM option.
I actually updated all the run times. Reporting run times is troublesome, because they vary even on the same machine. When a new result is added, all runs have to be updated for a fair comparison.
// Output message: | ||
// Elapsed time for time integration loop 1.80759 | ||
// Relative error of ROM position (x) at t_final: 5 is 0.000231698 | ||
// Relative error of ROM velocity (v) at t_final: 5 is 0.466941 | ||
// | ||
// Online phase with strong hyper-reduction: | ||
// ./nonlinear_elasticity_global_rom -online -dt 0.01 -tf 5.0 -s 14 -vs 100 -hyp -rvdim 40 -rxdim 10 -hdim 71 -nsr 100 -sc 1.00 | ||
// ./nonlinear_elasticity_global_rom -online -dt 0.01 -tf 5.0 -s 14 -vs 100 -hyp -hrtype gnat -rvdim 40 -rxdim 10 -hdim 71 -nsr 100 -sc 1.0 |
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.
Perhaps we should report the example commands and results for Q-DEIM and S-OPT here and in the libROM webpage.
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.
Done.
No description provided.