GPU CUDA Class Declarations

You can use multiple different particle types with the CUDA API. The CUDA API operates with a generalized set of classes and functions.

To use GPU CUDA class declarations:
To retrieve the radius of an element in CUDA for a Multi-Sphere or a Sphero-Cylinder, use the following operation:
element1.getPhysicalRadius() ;
The closest equivalent operation which would work for polyhedral particles is:
element1.getVolumeSphereRadius();

This is not a syntactical difference, but rather a real difference in the value. In this case it is due to the fact that Polyhedral particles do not have an inherent radius like Multi-Spheres and Sphero-Cylinders.

When developing API scripts on CUDA, use the following resources to understand the available functionality:
  • Internal EDEM API documentation - Details the EDEM-specific CUDA functions and classes and can be found at the following location:<EDEM install directory>\202X.X\EDEM\src\Api\Help.
    • Select any html file.
  • CUDA Documentation - Details standard CUDA functionality.

    For the complete documentation, see https://docs.nvidia.com/cuda/index.html

  • Example code is available on the Altair community page: https://community.altair.com/community.

For more information about implementation of different functions, see GPU CUDA Getter and Setter Functions.