Implement loading of meshes from MSH files#15
Implement loading of meshes from MSH files#15Andlon merged 15 commits intoInteractiveComputerGraphics:masterfrom
Conversation
09bff9c to
fa45d81
Compare
5261245 to
983bd72
Compare
Andlon
left a comment
There was a problem hiding this comment.
Looks good to me! I left one comment about some commented out stuff; unsure if we should remove this before merge or keep it in, maybe with some added TODO statement?
More generally, I'm also unsure about the higher order elements, because currently the higher-order elements in fenris assume an affine reference -> physical mapping... But maybe we can merge and create an issue for fixing this in the future. I believe the fix is to support fully isoparametric elements and import directly into these, then having some kind of assume_affine() function to turn them into elements with affine transformations. Not sure!
| { | ||
| return Err(eyre!("node block entity does not have the right dimension for this mesh")); | ||
| } | ||
| */ |
There was a problem hiding this comment.
Is this still relevant? Should it be left in but commented? It's not clear to me why it's commented out, which probably means it should either be removed or fixed? (Or replaced with a TODO or something)
6e26900 to
6642394
Compare
| weights: self.weights, | ||
| data: data, | ||
| } | ||
| } |
There was a problem hiding this comment.
This appears to be unrelated to MSH, and seems to be the same functionality as in #49 ? Also applies to code below.
There was a problem hiding this comment.
Right, that was not intended.
6a74c8f to
6a11152
Compare
This implements loading of Fenris meshes from MSH files/byte slices using the mshio crate. Only Gmsh MSH file format 4.1 is currently supported.
The
io::mshmodule provides the functionsload_msh_from_fileandload_msh_from_bytes. The specifiedConnectivitytype determines which element blocks are actually extracted from the loaded MSH file. All element types that implement theMshConnectivitytrait are supported. Currently those are:Hex8ConnectivityHex27ConnectivityQuad4d2ConnectivityQuad9d2ConnectivityTet4ConnectivityTet10ConnectivityTri3d2ConnectivityTri3d3ConnectivityTri6d2ConnectivityTri6d3Connectivity,Quad4d3ConnectivityandQuad9d3Connectivityare currently not supported because they don't implement theElementConnectivitytrait.