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

Enable EQP for nonlinear elastic example #218

Merged
merged 120 commits into from
Jan 8, 2024
Merged

Enable EQP for nonlinear elastic example #218

merged 120 commits into from
Jan 8, 2024

Conversation

axla-io
Copy link
Collaborator

@axla-io axla-io commented Jun 1, 2023

This PR adds EQP based hyperreduction to the nonlinear elastic example.

Current steps to take:

  • Implement EQP hyperrreduction in main file

    • Sketch implementation following mixed_nonlinear_diffusion
    • Make sure CI tests run
    • Verify
  • Implement SetupEQP_snapshots

    • Sketch
    • Verify implementation
  • Implement HyperelasticNLFIntegrator_ComputeReducedEQP

    • Sketch
    • Verify implementation
  • Fast reduced EQP

  • Remember to do formatting

Future work

  • Preconditioning for NNLS
  • Subsampling

@axla-io axla-io added the WIP Work in progress label Jun 1, 2023
@chldkdtn
Copy link
Collaborator

@axla-io is this ready for review?

@axla-io
Copy link
Collaborator Author

axla-io commented Aug 23, 2023

@chldkdtn Not yet! I still have to refactor the code so that it maintains good practices for .cpp and .hpp files. I get a compilation error locally for my latest commit, although it seems to compile on GitHub actions. I'll try to do this change within the week.

@axla-io
Copy link
Collaborator Author

axla-io commented Aug 28, 2023

@chldkdtn I fixed the .hpp style issue and it should be ready for review soon. I want to make a commit cleaning up the repo a bit and then I'll request a review.

@axla-io axla-io changed the title WIP: Enable EQP for nonlinear elastic example Enable EQP for nonlinear elastic example Oct 24, 2023
@axla-io axla-io added enhancement and removed WIP Work in progress labels Oct 24, 2023
@dylan-copeland
Copy link
Collaborator

@axla-io to resolve the conflicts, please do git pull origin master.

.gitignore Outdated Show resolved Hide resolved
@chldkdtn
Copy link
Collaborator

@dylan-copeland has just informed me that EQP implementation for nonlinear elasticity has dependency to FOM scale, but it should be easy to remove the dependency. It would be ideal to remove that dependency in this PR so that we can use the optimized code for hyper-reduction comparison paper as well.

@axla-io
Copy link
Collaborator Author

axla-io commented Dec 12, 2023

@chldkdtn Yes, I saw @dylan-copeland s implementation in mixed_nonlinear_diffusion.
Let's implement that in a second PR, since this is already a big one. I'm currently focusing on getting a Julia SciML PR in but I can take a look once that merges.

* implementation works and gives speed up

* Removed unnecessary variables

* Final benchmark
@axla-io
Copy link
Collaborator Author

axla-io commented Dec 22, 2023

I just merged the optimized EQP lifting from a sub-branch into this one, so now the PR is complete and ready to merge.
@chldkdtn @dylan-copeland

@mjkim1001
Copy link
Collaborator

I was asked to review the PR, and it looks good to me!

@mjkim1001 mjkim1001 closed this Jan 8, 2024
@dylan-copeland dylan-copeland reopened this Jan 8, 2024
@axla-io axla-io merged commit ba24168 into master Jan 8, 2024
4 checks passed
@axla-io axla-io deleted the nl-elast-eqp branch January 8, 2024 20:10
andersonw1 pushed a commit that referenced this pull request Jan 8, 2024
* initial commit

* Updated ROM operator class definition
 and input arguments

* EQP hyperreduction setup

* Added hyperreduction until line 1000

* Setting BCs

* Finished implementation in main

* Started ROM operator initialization
Need to review before finishing

* Gone through the code
and implemented what was straightforward

* Mult_hyperreduced

* small fixes
to make consistent with class definition

* removed eqp_lifting code, since it's not necessary

* Started eqp coefficient computation implementation
And made fast calculation TODO

* Updated SetupEQP to make tests run

* Some more fixes for the compiler

* Changed rrdim -> rxdim

* Started SetupEqp_snapshots
for hyperelastic nonlinear operator

* Added sketch for compute reduced eqp

* Code compiles

* Added element function to G row computation

* Testing element vector error

* Debugging.
Vshape not implemented for this class...

* fixed bug

* Explicitly adding model to eqp loop

* segfault fix

* segfault fix 2

* debug segfault

* actual debug fix

* perhaps segfault fix

* small fix

* New test.

* testing

* changed back

* testing back again

* Hopefully

* Finished writing the test.

* Fixed compilation

* Debugging elvect size

* passing by reference

* Fix for element vector

* check all errors

* Synced with hyperelasticintegrator.

* Divide error by two

* changed points to check error

* Clean up

* testing SetupEQPSnapshots

* testing errors for NNLS

* small fix

* removed testing

* Remove normalize constraints

* Fixed segfault

* Reduced EQP is building

* Running but wrong

* Runs!

* Fixed some issues

* rank-myid fix

* Syntax improvements

* fixed bug for v0

* small fix

* Implemented time windowing

* Added command line option for time windowing

* Added EQP command line examples

* Cleaned up code

* Sketch for optimized EQP

* Continued fast eqp implementation

* Improved regular EQP

* V-basis speedup

* Storing DS now

* Solved segmentation fault in non eqp hyperreduction

* Adding QDEIM option to some examples.

* updated gitignore

* Matrix multiplication optimization

* Tested precompute optimization

* Numbering works now.

* Testing .hpp fix again

* Fixed .hpp style issue

* Delete the RomOperator to remove a memory leak

* Updated RomOperator structure
to have less leaks in timestepping

* Cause of segfault error found

* Segfault fixed

* Removed EQP bug

* Add x0 to setupEQP

* add matrix row/col rescaling methods

* normalize NNLS constraints

* Added x0

* Fixed bug in NNLS constraint forming loop.

* Max iters increased

* improved eqp speed

* resetting temp variable now

* Moved temporary variable to the correct position

* Minor formatting changes

* Removed duplicate lines in examples

* build succeeds

* Updated formatting

* Astyle 3.1.

* updated .gitignore

* ++ increment

* Removed ReducedSystemOperator

* Removed unnecessary comments

* Added consts

* Added more ++ increments

* Removed unnecessary HSINV

* Comments

* LibROM native read / write

* Added pointer deletion

* librom runs

* New benchmarks

* elementmatrix first implementation

* Construct em outside loop

* Added element matrices to ROM class

* Reduced EQP fast uses em

* Em on everything

* Debugged EQP

* Formatting

* Removed unnecessary comment

* Removed more unnecessary comments

* Implemented subsampling

* measure elapsed time for EQP

* Measure elapsed time for all methods

* Update .gitignore

* Optimized lifting of FOM dimension in Nonlinear elasticity EQP (#259)

* implementation works and gives speed up

* Removed unnecessary variables

* Final benchmark

---------

Co-authored-by: Dylan Copeland <[email protected]>
Co-authored-by: Chris Vales <[email protected]>
Co-authored-by: Dylan Copeland <[email protected]>
andersonw1 pushed a commit that referenced this pull request Apr 2, 2024
* initial commit

* Updated ROM operator class definition
 and input arguments

* EQP hyperreduction setup

* Added hyperreduction until line 1000

* Setting BCs

* Finished implementation in main

* Started ROM operator initialization
Need to review before finishing

* Gone through the code
and implemented what was straightforward

* Mult_hyperreduced

* small fixes
to make consistent with class definition

* removed eqp_lifting code, since it's not necessary

* Started eqp coefficient computation implementation
And made fast calculation TODO

* Updated SetupEQP to make tests run

* Some more fixes for the compiler

* Changed rrdim -> rxdim

* Started SetupEqp_snapshots
for hyperelastic nonlinear operator

* Added sketch for compute reduced eqp

* Code compiles

* Added element function to G row computation

* Testing element vector error

* Debugging.
Vshape not implemented for this class...

* fixed bug

* Explicitly adding model to eqp loop

* segfault fix

* segfault fix 2

* debug segfault

* actual debug fix

* perhaps segfault fix

* small fix

* New test.

* testing

* changed back

* testing back again

* Hopefully

* Finished writing the test.

* Fixed compilation

* Debugging elvect size

* passing by reference

* Fix for element vector

* check all errors

* Synced with hyperelasticintegrator.

* Divide error by two

* changed points to check error

* Clean up

* testing SetupEQPSnapshots

* testing errors for NNLS

* small fix

* removed testing

* Remove normalize constraints

* Fixed segfault

* Reduced EQP is building

* Running but wrong

* Runs!

* Fixed some issues

* rank-myid fix

* Syntax improvements

* fixed bug for v0

* small fix

* Implemented time windowing

* Added command line option for time windowing

* Added EQP command line examples

* Cleaned up code

* Sketch for optimized EQP

* Continued fast eqp implementation

* Improved regular EQP

* V-basis speedup

* Storing DS now

* Solved segmentation fault in non eqp hyperreduction

* Adding QDEIM option to some examples.

* updated gitignore

* Matrix multiplication optimization

* Tested precompute optimization

* Numbering works now.

* Testing .hpp fix again

* Fixed .hpp style issue

* Delete the RomOperator to remove a memory leak

* Updated RomOperator structure
to have less leaks in timestepping

* Cause of segfault error found

* Segfault fixed

* Removed EQP bug

* Add x0 to setupEQP

* add matrix row/col rescaling methods

* normalize NNLS constraints

* Added x0

* Fixed bug in NNLS constraint forming loop.

* Max iters increased

* improved eqp speed

* resetting temp variable now

* Moved temporary variable to the correct position

* Minor formatting changes

* Removed duplicate lines in examples

* build succeeds

* Updated formatting

* Astyle 3.1.

* updated .gitignore

* ++ increment

* Removed ReducedSystemOperator

* Removed unnecessary comments

* Added consts

* Added more ++ increments

* Removed unnecessary HSINV

* Comments

* LibROM native read / write

* Added pointer deletion

* librom runs

* New benchmarks

* elementmatrix first implementation

* Construct em outside loop

* Added element matrices to ROM class

* Reduced EQP fast uses em

* Em on everything

* Debugged EQP

* Formatting

* Removed unnecessary comment

* Removed more unnecessary comments

* Implemented subsampling

* measure elapsed time for EQP

* Measure elapsed time for all methods

* Update .gitignore

* Optimized lifting of FOM dimension in Nonlinear elasticity EQP (#259)

* implementation works and gives speed up

* Removed unnecessary variables

* Final benchmark

---------

Co-authored-by: Dylan Copeland <[email protected]>
Co-authored-by: Chris Vales <[email protected]>
Co-authored-by: Dylan Copeland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants