Conversation
|
It might be nice to not dump the whole field, if you have a large one, but do it like numpy, where it only prints the first and last 3 row in each dimension, although 4 is probably better, if there are 2 guard cells, and have an option to change it to dump everything? |
|
Good idea. Numpy has two related options:
So we could have something like:
and then perhaps one or both of these:
|
|
Thanks @ZedThree! I don't have suggestions beyond echoing David's idea. I assume the three numbers in brackets are X, Y and Z in that order? So when you say "Z points being on a single line", you mean that the Z axis is incremented in the horizontal direction in the console? I would personally find it more useful to have Y increment on the vertical and X on the horizontal, and then have different blocks for Z increments. This would then mirror the physical layout of the coordinates in a tokamak. This would also make an XY Field2D show a grid of points instead of a single column. It would make it more interpretable when looking at Y boundaries which is a common use case. |
Needs some more docs, but lets you write out fields:
output.write("{}", field);and get something like:
or specify a region and a floating point format:
output.write("{:r'RGN_NOX':3.1e}", field);Works on
Field2D,Field3D, andFieldPerp. For the sake of an easy implementation, z points are always on a single line, then blocks of y, so aField2Dlooks like:and a
FieldPerp:I need to write some docs, but are there any other options that would be useful?