[petsc-dev] changed ISCreateGeneral/NC/WithArray()

Barry Smith bsmith at mcs.anl.gov
Sun Oct 3 18:17:52 CDT 2010


On Oct 3, 2010, at 6:12 PM, Jed Brown wrote:

> Here at least PETSC_COPY_MODE doesn't really make sense as anything other than an immediate in which case the user is getting no extra flexibility thought the condensed API.

   I don't understand this sentence.  It is not my intention that the single function has more flexibility then having the three functions, just the same flexibility in a more user friendly way.

> Also, separate functions can actually be const-correct. As I see it, the only downside of separate functions (wrapping a common backend) is having separate man pages.

   Well, what does it mean to be const correct in the NC and WithArray case? The public interface with it declared as const is correct because the IS is not allowed to change those values ever.  So I think the current const is correct.

   Barry

> 
> Jed
> 
> 
>> On Oct 4, 2010 1:00 AM, "Lisandro Dalcin" <dalcinl at gmail.com> wrote:
>> 
>> On 3 October 2010 19:51, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> >
>> >   Well it is always "with array...
>> 
>> I'm just thinking on user convenience...
>> 
>> >
>> >   Regarding having two routines: I found having three almost identical routines unneededly comp...
>> 
>> I definitely agree.
>> 
>> >
>> > You still want to have two routines, one is just a subset of the functionality of the second. T...
>> 
>> If we were using C++, don't you think we could overload
>> ISCreateGeneral? But we are in C, and I see that
>> ISCreateGeneralWithArray() as a developer-level call, while
>> ISCreateGeneral() looks more like an user-level-call.
>> 
>> I'm proposing making ISCreateGeneral() a wrapper for
>> ISCreateGeneralWithArray(). I do not think that the redundancy is too
>> much of a trouble in such cases.
>> 
>> >   I do appreciate your suggestions, please keep on having them even if they don't always convince...
>> 
>> Well, I'm still trying to convince you :-)
>> 
>> >
>> >   Barry
>> >
>> > On Oct 3, 2010, at 5:45 PM, Lisandro Dalcin wrote:
>> >
>> >> On 3 October 2010 14:57, Ba...
>> 
> 




More information about the petsc-dev mailing list