On Tue, Aug 14, 2018 at 5:32 AM Vaclav Hapla <vaclav.ha...@erdw.ethz.ch> wrote:
> Hello > > I would like to move the discussion from the PR > https://bitbucket.org/petsc/petsc/pull-requests/1076/fix-issetblocksize_general > because > it's quite a general concern. > > It's about the meaning of block size for IS. > > Barry thinks that IS block size is something completely different than Vec > block size: > 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)." > > 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. > > 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. > > 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(). > > 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. > > Opinions? > Okay, this makes it clear to me. I would prefer the understanding of blocksize that matches Vec and Mat, and to let ISBlock handle the specialized situation. Thanks, Matt > Vaclav > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>