This small PR generalizes the single GPU TensorFlow FlowPM to support non cubic volumes, for instance with one dimension far more extended than the other, for reasons ;-)
The changes are minimal, to create a rectangular simulation simply do the following:
initial_conditions = flowpm.linear_field([32,32,320], # size of the cube
[100,100,1000], # Physical size of the cube
ipklin, # Initial powerspectrum
batch_size=1)
state = flowpm.lpt_init(initial_conditions, a0=0.1)
final_state = flowpm.nbody(state, stages, [32,32,320])
and you get this pretty picture:
It's tested against python_fastpm so should be good to go
This small PR generalizes the single GPU TensorFlow FlowPM to support non cubic volumes, for instance with one dimension far more extended than the other, for reasons ;-)
The changes are minimal, to create a rectangular simulation simply do the following:
and you get this pretty picture:
It's tested against python_fastpm so should be good to go