I'm trying to make a 3x3x3 cuboidal lattice (type 11).
I'm using the syntax
Code: Select all
lat 10 11 0 0 0 3 3 3 35 35 35
1
2
1
2
1
2
1
2
1
Any suggestions?
Code: Select all
lat 10 11 0 0 0 3 3 3 35 35 35
1
2
1
2
1
2
1
2
1
Code: Select all
#CellNumber to Line Number
import math
xCells = 3
yCells = 3
zCells = 3
#a layer is collection of cells on the XY plane
layerCells = xCells*yCells
#a line is a colelction of cells along the X axis.
lineCells = xCells
#start counting at 0,0,0
cell = (2,2,2)
xPos = cell[0]
yPos = cell[1]
zPos = cell[2]
#counting from bototm
zOffset = (zPos)*layerCells + 1
yOffset = yPos*lineCells
xOffset = xPos
#line 1 is the one immediatly after the lat card.
line = zOffset + yOffset + xOffset
print(line)
Code: Select all
/* Lattice size */
nx = (long)TestParam(pname, fname, line, params[j++], PTYPE_INT,
1, 100);
ny = (long)TestParam(pname, fname, line, params[j++], PTYPE_INT,
1, 100);
nz = (long)TestParam(pname, fname, line, params[j++], PTYPE_INT,
1, 100);
Code: Select all
#define MAX_LATTICE_ITEMS 100000