I defined two meshes in the following way,
(1)
nLnR = 100
nCta = 50
dLnR = 0.02
dCta = 2*np.pi/nCta
PL = nLnR*dLnR
##Create mesh in Polar Coordinate system (LnR,Cta)
Pmesh = PeriodicGrid2DTopBottom(dx=dLnR, dy=dCta, nx=nLnR, ny=nCta)
(2)
##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)

I also defined two variables on these two meshes:
C_V = CellVariable(name = "Vacancy Concentration", mesh = Pmesh, value =
0.0)
C_V_xy = CellVariable(name = "C_V in XY plane",mesh=Cmesh,value = 0.0)

After solving the equation, I want to check the values at certain points,
If I use
C_V((1.0,1.0))
The out put is array([ 0.,  0.]).
But when I use
C_V_xy((20,20))
I got an error:
IndexError: 0-d arrays can't be indexed

I wonder why this happens and can I extract data at a certain point using
the coordinate values for the second one?

best,
Zebo
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to