

class ImplicitMatrixContext ( object ): # By default, these matrices will represent diagonal blocks (the # (0,0) block of a 1x1 block matrix is on the diagonal).


shape # Does the local part of the candidate IS match a prefix # of the target indices? lmatch = ( candidate_size 0 : # We didn't manage to hoover up all the target indices, not a match raise LookupError ( "Unable to find %s in %s " % ( iset, ises )) return found indices candidate_size, = candidate_indices. items ()): candidate_indices = candidate. tompi4py () candidates = OrderedDict ( enumerate ( ises )) while True : match = False for i, candidate in list ( candidates. :raises LookupError: if ``iset`` could not be found in ``ises``. :returns: The indices into ``ises`` that when concatenated together produces ``iset``. :arg iset: a PETSc IS to find in ``ises``. EventDecorator () def find_sub_block ( iset, ises ): """Determine if iset comes from a concatenation of some subset of ises. From collections import OrderedDict import itertools from mpi4py import MPI import numpy from firedrake.ufl_expr import adjoint, action from firedrake.formmanipulation import ExtractSubBlock from firedrake.bcs import DirichletBC, EquationBCSplit from firedrake.petsc import PETSc from firedrake.utils import cached_property _all_ = ( "ImplicitMatrixContext", ).
