Ejemplo n.º 1
0
import plot_utils as plu
tol = 2**(-14)
HL = [16,32,64,128,256,512,1024]

#plu.merge_json_dicts(    'json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[0] + 'to%d' % HL[0] + 'Mesh40HalfExpEulSmaMin.json',
#					     'json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[3] + 'to%d' % HL[1] + 'Mesh40HalfExpEulSmaMin.json')

#plu.merge_json_dicts(    'json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[2] + 'to%d' % HL[2] + 'Mesh40HalfExpEulSmaMin.json',
#					     'json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[3] + 'to%d' % HL[3] + 'Mesh40HalfExpEulSmaMin.json')

plu.merge_json_dicts(    'json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[4] + 'to%d' % HL[4] + 'Mesh40HalfExpEulSmaMin.json',
					     'json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[5] + 'to%d' % HL[5] + 'Mesh40HalfExpEulSmaMin.json')

#plu.merge_json_dicts('json/MrgdOmeg8Tol%1.2e' % tol + 'NTs%d' % HL[0] + 'to%d' % HL[1] + 'Mesh40HalfExpEulSmaMin.json',
#					 'json/MrgdOmeg8Tol%1.2e' % tol + 'NTs%d' % HL[2] + 'to%d' % HL[3] + 'Mesh40HalfExpEulSmaMin.json')

plu.merge_json_dicts('json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[0] + 'to%d' % HL[3] + 'Mesh40HalfExpEulSmaMin.json',
					 'json/MrgdOmeg8Tol%1.2e' % tol + 'NTs%d' % HL[4] + 'to%d' % HL[5] + 'Mesh40HalfExpEulSmaMin.json')

plu.merge_json_dicts('json/MrgdOmeg8Tol%1.2e' % tol + 'NTs%d' % HL[0] + 'to%d' % HL[5] + 'Mesh40HalfExpEulSmaMin.json',
					 'json/Omeg8Tol%1.2e' % tol + 'NTs%d' % HL[6] + 'to%d' % HL[6] + 'Mesh40HalfExpEulSmaMin.json')

plu.convpltjsd('json/MrgdOmeg8Tol%1.2e' % tol + 'NTs%d' % HL[0] + 'to%d' % HL[6] + 'Mesh40HalfExpEulSmaMin.json')



import plot_utils as plu

mrglist1 = [
    "json/Omeg8Tol2.44e-04NTs32to64Mesh40HalfExpEulInd2.json",
    "json/Omeg8Tol2.44e-04NTs128to128Mesh40HalfExpEulInd2.json",
    "json/Omeg8Tol2.44e-04NTs512to512Mesh40HalfExpEulInd2.json"
    ]

mrglist2 = [
    "json/Omeg8Tol2.44e-04NTs128to128Mesh40HalfExpEulSmaMin.json",
    "json/Omeg8Tol2.44e-04NTs32to64Mesh40HalfExpEulSmaMin.json",
    "json/Omeg8Tol2.44e-04NTs512to512Mesh40HalfExpEulSmaMin.json"
    ]

curdi = mrglist1[0]
for mrgdi in mrglist1[1:]:
    curdi = plu.merge_json_dicts(curdi, mrgdi)

plu.jsd_calc_l2errs(curdi, plot=True)

curdi = mrglist2[0]
for mrgdi in mrglist2[1:]:
    curdi = plu.merge_json_dicts(curdi, mrgdi)

plu.jsd_calc_l2errs(curdi, plot=True)