Skip to content

Instantly share code, notes, and snippets.

@tkphd
Created September 17, 2015 22:15
Show Gist options
  • Save tkphd/c41fad935fe8516001e4 to your computer and use it in GitHub Desktop.
Save tkphd/c41fad935fe8516001e4 to your computer and use it in GitHub Desktop.
Script to test uniform grid memory access time
from fipy import *
from scipy import interpolate
import numpy as np
##Create mesh in the Cartesian Coordinate system (X,Y)
nx = 100
ny = nx
dx = 1.0
dy = dx
CL = nx*dx
Cmesh = Grid2D(dx=dx, dy=dy, nx=nx, ny=ny)
C_V_xy = CellVariable(name = "C_V in XY plane",mesh=Cmesh,value = 0.0)
cvxy_res = C_V_xy((20,20))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment