cleaned up nodal_roles,added option for nans or infinity numbers