Skip to content
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

Merged
merged 14 commits into from
Oct 23, 2023
Merged

Add QDEIM option to some examples #229

merged 14 commits into from
Oct 23, 2023

Conversation

dylan-copeland
Copy link
Collaborator

No description provided.

@dylan-copeland dylan-copeland added the WIP Work in progress label Jul 14, 2023
@chldkdtn
Copy link
Collaborator

@dylan-copeland is this ready for review?

@dylan-copeland
Copy link
Collaborator Author

@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.

@dylan-copeland dylan-copeland added RFR Ready for review and removed WIP Work in progress labels Sep 12, 2023
@dylan-copeland dylan-copeland self-assigned this Sep 12, 2023
//
// 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
Copy link
Collaborator

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

Copy link
Collaborator

@axla-io axla-io left a 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.

@axla-io
Copy link
Collaborator

axla-io commented Sep 20, 2023

Sorry for the unnecessary commits. I thought that I committed on another branch.

@dylan-copeland
Copy link
Collaborator Author

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.");
Copy link
Member

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.

Copy link
Collaborator Author

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
Copy link
Member

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.

Copy link
Collaborator Author

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
Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@chldkdtn
Copy link
Collaborator

@siuwuncheung

@dylan-copeland dylan-copeland merged commit 45b7832 into master Oct 23, 2023
4 checks passed
@dylan-copeland dylan-copeland deleted the qdeim-examples branch October 23, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants