MCPcopy Create free account
hub / github.com/ProjectPhysX/FluidX3D / enqueue_object_force

Method enqueue_object_force

src/lbm.cpp:221–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219 object_sum.enqueue_read_from_device();
220}
221void LBM_Domain::enqueue_object_force(const uchar flag_marker) { // add up force for all cells flagged with flag_marker
222 enqueue_update_force_field(); // update force field if it is not yet up-to-date
223 object_sum.x[0] = 0.0f; // reset object_sum
224 object_sum.y[0] = 0.0f;
225 object_sum.z[0] = 0.0f;
226 object_sum.enqueue_write_to_device();
227 kernel_object_force.set_parameters(2u, flag_marker).enqueue_run();
228 object_sum.enqueue_read_from_device();
229}
230void LBM_Domain::enqueue_object_torque(const float3& rotation_center, const uchar flag_marker) { // add up torque around specified rotation_center for all cells flagged with flag_marker
231 enqueue_update_force_field(); // update force field if it is not yet up-to-date
232 object_sum.x[0] = 0.0f; // reset object_sum

Callers 1

object_forceMethod · 0.80

Calls 2

Tested by

no test coverage detected