LLNL / libROM

Model reduction library with an emphasis on large scale parallelism and linear subspace methods
https://www.librom.net
Other
201 stars 36 forks source link

Added global prom for maxwell equation #246

Closed andersonw1 closed 10 months ago

andersonw1 commented 11 months ago

This PR adds a global prom example for the maxwell equation to libROM (based on MFEM ex3p).

Example runs mpirun -np 8 maxwell_global_rom --offline -f 1.0 -id 0 mpirun -np 8 maxwell_global_rom --offline -f 1.1 -id 1 mpirun -np 8 maxwell_global_rom --offline -f 1.2 -id 2

Merge snapshots to make the basis mpirun -np 8 maxwell_global_rom --merge -ns 3

Run full-order model mpirun -np 8 maxwell_global_rom --fom -f 1.15

Use reduced-order model mpirun -np 8 maxwell_global_rom --online -f 1.15

For this example: Elapsed time for solving FOM: 4.906529e-01 second Elapsed time for solving ROM: 1.010420e-04 second

Relative error of ROM solution = 0.00044228

Speedup: x4855.93

siuwuncheung commented 11 months ago

There is a little red cross to the left of the commit number 34936f7, which indicates there are some failing checks. If you press it, you will see "CI / code-style (pull_request) Failing after 41s". That indicates some code styles need to be fixed, e.g. non-uniform indents, too-long lines. That's an automatic way to fix it through astyle. If you download from the source and build it, then in the parent directory of libROM just do ./scripts/stylize.sh -f ${PATH_TO_ASTYLE}

siuwuncheung commented 10 months ago

Looks good to me! Thanks @andersonw1 for the effort. Please run astyle again after addressing the comment. I'll approve it after that.