import math

show_plot = True

prod = 'prod_bc_push'
seederPath = 'mesh_nHeight20'
musubiPath = ['inputRe20inleteqoutleteq', 'inputRe20inleteqoutletpab',
              'inputRe20inleteqoutletdnt', 'inputRe20inleteqoutletexpol',
              'inputRe20inletubboutleteq', 'inputRe20inletubboutletpab',
              'inputRe20inletubboutletdnt', 'inputRe20inletubboutletexpol']
ls = ['-b','-r','-g','-m','-xb','-xr','-xg','-xm']
plot  = []
for ipath in range(len(musubiPath)):
  sPlot = False
  ePlot = False
  if ipath == 0:
    sPlot = True
  if ipath == len(musubiPath)-1:
    ePlot = True

  plot.append(dict(kind='xy', data=[prod+'/'+seederPath+'/'+musubiPath[ipath]+'/tracking/2D_prsDrop_p*.res'],
              row=[1,-1], col=[1,4], startplot = sPlot, endplot = ePlot, label = musubiPath[ipath],
              xlabel = 'x (m)', ylabel = 'Pressure (Pa)',ls=ls[ipath],
              format='eps', dpi=100, figname = 'prsDrop_differentBC', 
              title='Pressure for different inflow and outflow bc'))

for ipath in range(len(musubiPath)):
  sPlot = False
  ePlot = False
  if ipath == 0:
    sPlot = True
  if ipath == len(musubiPath)-1:
    ePlot = True

  plot.append(dict(kind='gradient', data=[prod+'/'+seederPath+'/'+musubiPath[ipath]+'/tracking/2D_prsDrop_p*.res'],
              row=[1,-1], col=[1,4], startplot = sPlot, endplot = ePlot, label = musubiPath[ipath],
              xlabel = 'x (m)', ylabel = 'Pressure gradient(Pa)',ls=ls[ipath],
              format='eps', dpi=100, figname = 'prsDropGradient_differentBC', 
              title='Pressure gradient for different inflow and outflow bc'))
              
