This file contains hidden or 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 | |
"""A simple example of plotting the stellar mass function (SMF) from Meraxes | |
output.""" | |
# First off, import the packages we need | |
import numpy as np # work horse package for numerical work in python | |
import matplotlib.pyplot as plt # plotting library | |
# DRAGONS modules for reading and dealing with model ouput |
This file contains hidden or 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 os | |
env = Environment(env=os.environ) | |
env.Replace(CC = "mpicc") | |
env.AppendUnique(CFLAGS = ["-std=gnu99"]) | |
libs = {} | |
libs["gbpCode"] = {"I" : "~/3rd_party/gbpCode/myInclude", | |
"L" : "~/3rd_party/gbpCode/myLib/mpi", |
This file contains hidden or 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 | |
"""Plot the stellar mass function.""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from ssimpl import meraxes, munge | |
# if you want to use the plot style that I often use then uncomment these lines | |
# from ssimpl import plotutils |
This file contains hidden or 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
#include <stdlib.h> | |
#include <hdf5.h> | |
#include <hdf5_hl.h> | |
#include <math.h> | |
int main(int argc, char *argv[]) | |
{ | |
hsize_t dims[1]; | |
size_t type_size; | |
H5T_class_t class_id; |
This file contains hidden or 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 | |
"""Simple test script showing how to read / plot slices from Meraxes grids.""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from ssimpl import meraxes | |
# path to meraxes file and snapshot to read | |
fname = "/path/to/meraxes.hdf5" |
This file contains hidden or 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
/* | |
* Test code | |
* GistID:3f6fb4b2ef632906fe37 | |
* | |
* Complie with: | |
* /usr/local/x86_64/gnu/openmpi-1.6.1/bin/mpicc -lhdf5 -lhdf5_hl -o test test.c | |
* | |
* Run with: | |
* ./test | |
* |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <stdbool.h> | |
#include <mpi.h> | |
#include <complex.h> | |
#include <fftw3.h> | |
#include <fftw3-mpi.h> | |
/* |
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.