def dt_psi_constraint_preserving_spherical_radiation(face_mesh_velocity, normal_covector, normal_vector, psi, phi, inertial_coords, gamma1, gamma2, lapse, shift, dt_psi, dt_pi, dt_phi, d_psi, d_phi):
    char_speed_psi = char_speed_vpsi(gamma1, lapse, shift, normal_covector)
    if (face_mesh_velocity is not None):
        char_speed_psi -= np.dot(normal_covector, face_mesh_velocity)
    return (np.dot(normal_vector, (d_psi - phi)) * min(0.0, char_speed_psi))
def dt_psi_constraint_preserving_spherical_radiation(face_mesh_velocity, normal_covector, normal_vector, psi, phi, inertial_coords, gamma1, gamma2, lapse, shift, dt_psi, dt_pi, dt_phi, d_psi, d_phi):
    char_speed_psi = char_speed_vpsi(gamma1, lapse, shift, normal_covector)
    if (face_mesh_velocity is not None):
        char_speed_psi -= np.dot(normal_covector, face_mesh_velocity)
    return (np.dot(normal_vector, (d_psi - phi)) * min(0.0, char_speed_psi))