Add MeshTopology::ghost_mode()

Issue #552 resolved
Jan Blechta created an issue

Method

std::string MeshTopology::ghost_mode() const;

returning ['none', 'shared_vertex', 'shared_facet'] could be added. This can be helpful for user programs which need to check it and possibly also in DOLFIN internals.

The task seems to be pretty easy but there should be an agreement on the interface. For instance, one might want to use rather enum, but this doesn't play well with stringy parameters['ghost_mode'].

More complicated task (not to be solved here) is providing ghost mode parameter at construction time. Usage of global parameter is not optimal.

Comments (9)

  1. Chris Richardson

    Yes, it should be a property of the Mesh and not a global parameter. I'm also very happy with strings for things like this.

  2. Prof Garth Wells

    Yes, it's bad as a parameter, but we always planned to change it.

    I had something more abstract than

    std::string MeshTopology::ghost_mode() const;
    

    in mind. I'd like to return the type of 'ghost' connectivity, e.g. vertex-vertex versus facet-facet, and the depth (i.e., the number of ghost layers).

  3. Jan Blechta reporter

    Nice. Maybe more abstractly, mapping of connectivity to depth. One could like to have, for instance, 2 levels of vertex-vertex and 1 level of facet-facet simultaneously. Maybe a bit overkill.

  4. Prof Garth Wells

    We did something similar for colouring with a std::vector to represent the 'graph' connectivity.

  5. Jan Blechta reporter

    Implemented simple std::string Mesh::ghost_mode() const in ec44213. Documented to be eventually removed/changed for internal library use.

    If in a need for more abstract description, please reopen or open a new issue.

  6. Log in to comment