You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iMOD-WQ supports a recursive bisection cut. This has the nice property of resulting in rectangular partitions, which aligns reasonably well with structured topologies.
Here is a basic implementation that results in a label array:
But anyway, this scheme also works for unstructured grids; instead of cutting by row and column, we'd cut by x and y bounds. It might make more sense to add this xugrid instead as an alternative scheme to METIS partioning.
The most controversial subject is what to do in case the number of partitions isn't a power of 2. An easy way around is to sort by some measure and then bisect some partitions first, e.g. those with the largest weight.
I would expect this to be noticable inferior to METIS, since METIS doesn't need this "rounding off" when the desired number of partitions isn't a power of two.
The text was updated successfully, but these errors were encountered:
Talking to Jarno: in case the number of domains is not a power of two, we can also use a prime factorization. N factors means N partition iterations; we can still easily the use the binary search method of search sorted. Simply divide the total weight by the factor of the iteration, then call searchsorted (which supports vectorized searches anyway). This yields the indices to partition at, and we get a variable number of partitions per iteration. It's no longer a bisection then, but whatever.
The largest number is generally small, so a simple division check should suffice for the factorization.
This won't necessarily yield too pretty results when the number of partitions is prime; e.g. 5, 7 or 13 will just result in that many partitions along the x-axis. We can add a keyword to control this behavior. E.g. always do recursive; or try the factorization and if we end up with a large prime factor, fall back to the bisection method.
Another concern for structured domains: we should potentially eliminate NoData rectangles to decrease memory overhead.
Uh oh!
There was an error while loading. Please reload this page.
iMOD-WQ supports a recursive bisection cut. This has the nice property of resulting in rectangular partitions, which aligns reasonably well with structured topologies.
Here is a basic implementation that results in a
label
array:But anyway, this scheme also works for unstructured grids; instead of cutting by row and column, we'd cut by x and y bounds. It might make more sense to add this xugrid instead as an alternative scheme to METIS partioning.
The most controversial subject is what to do in case the number of partitions isn't a power of 2. An easy way around is to sort by some measure and then bisect some partitions first, e.g. those with the largest weight.
I would expect this to be noticable inferior to METIS, since METIS doesn't need this "rounding off" when the desired number of partitions isn't a power of two.
The text was updated successfully, but these errors were encountered: