[petsc-dev] Matt, broken use of DMSetDimension() in next

Barry Smith bsmith at mcs.anl.gov
Thu Aug 21 13:25:57 CDT 2014

On Aug 21, 2014, at 1:02 PM, Jed Brown <jed at jedbrown.org> wrote:

> Barry Smith <bsmith at mcs.anl.gov> writes:
>>   Matt,
>> c73cfb54 src/dm/impls/da/dacreate.c (Matthew Knepley    2014-07-31 16:25:43 -0500 274)     ierr = DMSetDimension(da, da->dim);CHKERRQ(ierr);
>> It should be dd->dim, not da->dim.  
> What?  There is no member "dim" in DM_DA.

  Ok, but it sure as hell cannot be da->dim because the da was just created in the line above and has not had its dim set yet. So the code is setting the da->dim value from the (not yet set) da->dim value. 

  This breaks dozens of the next tests and would have been detected with any rudimentary testing before being pushed.


More information about the petsc-dev mailing list