Lawrence,

     In general we do not want XXXSetFromOptions() to be randomly called deep 
within constructors or other places. Ideally we want them called either when I 
user calls them directly or from another YYYSetFromOptions() that the user 
called.  We do violate this rule occasionally but we don't want new 
XXXSetFromOptions() put into the code randomly.

   Barry

> On Feb 7, 2015, at 7:57 AM, Jed Brown <[email protected]> wrote:
> 
> Lawrence Mitchell <[email protected]> writes:
>> 
>> +  ierr                        = PetscSFSetFromOptions(v->sf); CHKERRQ(ierr);
>> +  ierr                        = PetscSFSetFromOptions(v->defaultSF); 
>> CHKERRQ(ierr);
> 
> Please use PetscObjectSetOptionsPrefix on the SFs and call
> PetscSFSetFromOptions in DMSetFromOptions.
> 
>>   v->defaultSection           = NULL;
>>   v->defaultGlobalSection     = NULL;
>>   v->defaultConstraintSection = NULL;
> 

Reply via email to