Skip to content

Instantly share code, notes, and snippets.

@tkphd
Created September 17, 2015 22:17
Show Gist options
  • Save tkphd/0cb3dda6318dd99fa773 to your computer and use it in GitHub Desktop.
Save tkphd/0cb3dda6318dd99fa773 to your computer and use it in GitHub Desktop.
Script to test polar grid memory access time
from fipy import *
from scipy import interpolate
import numpy as np
##Create mesh in Polar Coordinate system (LnR,Cta)
nLnR = 100
nCta = 50
dLnR = 0.02
dCta = 2*np.pi/nCta
PL = nLnR*dLnR
Pmesh = PeriodicGrid2DTopBottom(dx=dLnR, dy=dCta, nx=nLnR, ny=nCta)
C_V = CellVariable(name = "Vacancy Concentration", mesh = Pmesh, value = 0.0)
cv_res = C_V((1.0,1.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment