diff --git a/webfront/Cargo.toml b/webfront/Cargo.toml index 8ccc7eb..71c9691 100644 --- a/webfront/Cargo.toml +++ b/webfront/Cargo.toml @@ -14,7 +14,7 @@ wee_alloc = "0.4.5" sbp = { path = "../sbp", features = ["f32"] } ndarray = "0.13.1" euler = { path = "../euler" } -maxwell = { path = "../maxwell", features = ["sparse"] } +maxwell = { path = "../maxwell" } shallow-water = { path = "../shallow_water" } console_log = "0.2.0" log = "0.4.8" diff --git a/webfront/frontend/main.js b/webfront/frontend/main.js index 77e91cc..f70b1ce 100644 --- a/webfront/frontend/main.js +++ b/webfront/frontend/main.js @@ -438,8 +438,8 @@ class FieldDrawer { draw(); switch (eq_set) { case "maxwell": - // universe.advance(0.2*Math.min(1/width, 1/height)); - universe.advance_with_matrix(0.2*Math.min(1/width, 1/height)); + universe.advance(0.2*Math.min(1/width, 1/height)); + // universe.advance_with_matrix(0.2*Math.min(1/width, 1/height)); break; case "euler": universe.advance_upwind(0.2*Math.min(1/width, 1/height)); diff --git a/webfront/src/maxwell.rs b/webfront/src/maxwell.rs index 5bfe760..4916c56 100644 --- a/webfront/src/maxwell.rs +++ b/webfront/src/maxwell.rs @@ -25,6 +25,11 @@ impl MaxwellUniverse { self.0.advance_upwind(dt) } + #[cfg(feature = "sparse")] + pub fn advance_with_matrix(&mut self, dt: f32) { + self.0.advance_sparse(dt) + } + pub fn get_ex_ptr(&self) -> *const u8 { self.0.field().ex().as_ptr() as *const u8 }