WIP: adds option to partition from an existing binary coloring file #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@raovgarimella I'd like to add a capability to partition based on a user-provided file. The attached pull request works in the one simple file example I've tried. It is a bit weird because there is no way of providing MESH_Get_Partition with a filename option, so currently the filename is hard-coded as "./coloring.bin".
The file format is simply a bunch of ints, one per region, defining the color (from 0 to NPROC).
The implementation simply mallocs parts, then reads it from file in a single block. To write this file, one must write a C binary file, which can be done in C or in python, e.g. for a four-cell problem:
At first glance this worked for me, and allowed meshconvert to partition this file as requested (using partition-method=3).