<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 17, 2015 at 4:00 AM, Håkon Strandenes <span dir="ltr"><<a href="mailto:haakon@hakostra.net" target="_blank">haakon@hakostra.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I don't think Bitbucket sends emails or does anything about comments to commits, so I thought I could bring up a small issue here:<br>
<br>
See my comment: <a href="https://bitbucket.org/petsc/petsc/commits/056833d77d2d143230ea8833ad5b795a5f311c87?at=master" target="_blank">https://bitbucket.org/petsc/petsc/commits/056833d77d2d143230ea8833ad5b795a5f311c87?at=master</a> both to the commit itself and to file hdf5v.c:211.<br>
<br>
Short summary:<br>
I can't find any explicit default value for the basedimension2 flag recently added to the HDF5 viewer (correct me if I'm wrong). I have not read C or C++ standards closely, but unless the C/C++ standards specify that all enums always should be initialized to their first value, it seems to me that we rely on the compiler to choose a default value. Could we also risk that the basedimension2 flag gets a value that is neither PETSC_TRUE nor PETSC_FALSE, since the enum maps to an int (at least in plain C), and the int can take values different from 0 (PETSC_FALSE) and 1 (PETSC_TRUE)?<br>
<br>
I also see that the binary viewer explicitly sets a default value for all its PetscBool flags...<br></blockquote><div><br></div><div>The PetscNew call sets the memory to 0, which should give this value 0 I think.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regards,<br>
Håkon<br>
<br>
<br>
BTW:<br>
I think this flag is great, and toggle it when switching between writing plain Vecs (in which I do not want this extra dim for bs=1) and DMDA's (where I find it practical to have an extra dim for dof=1).<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>