update diagnose.f90 elliptic_tools.f90