🎉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

API function

User: "Yang_QI1"
Altair Community Member
Updated by Yang_QI1

Hi,

I am looking at the code for particle replacement and have difficulty with a function : 

void CRemoval::processParticleOfInterest(int threadID, int particleOfInterestId)

I would like to know when and how this function is executed? And since markParticleOfInterest(particle.ID) must be called before this function to mark specific particles. Does it mean I could mark particles in step 2,4,5 in the following picture  and the processParticleOfInterest function is called between step 5 and 6 for every particle marked in the current timestep, no matter particles are marked in Particle factory, Contact model or body force? image

Find more posts tagged with

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

    Hi Guozhen,

     

    The 'mark particle of interest' function is part of the Particle Manager which you can call from points 4 and 5, you don't really need to call it in the factory as this runs on CPU anyway.

     

    Once a particles ID is passed to the Particle of Interest function then it is processed as an additional External Force (within the Calculate Forces function) but it will be called after the calculate force is run on GPU which allows it to be processed that time-step.

     

    Regards

    Stephen