Skip to content

Question on OwnAndGhostIndices initialization #138

Answered by fverdugo
cmhamel asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @cmhamel,

I would recommend not using OwnAndGhostIndices, unless really needed (arbitrary partitions). You can create a partition without ghosts with uniform_partition or variable_partition, and then add ghosts with function union_ghost. In this way, ghost ids are always numbered after own ids at the local level, and global ids are ordered by rank id. This is pretty much what PETSc considers, which should be enough in most of the cases.

If you really need a completely arbitrary partition, then use OwnAndGhostIndices. If you need to automatically discover ghost ids from the global ids like in II in your example, you need to provide global_to_owner. This is a vector containing the owner …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cmhamel
Comment options

@fverdugo
Comment options

Answer selected by fverdugo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants