set_boundary function

Set boundary