function get_instance() result(instance) type (GridManager), pointer :: instance instance => grid_manager end function get_instance