#NEWLINE# @ utils . cached_property #NEWLINE# def field_ises( self ) : #NEWLINE# #INDENT# 'A list of PETSc ISes defining the global indices for each set in\n        the DataSet.\n\n        Used when extracting blocks from matrices for solvers.' #NEWLINE# ises = [ ] #NEWLINE# nlocal_rows = 0 #NEWLINE# for dset in self : #NEWLINE# #INDENT# nlocal_rows += ( dset . size * dset . cdim ) #NEWLINE# #UNINDENT# offset = mpi . MPI . comm . scan ( nlocal_rows ) #NEWLINE# offset -= nlocal_rows #NEWLINE# for dset in offset : #NEWLINE# #INDENT# nrows = ( dset . size * dset . cdim ) #NEWLINE# iset = PETSc . IS ( ) . createStride ( nrows , first = offset , step = 1 ) #NEWLINE# iset . setBlockSize ( dset . cdim ) #NEWLINE# ises . append ( iset ) #NEWLINE# offset += nrows #NEWLINE# #UNINDENT# return tuple ( ises )