Vaclav,
Please don't do this as proposed. Please learn about all the partitioner
interfaces in PETSc before attempting a refactorization.
Barry
> On Nov 6, 2017, at 7:25 AM, Matthew Knepley <[email protected]> wrote:
>
> On Mon, Nov 6, 2017 at 8:09 AM, Vaclav Hapla <[email protected]>
> wrote:
> Hello
>
> The whole PetscPartitioner class sources are part of
> src/dm/impls/plex/plexpartition.c, mixed together with some DMPlex* functions.
> If you don't mind, I would move the PetscPartitioner* stuff into the separate
> file petscpartitioner.c
> (in future, it could be even moved to a separate directory).
>
> Yes, that would be fine. I would say that
>
> src/dm/utils/petscpartitioner.c
>
> would be fine with me.
>
> I would also like to
> * add PetscPartitioner{Add,Set,Get}OptionsPrefix,
>
> Yes.
>
> * create the partitioner lazily in DMPlexGetPartitioner, followed by
> PetscObjectIncrementTabLevel, PetscLogObjectParent and
> PetscPartitionerSetOptionsPrefix calls,
>
> Yes. I am not sure that it helps anything to create the object later. Waiting
> the set the type is fine.
>
> * edit src/dm/impls/plex/examples/tutorials/ex5.c so that it calls
> DMSetFromOptions right after DMPlexCreateFromFile, in order to make the
> partitioner changeable from options.
>
> I am not in favor of this one. I prefer you call
>
> ierr = PetscPartitionerSetFromOptions(part);CHKERRQ(ierr);
>
> there, as in SNES ex12. Refinement happens inside the SetFromOptions(), and
> usually people want this after distribution.
>
> Thanks,
>
> Matt
>
> Do you have anything against?
>
> Vaclav
>
>
>
> --
> What most experimenters take for granted before they begin their experiments
> is infinitely more interesting than any results to which their experiments
> lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/