diff --git a/framework/doc/content/source/partitioner/BlockWeightedPartitioner.md b/framework/doc/content/source/partitioner/BlockWeightedPartitioner.md new file mode 100644 index 000000000000..ccce48c2afe6 --- /dev/null +++ b/framework/doc/content/source/partitioner/BlockWeightedPartitioner.md @@ -0,0 +1,34 @@ + +!template load file=stubs/moose_object.md.template name=BlockWeightedPartitioner syntax=/Mesh/Partitioner/BlockWeightedPartitioner + +## Overview + +Under multiphysics environment, some mesh blocks have more variables and more work load than others . In parallel, the work +is spread out based on partitioners that assign equal number of elements to each processor. This will causes imbalanced simulations. +BlockWeightedPartitioner allow users to specify different weights for different blocks, e.g., low weights for light blocks +and high weights for heavy blocks. Usage: + +``` +[Mesh] + type = FileMesh + file = block_weighted_partitioner.e + + [Partitioner] + type = BlockWeightedPartitioner + block = '1 2 3' + weight = '3 1 10' + [] +[] +``` + +An example: + +!row! +!col! small=12 medium=6 large=3 +!media weightedpartitioner4.png caption=`Weighted partition into 4 subdomains` +!col-end! + +!col! small=12 medium=6 large=3 +!media noweightedpartitioner4.png caption=`Regular partition into 4 subdomains` +!col-end! +!row-end! diff --git a/framework/doc/content/source/partitioner/noweightedpartitioner4.png b/framework/doc/content/source/partitioner/noweightedpartitioner4.png new file mode 100644 index 000000000000..2bdbee26c0b7 Binary files /dev/null and b/framework/doc/content/source/partitioner/noweightedpartitioner4.png differ diff --git a/framework/doc/content/source/partitioner/weightedpartitioner4.png b/framework/doc/content/source/partitioner/weightedpartitioner4.png new file mode 100644 index 000000000000..4d6636345e32 Binary files /dev/null and b/framework/doc/content/source/partitioner/weightedpartitioner4.png differ diff --git a/test/tests/partitioners/block_weighted_partitioner/gold/block_weighted_partitioner_out_distributed.e b/test/tests/partitioners/block_weighted_partitioner/gold/block_weighted_partitioner_out_distributed.e new file mode 100644 index 000000000000..53bb88368d8c Binary files /dev/null and b/test/tests/partitioners/block_weighted_partitioner/gold/block_weighted_partitioner_out_distributed.e differ diff --git a/test/tests/partitioners/block_weighted_partitioner/tests b/test/tests/partitioners/block_weighted_partitioner/tests index 85d8bc504746..1851e6cb2230 100644 --- a/test/tests/partitioners/block_weighted_partitioner/tests +++ b/test/tests/partitioners/block_weighted_partitioner/tests @@ -1,5 +1,5 @@ [Tests] - design = '/PetscExternalPartitioner.md' + design = '/BlockWeightedPartitioner.md' issues = '#13675' [./block_weighted_partitioner] @@ -10,6 +10,21 @@ petsc_version = '>=3.10.0' min_parallel = 4 max_parallel = 4 + # different mode generates different partition + mesh_mode = REPLICATED [../] - + + [./block_weighted_partitioner_distributed] + requirement = 'The system shall support block weighted partitioner with distributed mesh' + type = 'Exodiff' + input = 'block_weighted_partitioner.i' + exodiff = 'block_weighted_partitioner_out_distributed.e' + cli_args = 'Outputs/file_base=block_weighted_partitioner_out_distributed' + petsc_version = '>=3.10.0' + min_parallel = 4 + max_parallel = 4 + # different mode generates different partition + mesh_mode = DISTRIBUTED + [../] + []