Allow conductivity to be specified as a vector
This is necessary to implement UPML boundary conditions
This commit is contained in:
@@ -61,7 +61,7 @@ struct RenderSteps<'a> {
|
||||
impl<'a> RenderSteps<'a> {
|
||||
fn render(state: &'a SimSnapshot, measurements: &'a [Box<dyn AbstractMeasurement>]) -> RgbImage {
|
||||
let mut me = Self::new(state, measurements);
|
||||
me.render_scalar_field(10.0, false, 2, |cell| cell.mat().conductivity());
|
||||
me.render_scalar_field(10.0, false, 2, |cell| cell.mat().conductivity().mag());
|
||||
me.render_scalar_field(100.0, true, 0, |cell| cell.mat().m().mag());
|
||||
if false {
|
||||
me.render_b_z_field();
|
||||
@@ -91,7 +91,7 @@ impl<'a> RenderSteps<'a> {
|
||||
self.render_vector_field(Rgb([0xff, 0xff, 0xff]), 100.0, |cell| cell.e().xy());
|
||||
// current
|
||||
self.render_vector_field(Rgb([0x00, 0xa0, 0x30]), 1.0e-12, |cell| {
|
||||
cell.e().xy()*cell.mat().conductivity()
|
||||
cell.e().elem_mul(cell.mat().conductivity()).xy()
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user