Skip to content

Commit e10416a

Browse files
committed
fixed compilation errors.
1 parent 1912974 commit e10416a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/material.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub fn surface_binding_energy<T: Geometry>(particle_1: &mut particle::Particle,
332332
SurfaceBindingModel::PLANAR{..} => {
333333
particle::surface_refraction(particle_1, Vector::new(dx/mag, dy/mag, dz/mag), Es);
334334
}
335-
_ => particle.E += Es;
335+
_ => particle_1.E += Es,
336336
}
337337
}
338338
}
@@ -358,7 +358,7 @@ pub fn surface_binding_energy<T: Geometry>(particle_1: &mut particle::Particle,
358358
SurfaceBindingModel::PLANAR{..} => {
359359
particle::surface_refraction(particle_1, Vector::new(-dx/mag, -dy/mag, -dz/mag), -Es);
360360
}
361-
_ => particle.E += -Es;
361+
_ => particle_1.E += -Es,
362362
}
363363

364364
} else {

src/particle.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,9 @@ pub fn particle_advance(particle_1: &mut particle::Particle, mfp: f64, asymptoti
210210

211211
pub fn surface_refraction(particle: &mut Particle, normal: Vector, Es: f64) {
212212
let E = particle.E;
213-
let costheta = particle.dir.dot(&normal);
214213

214+
let costheta = particle.dir.dot(&normal);
215+
215216
let a = (E/(E + Es)).sqrt();
216217
let b = -(E).sqrt()*costheta;
217218
let c = (E*costheta.powi(2) + Es).sqrt();

0 commit comments

Comments
 (0)