The pertinent code runs as follows:
model = Prism(x1, x2, y1, y2, z1, z2, {'density': ρ})
data = np.array([prism.potential(x, y, z, [model])
I have to input ~50,000 prisms into the file. Simple testing has determined that a format which works is as follows:
model1 = Prism(x1, x2, y1, y2, z1, z2, {'density': ρ})
model2 = Prism(x1, x2, y1, y2, z1, z2, {'density': ρ})
model3 = Prism(x1, x2, y1, y2, z1, z2, {'density': ρ})
data = np.array([prism.potential(x, y, z, [model1, model2, model3])
The file I need to import the prisms from is formatted such as:
x1 x2 y1 y2 z1 z2 ρ
It contains ~50,000 lines of said data. What I am trying to figure out how to do is to import and run all 50,000 prisms in the one script. I know that it is not possible to write model1 ... model50000 into the script, I am just hoping there is a nice way around it?
Thanks in advance!