def writeBlock(pointIndices, nElems, expRat, grading='simpleGrading', type='hex', ret=False):
    """
    Write a hex block for use inside blockMeshDict
    """
    retStr = type + ' ( ';
    for i in range(len(pointIndices)):
        retStr += str(pointIndices[i]) + ' '
    retStr += ') (' + str(nElems[0]) + ' ' + str(nElems[1]) + ' ' + str(nElems[2]) + ') '
    retStr += grading
    retStr += ' ( '
    for e in expRat:
        retStr += str(e) + ' '
    retStr += ')'
    if ret:
        return retStr
    else:
        print(retStr)