def readScalarFromFile(fileName):
    ' \n\n\tArg: \n\tfileName: The file name of OpenFOAM scalar field\n\n\tRegurn: \n\ta vector of scalar field    \n\t'
    resMid = extractScalar(fileName)
    fout = open('temp.txt', 'w')
    glob_patternx = resMid.group()
    glob_patternx = re.sub('\\(', '', glob_patternx)
    glob_patternx = re.sub('\\)', '', glob_patternx)
    fout.write(glob_patternx)
    fout.close()
    scalarVec = np.loadtxt('temp.txt')
    return scalarVec
Arg: 
fileName: The file name of OpenFOAM scalar field

Regurn: 
a vector of scalar field
def readScalarFromFile(fileName):
    ' \n\n\tArg: \n\tfileName: The file name of OpenFOAM scalar field\n\n\tRegurn: \n\ta vector of scalar field    \n\t'
    resMid = extractScalar(fileName)
    fout = open('temp.txt', 'w')
    glob_patternx = resMid.group()
    glob_patternx = re.sub('\\(', , glob_patternx)
    glob_patternx = re.sub('\\)', , glob_patternx)
    fout.write(glob_patternx)
    fout.close()
    scalarVec = np.loadtxt('temp.txt')
    return scalarVec