> On Feb 8, 2019, at 2:37 PM, Matthew Knepley <[email protected]> wrote: > > On Fri, Feb 8, 2019 at 6:30 AM Stefano Zampini via petsc-dev > <[email protected] <mailto:[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 > > <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. > > This even looks wrong to me. Why would we accept a type different from the > actual matrix type? >
The only reason I could think of is DMSetMatType(shell,type1); DMCreateMatrix(shell,&A); DMSetMatType(shell,type2); DMCreateMatrix(shell,&B); // B is type1, not type2 > Matt > > -- > 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/>
