Skip to content

Commit

Permalink
re-integrated the input_output module. Added more robust documentatio…
Browse files Browse the repository at this point in the history
…n for the Domain, Geometry, Boundary, and Input_Output module.
  • Loading branch information
tmathis720 committed Oct 27, 2024
1 parent ac51c78 commit c980ca6
Show file tree
Hide file tree
Showing 10 changed files with 6,769 additions and 376 deletions.
514 changes: 419 additions & 95 deletions src/boundary/docs/about_boundary.md

Large diffs are not rendered by default.

422 changes: 362 additions & 60 deletions src/domain/docs/about_domain.md

Large diffs are not rendered by default.

4,950 changes: 4,950 additions & 0 deletions src/domain/docs/gp.md

Large diffs are not rendered by default.

907 changes: 825 additions & 82 deletions src/geometry/docs/about_geometry.md

Large diffs are not rendered by default.

336 changes: 202 additions & 134 deletions src/input_output/docs/about_input_output.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/input_output/gmsh_parser.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::domain::{Mesh, MeshEntity, Sieve};
use crate::domain::{mesh::Mesh, MeshEntity, Sieve};
use std::fs::File;
use std::io::{self, BufRead, BufReader};

Expand Down
4 changes: 2 additions & 2 deletions src/input_output/mesh_generation.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::domain::{Mesh, MeshEntity};
use crate::domain::{mesh::Mesh, MeshEntity};

pub struct MeshGenerator;

Expand Down Expand Up @@ -195,7 +195,7 @@ impl MeshGenerator {
let _n8 = n7 + 1;

// Define the faces and add them as MeshEntities
let front_face = MeshEntity::Face(mesh.entities.len());
let front_face = MeshEntity::Face(mesh.entities.read().expect("Failed to acquire read lock").len());
mesh.add_entity(front_face.clone());
mesh.add_relationship(front_face.clone(), MeshEntity::Vertex(n1));
mesh.add_relationship(front_face.clone(), MeshEntity::Vertex(n2));
Expand Down
6 changes: 6 additions & 0 deletions src/input_output/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ mod tests {
let expected_num_vertices = (nx + 1) * (ny + 1);
let num_vertices = mesh
.entities
.read().expect("Failed to acquire read lock")
.iter()
.filter(|e| matches!(e, MeshEntity::Vertex(_)))
.count();
Expand All @@ -196,6 +197,7 @@ mod tests {
let expected_num_cells = nx * ny;
let num_cells = mesh
.entities
.read().expect("Failed to acquire read lock")
.iter()
.filter(|e| matches!(e, MeshEntity::Cell(_)))
.count();
Expand All @@ -217,6 +219,7 @@ mod tests {
let expected_num_vertices = (nx + 1) * (ny + 1) * (nz + 1);
let num_vertices = mesh
.entities
.read().expect("Failed to acquire read lock")
.iter()
.filter(|e| matches!(e, MeshEntity::Vertex(_)))
.count();
Expand All @@ -226,6 +229,7 @@ mod tests {
let expected_num_cells = nx * ny * nz;
let num_cells = mesh
.entities
.read().expect("Failed to acquire read lock")
.iter()
.filter(|e| matches!(e, MeshEntity::Cell(_)))
.count();
Expand All @@ -243,6 +247,7 @@ mod tests {
let expected_num_vertices = num_divisions + 1;
let num_vertices = mesh
.entities
.read().expect("Failed to acquire read lock")
.iter()
.filter(|e| matches!(e, MeshEntity::Vertex(_)))
.count();
Expand All @@ -252,6 +257,7 @@ mod tests {
let expected_num_cells = num_divisions;
let num_cells = mesh
.entities
.read().expect("Failed to acquire read lock")
.iter()
.filter(|e| matches!(e, MeshEntity::Cell(_)))
.count();
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub mod boundary;
pub mod solver;
pub mod time_stepping;
pub mod linalg;
//pub mod input_output;
pub mod input_output;
pub mod tests;

pub use geometry::{Geometry, CellShape, FaceShape};
Expand Down
2 changes: 1 addition & 1 deletion target/.rustc_info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"rustc_fingerprint":18432001303766494279,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.80.1 (3f5fd8dd4 2024-08-06)\nbinary: rustc\ncommit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23\ncommit-date: 2024-08-06\nhost: x86_64-pc-windows-msvc\nrelease: 1.80.1\nLLVM version: 18.1.7\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\Tea\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""},"16495917692426387086":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""}},"successes":{}}
{"rustc_fingerprint":18432001303766494279,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.80.1 (3f5fd8dd4 2024-08-06)\nbinary: rustc\ncommit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23\ncommit-date: 2024-08-06\nhost: x86_64-pc-windows-msvc\nrelease: 1.80.1\nLLVM version: 18.1.7\n","stderr":""},"16495917692426387086":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\Tea\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}

0 comments on commit c980ca6

Please sign in to comment.