🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

EDEM API: Particle Body Force – Handling strings with the GPU API

User: "jerrinjobs"
Altair Employee
Updated by jerrinjobs

Overview

Attached you will find an example of how to handle strings when working with the GPU API. The short version is you handle everything that deals with strings on the CPU and use parameterData as a proxy when working with the GPU.

Pre-Requisite

The example deck was made from scratch using EDEM 2023.0, so those running that version or later should be able to open the deck.

Usage/Installation Instructions

The example considers two particles and applies a torque to one, based on the particle type. Although you only need externalForce() and getParticleParameterData() to make this work, I’ve added an intermediate function, isExampleParticle(), to highlight that both these functions need to work with the same string. This intermediate function is not necessary but hopefully reinforces the idea that the strings used in externalForce() and getParticleParameterData() should match.

Find more posts tagged with

Comments

Sort by:
1 - 1 of 11
    User: "QinHe_321"
    Altair Community Member

    any more detailed tutorial, I don't understand how cu file is generated. and there are also errors when I pack dll.

Share projects with the Community

Share your models, scripts, workspaces, and more with the Altair Community.
New Exchange Project