Troubleshooting

One or more cells have an invalid least squares tensor

You can encounter an error message similar to the following:

Invalid least squares tensor in cell with Local Index 193495 in region inlet on partition 19

This error comes from the least squares (reconstruction) gradient calculation. When the least squares tensor is inverted using the Jacobi method, this error indicates that the tensor is invalid, and the algorithm cannot proceed. Since the least squares tensor is derived from geometrical considerations, the error signifies an invalid cell. Diagnose and repair or regenerate the mesh.

You can use the information in the error message to identify the problem:

  • Create a user field function with the following definition:

    ($LocalCellIndex == 193495) && (PartitionID == 19)

  • Create a threshold derived part where this quantity equals 1.

These steps help you visualize the cell. The cell can be flat, and/or have almost no neighboring cells. In addition, proximity to a poorly intersected interface can contribute to the bad cell.