note a few suspect areas of code
This commit is contained in:
@@ -143,7 +143,13 @@ impl<'a, R: Real, M: Material<R>> Sample<'a, R, M> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn current_density(&self) -> Vec3<R> {
|
pub fn current_density(&self) -> Vec3<R> {
|
||||||
// TODO: does this make sense for Pml?
|
// TODO: justify/derive this.
|
||||||
|
// i guess the actual current density is the gradient of E multiplied by conductivity,
|
||||||
|
// and that when summed over a loop the negative terms from the neighbors are canceled
|
||||||
|
// when we grab their current density?
|
||||||
|
//
|
||||||
|
// or maybe it's $V = \int{E . dl} = IR$, so $I = \int{\sigma E . dl}$
|
||||||
|
// in which case this might not be "current density", but something related.
|
||||||
let conductivity = self.conductivity();
|
let conductivity = self.conductivity();
|
||||||
self.e().elem_mul(conductivity)
|
self.e().elem_mul(conductivity)
|
||||||
}
|
}
|
||||||
|
@@ -150,6 +150,7 @@ impl<R: Region + Sync, T: TimeVarying1 + Sync> AbstractStimulus for CurlStimulus
|
|||||||
if self.region.contains(pos) {
|
if self.region.contains(pos) {
|
||||||
let (amt_e, amt_h) = self.stim.at(t_sec);
|
let (amt_e, amt_h) = self.stim.at(t_sec);
|
||||||
let from_center_to_point = *pos - *self.center;
|
let from_center_to_point = *pos - *self.center;
|
||||||
|
// TODO: is this inverted?
|
||||||
let rotational = from_center_to_point.cross(*self.axis);
|
let rotational = from_center_to_point.cross(*self.axis);
|
||||||
let impulse_e = rotational.with_mag(amt_e.cast()).unwrap_or_default();
|
let impulse_e = rotational.with_mag(amt_e.cast()).unwrap_or_default();
|
||||||
let impulse_h = rotational.with_mag(amt_h.cast()).unwrap_or_default();
|
let impulse_h = rotational.with_mag(amt_h.cast()).unwrap_or_default();
|
||||||
|
Reference in New Issue
Block a user