CASL / Futility

VERA Fortran Utilities
Other
44 stars 20 forks source link

Relaxed nnz requirement on serial banded matrices #290

Closed mattkab2 closed 3 years ago

mattkab2 commented 3 years ago

The serial banded matrix requires an exact nnz value count to function. However, this was improved for the parallel versions, which instead treat nnz as an upper bound.

This MR updates the serial behavior to match the parallel behavior, which resolves several ongoing problems with implementing native CMFD in the serial debug test cases.

djabaay commented 3 years ago

Quoting @mattkab2 from our offline conversation in regards to changing the DBC from <= to <:

I guess it would be more accurate to say nnz is the max nonzeros the matrix can hold. The counter starts at zero when initialized 11:21 Then when set is called, it is incremented and iTmp(counter) gets set 11:21 But iTmp is allocated to have nnz entries, so counter can never be equal to nnz at the start of the set call or there will be a memory access error 11:22 At least, before the assemble routine is called. After assemble is called it is assumed that you're modifying an existing entry

This fully explains what is going on, and makes sense to me.

@aarograh Do you want to take a quick look through before merging?

mattkab2 commented 3 years ago

@aarograh Mind taking a quick look?

aarograh commented 3 years ago

@mattkab2 I don't see any issues that need to be addressed with these changes. We're tagging VERA 4.3-RC1 soon, so I'm going to hold off merging this until after the tag just to be on the safe side. I'll merge as soon as I know we've tagged.

aarograh commented 3 years ago

Sounds like things are going a bit slower with the tag than I realized, so I'm going ahead with this. We have time to back it out if something were to go wrong.