@@ -138,6 +138,11 @@ void initialize(DataSet _host_dataset, DataSet _dev_dataset, ParamSet *_param) {
138
138
unsigned face_count = host_dataset.mesh .mesh .face .size ;
139
139
unsigned hinge_count = host_dataset.mesh .mesh .hinge .size ;
140
140
unsigned tet_count = host_dataset.mesh .mesh .tet .size ;
141
+
142
+ const unsigned max_reduce_count = std::max (
143
+ std::max (face_count, edge_count), std::max (tet_count, 3 * vert_count));
144
+ utility::set_max_reduce_count (max_reduce_count);
145
+
141
146
unsigned collision_mesh_vert_count =
142
147
host_dataset.constraint .mesh .active
143
148
? host_dataset.constraint .mesh .vertex .size
@@ -238,43 +243,8 @@ StepResult advance() {
238
243
const unsigned shell_face_count = host_dataset.shell_face_count ;
239
244
const unsigned tet_count = host_data.mesh .mesh .tet .size ;
240
245
const float strain_limit_sum = prm.strain_limit_tau + prm.strain_limit_eps ;
241
- SimpleLog::set (prm.time );
242
-
243
- // Name: Vertex Count
244
- // Format: list[(vid_time,int)]
245
- // Description:
246
- // Total vertex count in the scene. The format is time-dependent
247
- // but should not change during the simulation.
248
- logging.mark (" vertex count" , vertex_count);
249
246
250
- // Name: Rod Count
251
- // Format: list[(vid_time,int)]
252
- // Description:
253
- // Total edge rod element count in the scene. The format is time-dependent
254
- // but should not change during the simulation.
255
- logging.mark (" rod count" , host_data.rod_count );
256
-
257
- // Name: Shell Count
258
- // Format: list[(vid_time,int)]
259
- // Description:
260
- // Total triangular shell element count in the scene. The format is
261
- // time-dependent but should not change during the simulation.
262
- logging.mark (" shell count" , host_data.shell_face_count );
263
-
264
- // Name: Triangle Count
265
- // Format: list[(vid_time,int)]
266
- // Map: triangle_count
267
- // Description:
268
- // Total triangular shell element count in the scene. The format is
269
- // time-dependent but should not change during the simulation.
270
- logging.mark (" face count" , host_data.mesh .mesh .face .size );
271
-
272
- // Name: Tet Count
273
- // Format: list[(vid_time,int)]
274
- // Description:
275
- // Total tetrahedral element count in the scene. The format is
276
- // time-dependent but should not change during the simulation.
277
- logging.mark (" tet count" , host_data.mesh .mesh .tet .size );
247
+ SimpleLog::set (prm.time );
278
248
279
249
logging.push (" build_kinematic" );
280
250
build_kinematic (host_dataset, dev_dataset, *param);
@@ -307,16 +277,6 @@ StepResult advance() {
307
277
tmp_scalar[i] = data.prop .face [i].mass ;
308
278
}
309
279
} DISPATCH_END;
310
- total_shell_mass = utility::sum_array (tmp_scalar, shell_face_count);
311
- }
312
-
313
- if (total_shell_mass > 0 .0f ) {
314
- // Name: Total Shell Mass
315
- // Format: list[(vid_time,kg)]
316
- // Description:
317
- // Total mass of all the shell elements in the scene.
318
- // Should not change during the simulation.
319
- logging.mark (" total shell mass" , total_shell_mass);
320
280
}
321
281
322
282
float total_solid_mass = 0 .0f ;
@@ -328,16 +288,6 @@ StepResult advance() {
328
288
tmp_scalar[i] = data.prop .tet [i].mass ;
329
289
}
330
290
} DISPATCH_END;
331
- total_solid_mass = utility::sum_array (tmp_scalar, tet_count);
332
- }
333
-
334
- if (total_solid_mass > 0 .0f ) {
335
- // Name: Total Solid Mass
336
- // Format: list[(vid_time,kg)]
337
- // Description:
338
- // Total mass of all the tet elements in the scene.
339
- // Should not change during the simulation.
340
- logging.mark (" total solid mass" , total_solid_mass);
341
291
}
342
292
343
293
float dt = param->dt ;
0 commit comments