Skip to content

Commit 983bd72

Browse files
committed
Add io::msh module documentation
1 parent 71ec2e5 commit 983bd72

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/io/msh.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
//! Functions to load [`Mesh`]es from Gmsh MSH 4.1 files.
2+
//!
3+
//! This module supports Gmsh MSH files with the file format version 4.1 as specified in the
4+
//! [Gmsh documentation](https://gmsh.info/doc/texinfo/gmsh.html#MSH-file-format). All element types
5+
//! that implement the [`MshConnectivity`] trait are supported.
6+
//!
7+
//! Example usage:
8+
//! ```
9+
//! use nalgebra::U2;
10+
//! use fenris::connectivity::Tri3d2Connectivity;
11+
//! use fenris::io::msh::load_msh_from_file;
12+
//!
13+
//! let mesh = load_msh_from_file::<f64, U2, Tri3d2Connectivity, _>(
14+
//! "assets/meshes/square_tri3_4.msh").unwrap();
15+
//!
16+
//! assert_eq!(mesh.vertices().len(), 5);
17+
//! assert_eq!(mesh.connectivity().len(), 4);
18+
//! ```
19+
120
use crate::connectivity::{
221
Quad4d2Connectivity, Quad9d2Connectivity, Tet10Connectivity, Tet4Connectivity, Tri3d2Connectivity,
322
Tri3d3Connectivity, Tri6d2Connectivity,

0 commit comments

Comments
 (0)