ENH: adjust renumbering methods, extend renumberMesh options
Update to renumber methods. The user-exposed aspect is in the renumberMesh
application which now has additional options.
- Use -dry-run with -write-maps to visualize the before/after effects of renumbering (creates a VTK file).
- The
-no-fields
option to renumber the mesh only. This is useful and faster when the input fields are uniform and the -overwrite option is specified. - The
-renumber-method
allows a quick means of specifying a different default renumber method (instead of Cuthill-McKee). - The
-renumber-coeffs
option allows passing of dictionary content for the method.
Examples,
// Different ways to specify reverse Cuthill-McKee
-renumber-method RCM
-renumber-coeffs 'reverse true;'
-renumber-method CuthillMcKee
-renumber-coeffs 'reverse true;'
-renumber-coeffs 'method CuthillMcKee; reverse true;'
// Other (without dictionary coefficients)
renumberMesh -renumber-method random
// Other (with dictionary coefficients)
renumberMesh \
-renumber-method spring \
-renumber-coeffs 'maxCo 0.1; maxIter 1000; freezeFraction 0.99;'
// Other (with additional libraries)
renumberMesh -renumber-method zoltan -lib zoltanRenumber
The new -decompose
option permits a region-wise decomposition prior to renumbering. The effects of this can be seen in the following
The original cells are randomly numbered. With the -decompose
option, these can be "lumped" into regions before renumbering on a per region basis. If the region-wise renumbering is forcibly disabled (ie, -renumber-method none), it can be seen that the resulting cellIds retain the random nature of the original cell ordering. This corresponds to what decomposePar
without a subsequent renumber would do, so could be indicative that an optional renumber stage would be reasonable to add into decomposePar
in the future.
Merge request reports
Activity
changed milestone to %v2406
added enhancement label
requested review from @kuti
assigned to @kuti
mentioned in merge request !671 (merged)
- Resolved by Mark OLESEN
- Resolved by Mark OLESEN
- Resolved by Mark OLESEN
- Resolved by Mark OLESEN
- Resolved by Mark OLESEN
added 1 commit
- 61aaacd0 - ENH: adjust renumbering methods, extend renumberMesh options
mentioned in commit 05194796
Thanks to the testing and timings by @Serge with large meshes, there are a few conclusions to be made regarding the decompose + renumber idea:
It was presumed that using renumber
none
would be very fast, since it simply provides an identity map instead of the obviously more expensive Cuthill-McKee. However, it transpires that calculating the cell-cell connectivity (which is subsequently discarded) can also be associated with significant cost. This conclusion is especially the case with large number of domains.With a large number of domains, the cost of walking the mesh nFaces x nDomains becomes prohibitive.
Conclusion:
- for large number of domains (eg with the coherent format), probably much better to do separately
$ renumberMesh -decompose -renumber-method none $ mpirun -np N renumberMesh -parallel
- The followup idea of adding an optional renumber stage to decomposePar is not worth pursuing for the same reasons outlined here
- The followup idea of adding an optional renumber stage to snappyHexMash is probably still okay since the mesh is already distributed on separate ranks.
May consider having the renumber method default to
none
when-decompose
is specified, but starts to become very obscure. So leave to the user for now.- for large number of domains (eg with the coherent format), probably much better to do separately