[petsc-dev] I question the existence of PetscErrorCode (*createlocaltoglobalmapping)(DM); PetscErrorCode (*createlocaltoglobalmappingblock)(DM);

Barry Smith bsmith at mcs.anl.gov
Wed Mar 20 09:18:57 CDT 2013


On Mar 20, 2013, at 9:14 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 
> On Wed, Mar 20, 2013 at 9:02 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>    This is wrong and needs fixing, having one name for the public interface and a different name in the function table. You need to change the name in the function table to get() and DMCreateLocalToGlobalMapping_Composite() and friends to use the name DMGet…
> 
> That would imply that each DM* implementation would need to manage caching, which is a bit of boilerplate, but perhaps okay in the interest of consistency. Or do we start/reinforce a convention that some implementation Get methods are called at most once because the outer part manages caching?

   No. Just change the name but leave everything else identical to the way it is now. There is nothing wrong with the way it is implemented, just the inconsistent naming.

   Barry

>   
>    Having this inconsistent naming already wasted my time, and your time responding to the email and everyone else's time in having to delete the email. I'd fix it but git workflow is too hard so you need to fix it. Consistency reduces complexity.
> 
> I don't mind making the change, but here's the process to get a new branch into 'next':
> 
> $ git checkout -b name/dmgetlocaltoglobalmapping master
> change source, test, and commit
> $ git checkout next
> $ git merge name/dmgetlocaltoglobalmapping
> $ test
> $ git push origin next name/dmgetlocaltoglobalmapping
> 




More information about the petsc-dev mailing list