On Sat, Feb 9, 2019 at 3:17 AM Smith, Barry F. via petsc-dev < [email protected]> wrote:
> > Hmm, why is this check wrong (though it may be incomplete)? Is there an > example where it triggers an error when it shouldn't? > > It is my understanding that the check is there to make sure if the user > requested a particular matrix type then it won't return a different type > that is unexpected for the user (the AIJ checks are just to handle MATAIJ > vs MATSEQAIJ, MATMPIAIJ). > First, the logic is hard to read. It checks if A is mattype. I would think it would error if this is not true. However, it further checks whether its SEQAIJ or MPIAIJ, and only errors if it is not. This seems to say, if the use specifies a mattype, like CUSPARSE, but we give back AIJ, everything is alright? I am reading this wrong? Matt > Barry > > > > On Feb 8, 2019, at 5:29 AM, Stefano Zampini via petsc-dev < > [email protected]> wrote: > > > > I don’t understand the need of these checks (tacky and incomplete…, as > per the comment) > > > > > https://bitbucket.org/petsc/petsc/src/75aeaa18afd73be7f3020f94b788241b9e0ba3d7/src/dm/impls/shell/dmshell.c#lines-197 > > > > Why are these checks needed? I’m inclined to remove these lines, but I > would like some comments before doing it. > > -- 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.cse.buffalo.edu/~knepley/>
