Skip to content

Instantly share code, notes, and snippets.

View ketch's full-sized avatar

David Ketcheson ketch

View GitHub Profile
@ketch
ketch / pyclaw_geometry.ipynb
Last active May 31, 2018 06:56
A short introduction to geometry objects used in PyClaw: Dimensions, Grids, Patches.#PyClaw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ketch
ketch / MapMyFitness_data_viewer.py
Last active August 29, 2015 14:10
Code to download and plot my MapMyFitness data
from mapmyfitness import MapMyFitness
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
def get_workouts():
# Log in
mmf = MapMyFitness(api_key='6du8934wfvrdqnbtzd9h9kxbstdqrn2x', \
access_token='237eee8b8f8bc541841d902ea9a533fa07b748b4')
@ketch
ketch / yt_animation.ipynb
Last active August 29, 2015 14:09
Using yt and mplot3d to visualize the 3D shock-bubble interaction problem with PyClaw.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ketch
ketch / asv.conf.json
Last active August 29, 2015 14:09
Airspeed velocity configuration for clawpack.
{
// The version of the config file format. Do not change, unless
// you know what you are doing.
"version": 1,
// The name of the project being benchmarked
"project": "clawpack",
// The project's homepage
"project_url": "http://www.clawpack.org/",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ketch
ketch / plot_yt_amrclaw.py
Last active August 29, 2015 14:09
A demo of how to plot AMRClaw output using yt (yt-project).
import yt
from clawpack.pyclaw import Solution
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
for frame in range(8):
sol = Solution(frame,path='_hdf_output',file_format='hdf')
@ketch
ketch / Euler_exact_Riemann_solver.ipynb
Last active April 20, 2025 09:21
An exact Riemann solver for the Euler equations, with interactive widgets. #riemann-problem #euler-equations
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 / Shocktube-Mach.ipynb
Last active August 29, 2015 14:07
Shocktube problem with specified Mach number for the compressible Euler equations. Finds states yielding a shock with prescribed Mach number and plots the solution of the Riemann problem. #riemann-problem #euler-equations #hyperbolic
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ketch
ketch / ARW_nodepy.ipynb
Last active August 29, 2015 14:07
Reproduction of IMEX RK stability regions from Ascher-Ruuth-Wetton paper.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.