This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is script version 3.0 - HPC & PyClaw in Mac OSX | |
# ------------------------------------------------------------------------------ # | |
# This version uses github and bitbucket sources | |
# ------------------------------------------------------------------------------ # | |
# ------------------------------------------------------------------------------ # | |
#!/bin/bash -x | |
echo -e "\n**************************************************************" | |
echo "Build a HPC system in MacOSX" | |
echo "**************************************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from glob import glob | |
import pickle | |
def xmdf_write(path,pkl_base='claw.pkl',ptc_base='claw.ptc',xmf_base='claw.meta',debug=False): | |
pkl_file_name = glob(os.path.join(path,'*.pkl*')) | |
if debug: | |
print pkl_file_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This code is originally taken from | |
# http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/table_demo.py | |
# It is modified here to generate the required plot. | |
# This code was originally developed by Amal AlGhamdi | |
import matplotlib | |
from matplotlib import pyplot | |
import os | |
from pylab import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# @ job_name = test_pyclaw_convergence | |
# @ job_type = bluegene | |
# @ output = ./$(job_name)_$(jobid).out | |
# @ error = ./$(job_name)_$(jobid).err | |
# @ environment = COPY_ALL; | |
# @ wall_clock_limit = 24:00:00,24:00:00 | |
# @ notification = always | |
# @ bg_size = 512 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from clawpack.pyclaw import Solution | |
import matplotlib as mpl | |
mpl.use('Agg') | |
import matplotlib.pyplot as plt | |
import glob | |
import os | |
visdir = './_ntf' | |
def plane_cut(path='./output',cutplane='z',qn=1,outdir='results',saveq=False,saveplot=False,splitall=False,planecutplot=False): | |
if not os.path.exists(os.path.join(path,outdir)): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import numpy as np | |
from mpi4py import MPI | |
from petsc4py import PETSc | |
import os | |
timeVec1 = PETSc.Vec().createWithArray([0]) | |
timeVec2 = PETSc.Vec().createWithArray([0]) | |
timeVec3 = PETSc.Vec().createWithArray([0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# Copyright (C) 2016 Sixten Bergman | |
# License WTFPL | |
# | |
# This program is free software. It comes without any warranty, to the extent | |
# permitted by applicable law. | |
# You can redistribute it and/or modify it under the terms of the Do What The | |
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |
OlderNewer