A scalar field is evaluated on a square grid of side
PHYSICS · Subjective · Fermi University Physics · Computational Physics · Scientific programming for physicists · Scientific programming for physicists
Computational Physics, Ch Arrays: a field is a rectangle of numbers
Problem
A scalar field is evaluated on a square grid of side , once with a double loop over the two indices and once with the equivalent broadcasting array expression. Each timing below is the smallest of seven repeats from on a stated machine:| loop time | array time | |
|---|---|---|