Changed data type of #geometry_objects_file from uint16 to int16. This will allow a negative value which indicates not to build any material at that location. N.B existing files with uint16 format should continue to work.

这个提交包含在:
Craig Warren
2016-07-14 14:38:33 +01:00
父节点 6c82028984
当前提交 09f6495e09

查看文件

@@ -608,8 +608,9 @@ Allows you to insert pre-defined geometry into a model. The geometry is specifie
.. note:: .. note::
* The integer numbers in the HDF5 file must be stored as a NumPy array at the root named ``data`` with type ``np.uint16``. * The integer numbers in the HDF5 file must be stored as a NumPy array at the root named ``data`` with type ``np.int16``.
* The integer numbers in the HDF5 file correspond to the order of material commands in the materials text file, i.e. if ``#sand: 3 0 1 0`` is the first material in the materials file, it will be associated with any integers that are zero in the HDF5 file. * The integer numbers in the HDF5 file correspond to the order of material commands in the materials text file, i.e. if ``#sand: 3 0 1 0`` is the first material in the materials file, it will be associated with any integers that are zero in the HDF5 file.
* You can use an integer of -1 in the HDF5 file to indicate not to build any material at that location, i.e. whatever material is already in the model at that location.
* The spatial resolution of the geometry objects must match the spatial resolution defined in the model. * The spatial resolution of the geometry objects must match the spatial resolution defined in the model.
* The spatial resolution of must be specified as a root attribute of the HDF5 file with the name ``dx, dy, dz`` equal to a tuple of floats, e.g. (0.002, 0.002, 0.002) * The spatial resolution of must be specified as a root attribute of the HDF5 file with the name ``dx, dy, dz`` equal to a tuple of floats, e.g. (0.002, 0.002, 0.002)