Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boundary conditions #56

Merged
merged 17 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/bin/mcrt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use aetherus::{
args,
data::Histogram,
fs::{File, Load, Save},
geom::{Grid, Tree},
geom::{Grid, Tree, Boundary},
img::{Colour, Image},
ord::{Build, Link, Register, Set, cartesian::{X, Y}},
report,
Expand Down Expand Up @@ -84,6 +84,14 @@ fn main() {
.expect("Failed to link attribute to surfaces.");
report!(surfs, "surfaces");

/*
* Create a boundary for the simulation with boundary conditions.
* For now we hard-code this to kill, but we can link this to configuration soon.
* TODO: We probably want to implement the MPI adjacent rank transfer here too.
*/
let bound = Boundary::new_kill(grid.boundary().clone());
report!(bound, "boundary conditions");

sub_section(term_width, "Growing");
let tree = Tree::new(&params.tree, &surfs);
report!(tree, "hit-scan tree");
Expand All @@ -95,7 +103,7 @@ fn main() {
.fold(base_output.clone(), |mut output, (light_idx, (light_id, light))| {
section(term_width, &format!("Running for light {} ({} / {})", light_id, light_idx + 1, nlights));
report!(light, light_id);
let input = Input::new(&spec_reg, &mats, &attrs, light, &tree, &grid, &sett);
let input = Input::new(&spec_reg, &mats, &attrs, light, &tree, &grid, &sett, &bound);

let data =
run::multi_thread(&engine, input, &base_output).expect("Failed to run MCRT.");
Expand Down
Loading
Loading