writing h2mesh