stim: convert CurlStimulus to a CurlVectorField and use ModulatedVectorField
this opens the door to caching the vector field stuff.
This commit is contained in:
@@ -7,7 +7,7 @@ use coremem::{Driver, mat, meas};
|
||||
use coremem::geom::{Coord as _, Meters, Torus};
|
||||
use coremem::sim::spirv::{SpirvSim, WgpuBackend};
|
||||
use coremem::sim::units::Seconds;
|
||||
use coremem::stim::{CurlStimulus, Sinusoid, StimExt as _};
|
||||
use coremem::stim::{CurlVectorField, ModulatedVectorField, Sinusoid, StimExt as _};
|
||||
|
||||
|
||||
fn main() {
|
||||
@@ -81,9 +81,9 @@ fn main() {
|
||||
let wave = Sinusoid::from_wavelength(amp, duration * 2.0)
|
||||
.half_cycle()
|
||||
.shifted(start);
|
||||
driver.add_stimulus(CurlStimulus::new(
|
||||
region.clone(),
|
||||
wave.clone(),
|
||||
driver.add_stimulus(ModulatedVectorField::new(
|
||||
CurlVectorField::new(region.clone()),
|
||||
wave,
|
||||
));
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user