Repository navigation
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
||
| // Store data for comparison | ||
| flops_md(cell_index) = static_cast<Real>((2 * nnz_md + U0_md.n_elem) * t); | ||
| flops_md(cell_index) = static_cast<Real>((2 * nnz_md + 3 * U0_md.n_elem) * t); |
There was a problem hiding this comment.
Hey @jbrzensk , thank you for this PR. May I ask why the 3 here? I thought the PR was only renaming the directory path. Thanks
There was a problem hiding this comment.
Renaming and fixing the C++ code. This was skipped.
The 3 is there as an estimate for the number of FLOPs.
The solve should be:
U2_md = 2.0 * U1_md + (L_interior * U1_md) - U0_md;Let n be the number of elements in U0_md, and z be the nnz in L_interior.
2*U1_md= n flopsL_interior*U1_md= approx 2z flops. Shortcut for sparsevector. I guess technically it is (z + (z-1)).- Step 1 + sparse mat mult = n flops
- Result -
U0_md= n flops
As I write this, I see the r2_md multiplying every step. That can be pre-multiplied to save n flops per step.
Arggh, I will fix it and rename the PR to address what it is actually doing.
What type of PR is this? (check all applicable)
Description
The two-way-wave-equation example was listed in an older matlab_octave folder. Moved to the octave folder.
Related Issues & Documents
Closes #143 and #501
Added/updated tests?
_We encourage you to test all code included with MOLE, including examples.
Read Contributing Guide and Code of Conduct
[not-optional] What gif best describes this PR or how it makes you feel?