PPL Logo

libs/ck-libs/datatransfer/test_vol.C File Reference

Go to the source code of this file.

Typedefs

typedef double(* test_vol_fn )(const PointSet3d *ps, const Tet3d &A, const Tet3d &B)

Functions

double test_vol_mgc (const PointSet3d *ps, const Tet3d &A, const Tet3d &B)
double test_vol_planes (const PointSet3d *ps, const Tet3d &A, const Tet3d &B)
double test_vol_nop (const PointSet3d *ps, const Tet3d &A, const Tet3d &B)
double randFloat (void)
 Spit out a random floating point number, uniform on [0,1].
CkVector3d randPoint (void)
 Spit out a random 3-vector, uniform over the unit cube.
CkVector3d randPlane (void)
 Spit out a random 3-vector, uniform over a skew plane.
Tet3d randTet (int tetType, PointSet3d *ps)
void matchTest (int firstTest, int lastTest)
double timePer (test_vol_fn fn, int nTest, int degen)
 Return the time per intersection for nTest iterations of this volume function.
void timeTest (const char *desc, test_vol_fn fn, int nTest, int degen)
int main (int argc, char *argv[])

Variables

const int tetTypes = 6


Typedef Documentation

typedef double(* test_vol_fn)(const PointSet3d *ps, const Tet3d &A, const Tet3d &B)

Definition at line 17 of file test_vol.C.


Function Documentation

double test_vol_mgc ( const PointSet3d ps,
const Tet3d A,
const Tet3d B 
)

double test_vol_planes ( const PointSet3d ps,
const Tet3d A,
const Tet3d B 
)

double test_vol_nop ( const PointSet3d ps,
const Tet3d A,
const Tet3d B 
)

Definition at line 13 of file test_vol.C.

Referenced by timeTest().

double randFloat ( void   ) 

Spit out a random floating point number, uniform on [0,1].

Definition at line 21 of file test_vol.C.

CkVector3d randPoint ( void   ) 

Spit out a random 3-vector, uniform over the unit cube.

Definition at line 26 of file test_vol.C.

References randFloat().

CkVector3d randPlane ( void   ) 

Spit out a random 3-vector, uniform over a skew plane.

This ensures a large number of degeneracies.

Definition at line 32 of file test_vol.C.

References randFloat().

Tet3d randTet ( int  tetType,
PointSet3d ps 
) [inline]

Definition at line 48 of file test_vol.C.

References C, randPlane(), randPoint(), cg3d::testShape(), and tetVolume().

void matchTest ( int  firstTest,
int  lastTest 
)

Definition at line 75 of file test_vol.C.

References CmiAbort(), diff, printf(), randFloat(), randTet(), test_vol_mgc(), and test_vol_planes().

Referenced by main().

double timePer ( test_vol_fn  fn,
int  nTest,
int  degen 
)

Return the time per intersection for nTest iterations of this volume function.

Definition at line 107 of file test_vol.C.

References MPI_Wtime(), randFloat(), and randTet().

Referenced by timeTest().

void timeTest ( const char *  desc,
test_vol_fn  fn,
int  nTest,
int  degen 
)

Definition at line 124 of file test_vol.C.

References printf(), test_vol_nop(), and timePer().

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 130 of file test_vol.C.

References matchTest(), test_vol_mgc(), test_vol_planes(), and timeTest().


Variable Documentation

const int tetTypes = 6

Definition at line 45 of file test_vol.C.


Generated on Sat May 26 08:08:09 2012 for Charm++ by  doxygen 1.5.5