Skip to content

Reply To: 2D Arbitrary Shaped Particle


Dear Jijo,

I believe it would be possible to add explicit functionality for this, but the corresponding indicator, smooth indicator and creator function are not currently implemented.

You could use `setResolvedArbitraryShape2D’ as you mentioned, but you should be aware that it discretizes the geometry and therefore introduces some errors, and it’s also likely to be a bit more computationally expensive.

The missing rotation matrix comes from the PARTICLETYPE. In the dkt2d example, typedef ResolvedCircleWithContact2D PARTICLETYPE; is set. As you can see, it explicitly mentions circle because a circle is rotation invariant. So if you want a different shape, please use typedef ResolvedParticleWithContact2D PARTICLETYPE; instead. See src/particles/descriptor/particleDescriptorAlias.h for more aliases. You could also just combine different fields you need in the same way as it’s done there.

Best regards,