OPTIMIZING GREEN'S FUNCTIONS IN GROUNDED LAYERED MEDIA WITH ARTIFICIAL BOUNDARY CONDITIONS