add helper function developed in sim.libSpatialSEIR for convergence checking