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

  • allow_renumberingTrueIf allow_renumbering=false, node and element numbers are kept fixed until deletion

    Default:True

    C++ Type:bool

    Options:

    Description:If allow_renumbering=false, node and element numbers are kept fixed until deletion

  • bias_x1The amount by which to grow (or shrink) the cells in the x-direction.

    Default:1

    C++ Type:double

    Options:

    Description:The amount by which to grow (or shrink) the cells in the x-direction.

  • bias_y1The amount by which to grow (or shrink) the cells in the y-direction.

    Default:1

    C++ Type:double

    Options:

    Description:The amount by which to grow (or shrink) the cells in the y-direction.

  • bias_z1The amount by which to grow (or shrink) the cells in the z-direction.

    Default:1

    C++ Type:double

    Options:

    Description:The amount by which to grow (or shrink) the cells in the z-direction.

  • gauss_lobatto_gridFalseGrade mesh into boundaries according to Gauss-Lobatto quadrature spacing.

    Default:False

    C++ Type:bool

    Options:

    Description:Grade mesh into boundaries according to Gauss-Lobatto quadrature spacing.

  • ghosting_patch_sizeThe number of nearest neighbors considered for ghosting purposes when 'iteration' patch update strategy is used. Default is 5 * patch_size.

    C++ Type:unsigned int

    Options:

    Description:The number of nearest neighbors considered for ghosting purposes when 'iteration' patch update strategy is used. Default is 5 * patch_size.

  • max_leaf_size10The maximum number of points in each leaf of the KDTree used in the nearest neighbor search. As the leaf size becomes larger,KDTree construction becomes faster but the nearest neighbor searchbecomes slower.

    Default:10

    C++ Type:unsigned int

    Options:

    Description:The maximum number of points in each leaf of the KDTree used in the nearest neighbor search. As the leaf size becomes larger,KDTree construction becomes faster but the nearest neighbor searchbecomes slower.

  • nx1Number of elements in the X direction

    Default:1

    C++ Type:unsigned int

    Options:

    Description:Number of elements in the X direction

  • ny1Number of elements in the Y direction

    Default:1

    C++ Type:unsigned int

    Options:

    Description:Number of elements in the Y direction

  • nz1Number of elements in the Z direction

    Default:1

    C++ Type:unsigned int

    Options:

    Description:Number of elements in the Z direction

  • parallel_typeREPLICATEDDEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is specified on the command line REPLICATED: Always use libMesh::ReplicatedMesh DISTRIBUTED: Always use libMesh::DistributedMesh

    Default:REPLICATED

    C++ Type:MooseEnum

    Options:DEFAULT REPLICATED DISTRIBUTED

    Description:DEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is specified on the command line REPLICATED: Always use libMesh::ReplicatedMesh DISTRIBUTED: Always use libMesh::DistributedMesh

Optional 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

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

    Default:linear

    C++ Type:MooseEnum

    Options:default metis parmetis linear centroid hilbert_sfc morton_sfc

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

Partitioning Parameters

  • construct_node_list_from_side_listTrueWhether or not to generate nodesets from the sidesets (usually a good idea).

    Default:True

    C++ Type:bool

    Options:

    Description:Whether or not to generate nodesets from the sidesets (usually a good idea).

  • 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.

  • nemesisFalseIf nemesis=true and file=foo.e, actually reads foo.e.N.0, foo.e.N.1, ... foo.e.N.N-1, where N = # CPUs, with NemesisIO.

    Default:False

    C++ Type:bool

    Options:

    Description:If nemesis=true and file=foo.e, actually reads foo.e.N.0, foo.e.N.1, ... foo.e.N.N-1, where N = # CPUs, with NemesisIO.

  • patch_size40The number of nodes to consider in the NearestNode neighborhood.

    Default:40

    C++ Type:unsigned int

    Options:

    Description:The number of nodes to consider in the NearestNode neighborhood.

  • patch_update_strategyneverHow often to update the geometric search 'patch'. The default is to never update it (which is the most efficient but could be a problem with lots of relative motion). 'always' will update the patch for all slave nodes at the beginning of every timestep which might be time consuming. 'auto' will attempt to determine at the start of which timesteps the patch for all slave nodes needs to be updated automatically.'iteration' updates the patch at every nonlinear iteration for a subset of slave nodes for which penetration is not detected. If there can be substantial relative motion between the master and slave surfaces during the nonlinear iterations within a timestep, it is advisable to use 'iteration' option to ensure accurate contact detection.

    Default:never

    C++ Type:MooseEnum

    Options:never always auto iteration

    Description:How often to update the geometric search 'patch'. The default is to never update it (which is the most efficient but could be a problem with lots of relative motion). 'always' will update the patch for all slave nodes at the beginning of every timestep which might be time consuming. 'auto' will attempt to determine at the start of which timesteps the patch for all slave nodes needs to be updated automatically.'iteration' updates the patch at every nonlinear iteration for a subset of slave nodes for which penetration is not detected. If there can be substantial relative motion between the master and slave surfaces during the nonlinear iterations within a timestep, it is advisable to use 'iteration' option to ensure accurate contact detection.

Advanced Parameters

Input Files

References