无法在 FIPY 中重现球形网格的结果

Unable to reproduce results for spherical grid in FIPY

我正在尝试重现 post 的结果(考虑到 jeguyer 在回答中提供的修复)。但是当我尝试 运行 完全相同的代码时,我收到以下警告:

/home/dmitry/~./conda/envs/FIPY/lib/python3.9/site-packages/fipy/viewers/matplotlibViewer/matplotlibViewer.py:195: UserWarning: Matplotlib is currently using module://matplotlib_inline.backend_inline, which is a non-GUI backend, so cannot show the figure.
  self.fig.show()
/home/dmitry/~./conda/envs/FIPY/lib/python3.9/site-packages/fipy/variables/arithmeticCellToFaceVariable.py:32: RuntimeWarning: invalid value encountered in subtract
  return (cell2 - cell1) * alpha + cell1
/home/dmitry/~./conda/envs/FIPY/lib/python3.9/site-packages/fipy/variables/faceGradVariable.py:124: RuntimeWarning: invalid value encountered in subtract
  N = (N2 - numerix.take(self.var, id1, axis=-1)) / dAP

X_ca 的结果数组全部由 -inf 组成。 有什么办法可以解决吗?提前谢谢你。

中提到的您链接的问题:

Some solvers don't like the spherical mesh, probably because of the enormous range in cell volumes. The SciPy LinearLUSolver seems to work. Judicious preconditioning might help other solvers.

SciPy LU 求解。其他求解器,例如 PETSc LU 则没有。当您在 Windows 上求解时,默认情况下您会得到 SciPy 个求解器。 Ubuntu 和 macOS 默认为 PETSc。

我不知道如何让其他求解器工作。