Skip to content

Commit

Permalink
Add io:>msh module documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
w1th0utnam3 committed Nov 10, 2022
1 parent 71ec2e5 commit 5261245
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/io/msh.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
//! Functions to load [`Mesh`]es from Gmsh MSH 4.1 files.
//!
//! This module supports Gmsh MSH files with the file format version 4.1 as specified in the
//! [Gmsh documentation](https://gmsh.info/doc/texinfo/gmsh.html#MSH-file-format). All element types
//! that implement the [`MshConnectivity`] trait are supported.
//!
//! Example usage:
//! ```
//! use nalgebra::U2;
//! use fenris::connectivity::Tri3d2Connectivity;
//! use fenris::io::msh::load_msh_from_file;
//!
//! let mesh = load_msh_from_file::<f64, U2, Tri3d2Connectivity, _>(
//! "assets/meshes/square_tri3_4.msh").unwrap();
//!
//! assert_eq!(mesh.vertices().len(), 5);
//! assert_eq!(mesh.connectivity().len(), 4);
//! ```
use crate::connectivity::{
Quad4d2Connectivity, Quad9d2Connectivity, Tet10Connectivity, Tet4Connectivity, Tri3d2Connectivity,
Tri3d3Connectivity, Tri6d2Connectivity,
Expand Down

0 comments on commit 5261245

Please sign in to comment.