Updated to check Smax
updated right boundary initialization
Wrongly truncated dominion, now ok, but doesn't work