idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.71k stars 1.04k forks source link

PolycrystalCircles can fail when specific particles are clipped off from the domain #18950

Open permcody opened 2 years ago

permcody commented 2 years ago

Bug Description

PolycrystalCircles can fail when there are more particles in a file than are used in the final problem description. Specifically if entire grains are outside of the final domain, this can lead to few grains than IDs, which creates an indexing problem when assigning order parameters (graph coloring).

Steps to Reproduce

An input file from the SPS LDRD was supplied to reproduce the problem, but a new smaller test case will be included that also replicates the issue as part of the patch.

Impact

The problem is more widespread than just PolyCrystal circles. It appears that any initial condition that relies upon PolyCrystalUserObject base would run into issues if there are gaps in the particle/grain number when IDs are supplied. Many of the existing ICs don't assign IDs so the problem is somewhat isolated.

permcody commented 2 years ago

Tag @laagesen.