As a solution, I was thinking about implementing a function which, given a sparse matrix with incompatible indices and the "wished" IndexSet, makes a global communication to generate a "compatible" matrix. Is this reasonable? Are the better approaches? Or maybe Trilinos can already handle this situation and it is only a matter of implementation in deal.II?
In a parallel setting, A and B need not have matching distributions, but C needs to have the same row-map as A.
Assert(inputleft.n() == inputright.m(),
ExcDimensionMismatch(inputleft.n(), inputright.m()));
Assert(inputleft.domain_partitioner().SameAs(
inputright.range_partitioner()),
ExcMessage("Parallel partitioning of A and B does not fit."));