コード例 #1
0
        w = dou.load_npa(fbtdict[t]['w'])
        mtxtb = dou.load_npa(fbtdict[t]['mtxtb'])
        print t, np.linalg.norm(w), np.linalg.norm(mtxtb)


def plot_vel_norms(tmesh, veldict):
    print 'plotting vel norms'
    for t in tmesh:
        w = dou.load_npa(veldict[t])
        print t, np.linalg.norm(w)

if __name__ == '__main__':
    plt.figure(11)
    plt.title('stokes')
    dtd = "data/drivencavity__stokes__timeall_nu0.005_mesh20_Nts16.0__sigout"
    jsf = ocm.load_json_dicts(dtd)
    plo.plot_optcont_json(jsf)

    plt.figure(12)
    plt.title('steady state stokes')
    dtd = "data/stst_drivencavity__stokes__timeNone_nu0.005_mesh20_NtsNoneNV3042NY4NU4alphau1e-09gamma0.001__sigout"
    jsf = ocm.load_json_dicts(dtd)
    plo.plot_optcont_json(jsf)

    plt.figure(13)
    plt.title('oseen dc')
    dtd = "data/tdst_drivencavity__stokes__timeall_nu0.005_mesh20_NtsNoneNV3042NY4NU4alphau1e-09gamma0.001__sigout"
    jsf = ocm.load_json_dicts(dtd)
    plo.plot_optcont_json(jsf)

    plt.figure(14)
コード例 #2
0
import plot_output as plo
import optcont_main as ocm
import matplotlib.pyplot as plt

path = '/home/heiland/work/papers/hei13_daericflow/pics/'

# extra options for tikz
extra = set(['ytick={-0.2, 0, 0.2}', 'xtick={0,0.2}'])

plt.figure(111)
fname = "pubpics/tds1_gamma0.001_alpha1e-9"
jsf = ocm.load_json_dicts(fname)
plo.plot_optcont_json(jsf, extra=extra, fname=path + 'tdgE-3aE-9')

plt.figure(112)
fname = "pubpics/sss1_gamma0.001_alpha1e-9"
jsf = ocm.load_json_dicts(fname)
plo.plot_optcont_json(jsf, extra=extra, fname=path + 'ssgE-3aE-9')