GridPartitioner

Create a uniform grid that overlays the mesh to be partitioned. Assign all elements within each cell of the grid to the same processor.

Description

Partitions the mesh by creating a grid in x,y,z and assigning each element of the mesh to a separate "cell" within the grid. This is useful when you have simple cartesian meshes and you just want to specify partitioning fairly directly. Sometimes a human is the best partitioner!

This is an example of a 2x2 grid partitioning for use on 4 processors.

2x2 GridPartitioner Example

warning

The number of cells (nx*ny*nz) MUST be equal to the number of MPI processes you're attempting to use!

How it Works

The GridPartitioner works by creating a GeneratedMesh for the "grid". That's the reason why this object takes similar input file parameters to a GeneratedMesh. The GeneratedMesh created by GridPartitioner is guaranteed to contain the original domain within it.

To assign the processor IDs the centroid of each element of the mesh to be partitioned is searched for in the GeneratedMesh. The ID of the element of the GeneratedMesh that it lies within is then assigned as the processor_id.

Input Parameters

  • partitionerSpecifies a mesh partitioner to use when splitting the mesh for a parallel computation.

    C++ Type:MooseEnum

    Options:metis parmetis linear centroid hilbert_sfc morton_sfc subdomain_partitioner

    Description:Specifies a mesh partitioner to use when splitting the mesh for a parallel computation.

Required Parameters

  • centroid_partitioner_directionSpecifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial

    C++ Type:MooseEnum

    Options:x y z radial

    Description:Specifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial

  • blocksBlock is seperated by ;, and partition mesh block by block.

    C++ Type:std::vector>

    Options:

    Description:Block is seperated by ;, and partition mesh block by block.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector

    Options:

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    Description:Set the enabled status of the MooseObject.

Advanced Parameters

Input Files

References