If I want to move the below structure TetrahedronStruct
to CUDA device memory, how should I proceed?
struct TetrahedronStruct {
int index;
int region;
TriangleFaces Faces[4];
Vertex Vertices[4];
struct TetrahedronStruct *adjTetrahedrons[4];
};
typedef struct {
long double Nx, Ny, Nz;
long double d;
Vertex V[3];
} TriangleFaces;
typedef struct {
long double x, y, z;
} Vertex;
Details:
The mesh details (number of nodes, tetrahedrons, coordinates, and regions) are provided. The creation of the tree is done in a for-loop. Basically, each face is being located and arranged in the tree accordingly with its coordinates and adjacency.
In the CUDA device, I need to use this structure to overlay on a media to simulate how particles will travel across that media. Each of the million particles are moving from tetrahedron to tetrahedron (each tetrahedron has the properties of the media where it resides).