<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Aug 14, 2018 at 5:32 AM Vaclav Hapla <<a href="mailto:vaclav.hapla@erdw.ethz.ch">vaclav.hapla@erdw.ethz.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div>Hello<div><br></div><div>I would like to move the discussion from the PR <a href="https://bitbucket.org/petsc/petsc/pull-requests/1076/fix-issetblocksize_general" target="_blank">https://bitbucket.org/petsc/petsc/pull-requests/1076/fix-issetblocksize_general</a> because it's quite a general concern.</div><div><br></div><div>It's about the meaning of block size for IS.</div><div><br></div><div>Barry thinks that IS block size is something completely different than Vec block size:</div><div>Blocked IS "consists of continous runs of entries where the first entry of a run is divisible by the bs so for example: for a block size of 2 the IS 0 1 4 5 10 11 is a block IS. 0 1 3 5 10 11 does not have a block size. Another way of looking at it is that a ISGeneral with a given blocksize can be converted to a ISCreateBlock() while other ISs are not (except with the trivial block size of 1)."</div><div><br></div><div>Barry originally wanted to enforce this property for ISGENERAL. But I say it's only checked in ISSetBlockSize_General() under PETSC_DEBUG and only if indices are set before (see the PR description and diff), and from documentation it’s also not really obvious. There is otherwise nothing which would prevent one from breaking the "block-wise contiguity" requirement.</div><div><br></div><div>At least Matt and other contributors to HDF5 IO for IS and DMPlex (including me) grasped the same meaning of "blocksize" as Vec has without that additional requirement. In this context, it's used just as an "integer vector". For instance, in the dataset /viz/topology/cells in DMPlex HDF5 IO each block is an element and each entry is a vertex index.</div><div><br>My opinion is that if anybody wants to have IS with Barry's original meaning of "blocked", they can just use ISCreateBlock() which really enforces "block-wise contiguity" by API and data structure. There could be also an additional standalone function ISCheckBlockwiseContiguous() with the same checking code as is currently in ISSetBlockSize_General().</div><div><br></div><div>On the other hand, if I’m thinking about any alternative, it could perhaps be PetscSection. But it would be quite some manpower to implement PetscSection IO and employ it in DMPlex IO. And I'm not sure about the worth of the outcome for users.</div></div><div><br></div><div>Opinions?</div></div></blockquote><div><br></div><div>Okay, this makes it clear to me.</div><div><br></div><div>I would prefer the understanding of blocksize that matches Vec and Mat, and to let ISBlock handle the specialized situation.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div>Vaclav</div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div>