don't expose sparse solver (yet)
This commit is contained in:
parent
f7a30ac1cc
commit
9fb9ad8eae
|
@ -14,7 +14,7 @@ wee_alloc = "0.4.5"
|
||||||
sbp = { path = "../sbp", features = ["f32"] }
|
sbp = { path = "../sbp", features = ["f32"] }
|
||||||
ndarray = "0.13.1"
|
ndarray = "0.13.1"
|
||||||
euler = { path = "../euler" }
|
euler = { path = "../euler" }
|
||||||
maxwell = { path = "../maxwell", features = ["sparse"] }
|
maxwell = { path = "../maxwell" }
|
||||||
shallow-water = { path = "../shallow_water" }
|
shallow-water = { path = "../shallow_water" }
|
||||||
console_log = "0.2.0"
|
console_log = "0.2.0"
|
||||||
log = "0.4.8"
|
log = "0.4.8"
|
||||||
|
|
|
@ -438,8 +438,8 @@ class FieldDrawer {
|
||||||
draw();
|
draw();
|
||||||
switch (eq_set) {
|
switch (eq_set) {
|
||||||
case "maxwell":
|
case "maxwell":
|
||||||
// universe.advance(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));
|
// universe.advance_with_matrix(0.2*Math.min(1/width, 1/height));
|
||||||
break;
|
break;
|
||||||
case "euler":
|
case "euler":
|
||||||
universe.advance_upwind(0.2*Math.min(1/width, 1/height));
|
universe.advance_upwind(0.2*Math.min(1/width, 1/height));
|
||||||
|
|
|
@ -25,6 +25,11 @@ impl MaxwellUniverse {
|
||||||
self.0.advance_upwind(dt)
|
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 {
|
pub fn get_ex_ptr(&self) -> *const u8 {
|
||||||
self.0.field().ex().as_ptr() as *const u8
|
self.0.field().ex().as_ptr() as *const u8
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue