SimMeta: make the fields private

This commit is contained in:
2022-08-23 23:23:49 -07:00
parent 17446cdc6b
commit 8e48414d68
6 changed files with 27 additions and 28 deletions

View File

@@ -16,8 +16,8 @@ pub(crate) fn step_h<R: Real, M: Material<R>>(
h: &mut RuntimeArray<Vec3<R>>,
m: &mut RuntimeArray<Vec3<R>>,
) {
if idx.x() < meta.dim.x() && idx.y() < meta.dim.y() && idx.z() < meta.dim.z() {
let dim = meta.dim;
let dim = meta.dim();
if idx.x() < dim.x() && idx.y() < dim.y() && idx.z() < dim.z() {
let len = dim.product_sum_usize();
let stim_h_array = unsafe { SizedArray::new(stimulus_h, len) };
@@ -38,8 +38,8 @@ pub(crate) fn step_e<R: Real, M: Material<R>>(
e: &mut RuntimeArray<Vec3<R>>,
h: &RuntimeArray<Vec3<R>>,
) {
if idx.x() < meta.dim.x() && idx.y() < meta.dim.y() && idx.z() < meta.dim.z() {
let dim = meta.dim;
let dim = meta.dim();
if idx.x() < dim.x() && idx.y() < dim.y() && idx.z() < dim.z() {
let len = dim.product_sum_usize();
let stim_e_array = unsafe { SizedArray::new(stimulus_e, len) };