Skip to content

Instantly share code, notes, and snippets.

View sanromd's full-sized avatar

damian san roman alerigi sanromd

View GitHub Profile
@sanromd
sanromd / pyclaw_install_shaheen.sh
Last active August 29, 2015 13:57
This is version 1.0 of the script to install Pyclaw and dependencies on Shaheen
# This is version 2.0 of the script to install Pyclaw and dependencies on Shaheen
# Authors: Aron Ahmadia, Damian San Roman
# Collaborators: David Ketcheson, Lisandro Dalcin
# ------------------------------------------------------------------------------ #
# This version uses github and bitbucket sources, alternatively you may select
# non-git sources, supported via wget
# ------------------------------------------------------------------------------ #
# ------------------------------------------------------------------------------ #
echo "\nPrep/Setup"
@sanromd
sanromd / pyclaw_install_linux.sh
Last active August 29, 2015 13:56
pyclaw intstall generic linux
# This is version 2.0 of the script to install Pyclaw and dependencies on linux PC
# Authors: Aron Ahmadia, Damian San Roman
# Collaborators: David Ketcheson, Lisandro Dalcin
# ------------------------------------------------------------------------------ #
# This version uses github and bitbucket sources, alternatively you may select
# non-git sources, supported via wget
# ------------------------------------------------------------------------------ #
# ------------------------------------------------------------------------------ #
echo "\PETSc + PETSc4py Setup"
@sanromd
sanromd / convergence_test.py
Last active August 29, 2015 13:56
convergence test for SharpClaw 3D using acoustics_3d_heterogeneous from PyClaw examples.
def verify_classic_sharp(claw1,claw2,p,base_name):
import os
import numpy as np
pfinal1 = claw1.frames[claw1.num_output_times].state.get_q_global()
pfinal2 = claw2.frames[claw2.num_output_times].state.get_q_global()
grid = claw1.solution.state.grid
plot_claws(grid.x.centers,pfinal1[0,:,0,0],pfinal2[0,:,0,0],base_name+'_x_'+str(2**p))
plot_claws(grid.y.centers,pfinal1[0,0,:,0],pfinal2[0,0,:,0],base_name+'_y_'+str(2**p))