fill cofficients in non-smooth case