PPL Logo

libs/ck-libs/collide/collidec.h File Reference

Go to the source code of this file.

Typedefs

typedef int collide_t
 A collide_t is a handle to a single collision detection grid.

Functions

collide_t COLLIDE_Init (int mpi_comm, const double *gridStart, const double *gridSize)
 Create a new Collision grid.
void COLLIDE_Boxes (collide_t c, int nBox, const double *boxes)
 Collide these boxes (boxes[0.
void COLLIDE_Boxes_prio (int chunkNo, int nBox, const double *boxes, const int *prio)
 Collide these boxes (boxes[0.
int COLLIDE_Count (collide_t c)
 Immediately after a Collision, get the number of Collision records.
void COLLIDE_List (collide_t c, int *Collisions3)
 Immediately after a Collision, get the colliding records into Collisions[0.
void COLLIDE_Destroy (collide_t c)
 Destroy this Collision grid.


Typedef Documentation

typedef int collide_t

A collide_t is a handle to a single collision detection grid.

Definition at line 15 of file collidec.h.


Function Documentation

collide_t COLLIDE_Init ( int  mpi_comm,
const double *  gridStart,
const double *  gridSize 
)

Create a new Collision grid.

This collective creation call must be made from all the threads of a TCHARM array.

Parameters:
mpi_comm is the MPI communicator, or 0 if not using MPI.
gridSize gives the size of one voxel, which should be several times larger than the size of the average object.
gridStart gives the origin of the voxel array--the corner of the voxel (0,0,0). For best performance, if possible you should align the voxel array so most objects lie in exactly one voxel.

Definition at line 282 of file threadCollide.C.

References c, CollideCreate(), TCharm::get(), threadCollide::getArrayID(), TCharm::getProxy(), _ckGroupID::idx, rank, TCharm::semaGet(), TCHARMLIB_Bound_array(), and TCHARMLIB_Get_rank().

Referenced by ParFUM_Collide().

Here is the call graph for this function:

Here is the caller graph for this function:

void COLLIDE_Boxes ( collide_t  c,
int  nBox,
const double *  boxes 
)

Collide these boxes (boxes[0.

.6*nBox]). This is a collective call--all registered chunks should make this call. Unliked CollideClassed, below, no Collisions are ignored; or equivalently, every box lies in its own Collision class.

Parameters:
nBoxes number of independent objects to collide.
boxes an array of nBox 3d bounding boxes, stored as x-min, x-max, y-min, y-max, z-min, z-max.

Definition at line 320 of file threadCollide.C.

void COLLIDE_Boxes_prio ( int  chunkNo,
int  nBox,
const double *  boxes,
const int prio 
)

Collide these boxes (boxes[0.

.6*nBox]), using the given box priorities (prio[0..nBox]).

Referenced by parallelTransfer_c::transfer(), and parallelSurfaceTransfer_c::transfer().

Here is the caller graph for this function:

int COLLIDE_Count ( collide_t  c  ) 

Immediately after a Collision, get the number of Collision records.

This value is normally used to allocate the array passed to COLLIDE_List.

Referenced by parallelTransfer_c::transfer(), and parallelSurfaceTransfer_c::transfer().

Here is the caller graph for this function:

void COLLIDE_List ( collide_t  c,
int Collisions3 
)

Immediately after a Collision, get the colliding records into Collisions[0.

.3*nColl]. Collisions[3*c+0] lists the number of box A, which is always from my chunk Collisions[3*c+1] lists the source chunk of box B (possibly my own chunk) Collisions[3*c+2] lists the number of box B on its source chunk

Referenced by parallelTransfer_c::transfer(), and parallelSurfaceTransfer_c::transfer().

Here is the caller graph for this function:

void COLLIDE_Destroy ( collide_t  c  ) 

Destroy this Collision grid.

Referenced by ParFUM_Collide_GetCollisions().

Here is the caller graph for this function:


Generated on Mon Sep 21 08:06:53 2020 for Charm++ by  doxygen 1.5.5