🎉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

CUDA custom property across contact and body force

User: "Yang_QI1"
Altair Community Member
Updated by Yang_QI1

Hi, 

I am writing cuda API and would like to define a particle custom property and a simulation custom property that could be accessed in both calculateForce() and externalForce() on the .cu file. Is it necessary for me to define the property twice on CPU code? To copy the same function: getNumberOfRequiredProperties () getDetailsForProperty() on both cpp files?  Do I have to keep the same name and index for the custom property?

Regards,

Qi

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Renan"
    Altair Employee
    Accepted Answer
    Updated by Renan

    Hi Qi,

    If a custom property is going to be used/accessed by multiple APIs, then each one of those APIs has to declare that custom property in both the getNumberOfRequiredProperties and getDetailsForProperty functions. If the custom property name is not the same in both APIs, then you will have two different custom properties instead of one shared property.

    Best regards,

    Renan