Document Title

So what if I just write something here?

main.cpp

file description

More detailed description Copyright 2015 Christopher Watkins

Defines

NUM_ATOMS

Functions

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

Variables

const std::string path_to_log_file

random_numers.cpp

random_numbers.cpp - Functions necessary for generating a thermal distribution

More detailed description Copyright 2015 Christopher Watkins

Defines

PARAM_R

Functions

void initialise_rng_states(int n_states, pcg32_random_t *state, bool non_deterministic_seed)
double3 gaussian_point(double mean, double std, pcg32_random_t *state)
double2 box_muller(pcg32_random_t *state)
double gaussian_ziggurat(pcg32_random_t *state)
double uniform_prng(pcg32_random_t *state)

Variables

const double ytab[128]
const int32_t ktab[128]
const double wtab[128]

random_numbers.cu

randum_numbers.cu - Functions necessary for generating a thermal distribution

More detailed description Copyright 2015 Christopher Watkins

Functions

__host__ void cu_initialise_rng_states(int n_states, curandState * state)

Initialises and launches a kernel for generating n_state curandState elements in the state array.

Return
void
Parameters
  • n_states -

    Number of rng states required.

  • *state -

    Pointer to a curandState array of length n_states.

Exceptions
  • not -

    yet.

__global__ void g_initialise_rng_states(int n_states, curandState * state)

Initialises the state array with n_state curandSate states for the rng.

Return
void
Parameters
  • n_states -

    Number of rng seeds required.

  • *state -

    Pointer to a curandState array of length n_seeds.

Exceptions
  • not -

    yet.

__device__ double3 d_gaussian_point(double mean, double std, curandState * state)

Generates a double3 where each component is normally distributed with mean and std as the mean and standard deviation respectively.

Return
A gaussian distributed double3 point in cartesian space.
Parameters
  • mean -

    Gaussian mean of the components of the output double3.

  • std -

    Standard deviation of the components of the output double3.

  • *state -

    State for the rng.

Exceptions
  • not -

    yet.

distribution_generation.cpp

Functions necessary for generating a thermal distribution.

More detailed description Copyright 2015 Christopher Watkins

Functions

void generate_thermal_velocities(int num_atoms, double temp, pcg32_random_t *state, double3 *vel)

Calls the function to fill a double3 array of thermal velocties on the host with a mean temperature of temp.

Return
void
Parameters
  • num_atoms -

    Number of atoms in the thermal gas.

  • temp -

    Mean temperature of thermal gas, as defined by (TODO).

  • *state -

    Pointer to a pcg32_random_t host array of length num_atoms.

  • *vel -

    Pointer to a double3 host array of length num_atoms.

Exceptions
  • not -

    yet.

thermal_vel(double temp, pcg32_random_t *state)

Calls the function to generate a double3 thermal velocty on the host with a mean temperature of temp.

Return
void
Parameters
  • temp -

    Mean temperature of thermal gas, as defined by (TODO).

  • *state -

    Pointer to a single pcg32_random_t state on the host.

Exceptions
  • not -

    yet.

void generate_thermal_positions(int num_atoms, double temp, trap_geo params, pcg32_random_t *state, double3 *pos)

Calls the function to fill a double3 array of thermal positions on the host with a distribution determined by the trapping potential.

Return
void
Parameters
  • num_atoms -

    Number of atoms in the thermal gas.

  • temp -

    Mean temperature of thermal gas, as defined by (TODO).

  • params -

    TODO

  • *state -

    Pointer to a pcg32_random_t host array of length num_atoms.

  • *pos -

    Pointer to a double3 host array of length num_atoms.

Exceptions
  • not -

    yet.

thermal_pos(double temp, trap_geo params, pcg32_random_t *state)

Calls the function to generate a double3 thermal pos on the host with a distribution determined by the trapping potential.

Return
void
Parameters
  • temp -

    Mean temperature of thermal gas, as defined by (TODO).

  • params -

    TODO

  • *state -

    Pointer to a single pcg32_random_t state on the host.

Exceptions
  • not -

    yet.

Variables

const double max_grid_width

distribution_generation.cu

Functions necessary for generating a thermal distribution.

More detailed description Copyright 2015 Christopher Watkins

Functions

__host__ void cu_generate_thermal_velocities(int num_atoms, double temp, curandState * state, double3 * vel)

Calls the __global__ function to fill an array of thermal velocties with a mean temperature of temp.

Return
void
Parameters
  • temp -

    Mean temperature of the thermal gas, as defined by (TODO).

Exceptions
  • not -

    yet.

__global__ void g_generate_thermal_velocities(int num_atoms, double temp, curandState * state, double3 * vel)

__global__ function for filling a double3 array of length num_atoms with a distribution of thermal velocities.

Return
void
Parameters
  • num_atoms -

    Total number of atoms in the gas.

  • temp -

    Temperature of the gas (in Kelvin).

  • *state -

    Pointer to an array of curandState states for the random number generator

  • *vel -

    Pointer to an output double3 array of length num_atoms for storing the gas velocities.

Exceptions
  • not -

    yet.

__device__ double3 d_thermal_vel(double temp, curandState * state)

__device__ function for generating a single thermal velocity given a temperature temp.

Return
a gaussian distributed point in cartesian space with the standard deviation expected for a thermal gas as given in (TODO).
Parameters
  • temp -

    Mean temperature of the gas (in Kelvin).

  • *state -

    Pointer to a curandState state for the random number generator.

Exceptions
  • not -

    yet.

__host__ void cu_generate_thermal_positions(int num_atoms, double temp, trap_geo params, curandState * state, double3 * pos)
__global__ void g_generate_thermal_positions(int num_atoms, double temp, trap_geo params, curandState * state, double3 * pos)

Calls the function to fill a double3 array of thermal positions on the host with a distribution determined by the trapping potential.

Return
void
Parameters
  • num_atoms -

    Number of atoms in the thermal gas.

  • temp -

    Mean temperature of thermal gas, as defined by (TODO).

  • params -

    TODO

  • *state -

    Pointer to a curandState host array of length num_atoms.

  • *pos -

    Pointer to a double3 host array of length num_atoms.

Exceptions
  • not -

    yet.

__device__ double3 thermal_pos(double temp, trap_geo params, curandState * state)

Variables

__constant__ double d_max_grid_width

Warning

doxygenfunction: Cannot find function “doxygen_test” in doxygen xml output for project “CUDA_DSMC” from directory: ./xml/