<br><br><div class="gmail_quote">On Wed, Nov 9, 2011 at 3:34 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Nov 9, 2011, at 3:30 PM, Matthew Knepley wrote:<br>
<br>
> On Wed, Nov 9, 2011 at 9:28 PM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
> On Wed, Nov 9, 2011 at 15:22, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
> So the problem is that in C++, when using a variadic function, you cannot type PETSC_NULL directly into the argument list? When would you ever<br>
> do this? If an argument to Printf() is equal to PETSC_NULL, no problem. Its only when PETSC_NULL is passed directly. Why not prevent that in<br>
> all PETSc variadic functions, which I think are only the prints.<br>
><br>
> include/petscdmcomposite.h:extern PetscErrorCode DMCompositeScatter(DM,Vec,...);<br>
> include/petscdmcomposite.h:extern PetscErrorCode DMCompositeGather(DM,Vec,InsertMode,...);<br>
> include/petscdmcomposite.h:extern PetscErrorCode DMCompositeGetAccess(DM,Vec,...);<br>
> include/petscdmcomposite.h:extern PetscErrorCode DMCompositeRestoreAccess(DM,Vec,...);<br>
> include/petscdmcomposite.h:extern PetscErrorCode DMCompositeGetLocalVectors(DM,...);<br>
> include/petscdmcomposite.h:extern PetscErrorCode DMCompositeGetEntries(DM,...);<br>
> include/petscdmcomposite.h:extern PetscErrorCode DMCompositeRestoreLocalVectors(DM,...);</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
><br>
> Yes, I am in favor of getting rid of all variadic functions and replacing them with array arguments.<br>
<br>
</div> Actually with the redesign where everything is a DM that becomes possible I think. Though a little ugly.<br></blockquote><div><br></div><div>In my opinion adding a format string is actually an acceptable solution, given all of the complications we have</div>
<div>discussed here. Using array arguments means the user has to do explicit memory management of those args,</div><div>not to mention the overhead for each call.</div><div><br></div><div>Dmitry. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<span class="HOEnZb"><font color="#888888"><br>
Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Matt<br>
><br>
> --<br>
> 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<br>
<br>
</div></div></blockquote></div><br>