code: public void gridToPmesh(String outPutFileName) {
          try {
              gridGenerator.writeGridInPmeshFormat(outPutFileName);
          } catch (IOException e) {
              logger.debug(e);
          }
      }
docs: Method writes the grid to pmesh format.