File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ pub fn setup_mpm_particles(
78
78
let num_particles = grid_size_x * grid_size_y * grid_size_z;
79
79
80
80
let particle_positions = ( 0 ..num_particles)
81
- . into_iter ( )
82
81
. map ( |i| {
83
82
let x = i % grid_size_x;
84
83
let y = ( i / grid_size_x) % grid_size_y;
@@ -142,7 +141,7 @@ pub fn setup_mpm_particles(
142
141
velocity : Vector3 :: zeros ( ) ,
143
142
volume : ParticleMassProps :: new ( density * volume, volume. cbrt ( ) / 2.0 ) ,
144
143
model : ElasticCoefficients :: from_young_modulus (
145
- 100_000_000.0 * 10f32 . powf ( ( z - 1f32 ) ) ,
144
+ 100_000_000.0 * 10f32 . powf ( z - 1f32 ) ,
146
145
0.2 + x * 0.05f32 ,
147
146
) ,
148
147
plasticity : Some ( DruckerPrager {
@@ -151,7 +150,7 @@ pub fn setup_mpm_particles(
151
150
h2 : 1.6 + z * 0.5f32 ,
152
151
h3 : 25.0f32 . to_radians ( ) + x,
153
152
..DruckerPrager :: new (
154
- 100_000_000.0 * 10f32 . powf ( ( z - 1f32 ) ) ,
153
+ 100_000_000.0 * 10f32 . powf ( z - 1f32 ) ,
155
154
0.2 + x * 0.05f32 ,
156
155
)
157
156
} ) ,
@@ -178,8 +177,5 @@ pub fn setup_mpm_particles(
178
177
cell_width,
179
178
60_000 ,
180
179
) ;
181
- commands. insert_resource ( PhysicsContext {
182
- data,
183
- particles : particles,
184
- } ) ;
180
+ commands. insert_resource ( PhysicsContext { data, particles } ) ;
185
181
}
You can’t perform that action at this time.
0 commit comments