Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Input files in .npy format are now correctly read.
In previous versions, it was considered that the array size specified in the header of the .npy file corresponded to the number of vertices in the mesh. However, since references (array entries) are given to hexahedra, this led to leaving unused every entry in the array corresponding to the last index in each dimension.
Hence, the number of vertices and hexahedra in every dimension have been increased by one.
Data reading has been modified from
int16_t
type touint32_t
.This modification is not enough to ensure proper reading for every type of data entry (
int64
for instance). Another update will shortly be made in order to correct this.Some
int
have been changed toMMG5_int
.Added some standard output lines.
Example
A example is provided here. The file
small-example.npy
is 4 x 4 x 4 array containing integers from 1 to 64. Running hex2tet without the update leads to an incorrect output file: most references do not appear in the mesh. This problem was caused both by the offset between the number of hexahedra and vertices and the data type that was read.small-example.tar.gz
Warning
Since it is necessary for mmg to have a cell-centered distribution of the references, this update renders the use of a vertex-centered level-set function unusable with the output tetrahedral mesh.