On Fri, Mar 6, 2015 at 4:41 PM Jed Brown <[email protected]> wrote:
> Dmitry Karpeyev <[email protected]> writes: > > This is trickier than it might appear: nonzerostate effectively counts > the > > global number of nonzeros. The PC will rebuild if its state is stale, but > > it will reuse matrices (e.g., subdomain matrices in PCASM) if > nonzerostate > > is up to date. This works if the sparsity pattern never drops nonzeros, > > but that's no longer true if reset is allowed. I can reset a matrix, > > preallocate and assemble it so that the global number of nonzeros will be > > the same as before the resetting, but local sparsity patterns will > change. > > This could happen, for example, when I have moving particles or, less > > exotically, when I have elastic contact and nodes move past each other. > > That will break PCASM. > > On pretty simple and reliable solution would be to take a cryptographic > hash of the row/col arrays. I assume BG is really atrocious at hashing, > but is it so bad that this is not viable? (There are several places > where we use kinda fragile state counters or trust the user, but hashes > would make rebuilding more reliable and transparent.) > This sounds interesting. The problem with using this in maint that it is too intrusive, and for master we can have a simpler (and guaranteed) fix of keeping a separate 'reset' counter. Together with 'nonzerostate' it provides an unambiguous discriminator for the PC to base its rebuild decisions on.
