Skip to content

Instantly share code, notes, and snippets.

View ketch's full-sized avatar

David Ketcheson ketch

View GitHub Profile
#!/usr/bin/env python
# encoding: utf-8
import numpy as np
def setup(use_petsc=False,outdir='./_output',solver_type='classic'):
from clawpack import riemann
from clawpack import pyclaw
#solver = pyclaw.ClawSolver2D(riemann.vc_advection_2D)
import numpy as np
def find_min_poly(x, d, n):
"""Find the polynomial that minimizes max|p(x)| over the given
range of x values and among polynomials of the form
x^n + a_d x^d + a_{d-1} x^{d-1} + ... + a_0
Inputs:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ketch
ketch / Makefile
Last active February 21, 2017 21:31
Comparison of some Riemann solvers for the variable speed-limit LWR traffic model
all: traffic_fwave_old.so traffic_fwave.so traffic_qwave.so
traffic_fwave_old.so: rp1_traffic_vc_tracer_fwave_old.f90
f2py -c rp1_traffic_vc_tracer_fwave_old.f90 -m traffic_fwave_old
traffic_fwave.so: rp1_traffic_vc_tracer_fwave.f90
f2py -c rp1_traffic_vc_tracer_fwave.f90 -m traffic_fwave
traffic_qwave.so: rp1_traffic_vc_tracer_qwave.f90
f2py -c rp1_traffic_vc_tracer_qwave.f90 -m traffic_qwave