Beispiel #1
0
    #plt.title('$\gamma$ nodes')
    #plt.xlim(-4,4)
    #plt.ylim(-4,4)
    #plt.legend(loc=3)


parser = argparse.ArgumentParser()
parser.add_argument('method', choices=('gamma', 'pert', 'm', 'k', 'aux',
    'int', 'ext'))
io_util.add_arguments(parser, ('boundary', 'N'))
args = parser.parse_args()

# Dummy problem just to get the solver to run
problem = Smooth_Sine()
boundary = problems.boundary.boundaries[args.boundary](problem.R)
problem.boundary = boundary

options = {'problem': problem, 'boundary': boundary, 'N': args.N,
    'scheme_order': 4}
solver = ps.ps.PizzaSolver(options)


if args.method == 'gamma':
    plot_aux(options={'color': 'black'})
    plot_gamma()
    plt.axes().set_aspect('equal', 'datalim')
    plt.axis('off')
    plt.savefig('/Users/sam/Google Drive/research/writeup_v4/union_gamma.pdf',
        bbox_inches='tight', transparent=True)
    plt.show()
elif args.method == 'pert':
Beispiel #2
0
    ],
    [
        np.pi/2,
        {'boundary': 'outer-sine', 'color': 'red', 'marker': 'd', 'ms': dms},
        {'boundary': 'sine7', 'color': 'purple', 'marker': '*', 'ms': dms+2.5},
    ]
]

i = 0
for data1 in data:
    a = data1[0]
    b0 = data1[1]
    b1 = data1[2]

    boundary = problems.boundary.boundaries[b0['boundary']](problem.R, a=a)
    problem.boundary = boundary
    problem.a = a

    options = {'problem': problem, 'boundary': boundary, 'N': 16,
        'scheme_order': 4}
    solver = ps.ps.PizzaSolver(options)

    plot_arc(color='gray', linestyle='--', linewidth=1.2)
    plot_Gamma(1, color='black')
    plot_Gamma(2, color='black')
    plot_Gamma(0, color=b0['color'], marker=b0['marker'], label=b0['boundary'],
        ms=b0['ms'])

    options['boundary'] = problems.boundary.boundaries[b1['boundary']](problem.R)
    problem.boundary = options['boundary']
    solver = ps.ps.PizzaSolver(options)