Skip to content

Reply To: simulateWithTwoWayCoupling

#7984
jan
Participant

Dear Rookie,

Since this is old legacy code, my knowledge of it is limited, but I’ll try to help.

The posted source code shows that they’re mostly the same, but the _Davide code adds a few more functions at the end. The code deletes inactive particles, communicates the back coupling, and also updates the particle distributions twice. Why this is, I do not know. It could be that eraseInactiveParticles is also called here to avoid a second loop over all particles. Also, the _Davide code somehow doesn’t include an option to reset the back coupling forces.

For now, I’d suggest you try them both and see if you see any differences in the results. Do they both do the same thing in your application? Then it’s probably more efficient to use the first one. If the results are different, then you may need the second, as this could indicate missing communications.

The parameters and your explanations seem correct. If you don’t want the reset, then yes, you should set resetExternalField to false.

Best regards,
Jan