accelerInt  v0.1
Classes | Functions
exp4cu Namespace Reference

Classes

struct  solver_memory
 Structure containing memory needed for EXP4 algorithm. More...
 

Functions

__device__ void integrate (const double t_start, const double t_end, const double pr, double *__restrict__ y, const mechanism_memory *__restrict__ mech, const solver_memory *__restrict__ solver)
 4th-order exponential integrator function w/ adaptive Kyrlov subspace approximation More...
 
void createAndZero (void **ptr, size_t size)
 Convienvience method to Cuda Malloc and memset a pointer to zero. More...
 
void initialize_solver (int padded, solver_memory **h_mem, solver_memory **d_mem)
 Initializes the GPU solver. More...
 
const char * solver_name ()
 Returns a descriptive solver name. More...
 
void solver_log ()
 Executes solver specific logging tasks. More...
 
void init_solver_log ()
 Initializes solver specific items for logging. More...
 
size_t required_solver_size ()
 Returns the total size (in bytes) required for memory storage for a single GPU thread Used in calculation of the maximum number of possible GPU threads to launch, this method returns the size of the solver_memory structure (per-GPU thread) More...
 
void cleanup_solver (solver_memory **h_mem, solver_memory **d_mem)
 Cleans up solver memory. More...
 
__host__ void check_error (int num_cond, int *codes)
 

Detailed Description

Include common code.

Function Documentation

◆ check_error()

__host__ void exp4cu::check_error ( int  num_cond,
int *  codes 
)

Definition at line 22 of file exp4_props.cu.

◆ cleanup_solver()

void exp4cu::cleanup_solver ( solver_memory **  h_mem,
solver_memory **  d_mem 
)

Cleans up solver memory.

See also
solver_memory
solver_options.cuh

Additionally closes Krylov subspace logfiles (if LOG_OUTPUT is defined)

Definition at line 200 of file exp4_init.cu.

◆ createAndZero()

void exp4cu::createAndZero ( void **  ptr,
size_t  size 
)

Convienvience method to Cuda Malloc and memset a pointer to zero.

Parameters
ptrThe address of the pointer to malloc
sizeThe total size (in bytes) of the pointer to malloc

Definition at line 25 of file exp4_init.cu.

◆ init_solver_log()

exp4cu::init_solver_log ( )

Initializes solver specific items for logging.

Initializes the Krylov subspace logging files (if LOG_OUTPUT is defined)

See also
solver_options.cuh

Definition at line 142 of file exp4_init.cu.

◆ initialize_solver()

void exp4cu::initialize_solver ( int  padded,
solver_memory **  h_mem,
solver_memory **  d_mem 
)

Initializes the GPU solver.

Parameters
paddedThe total (padded) number of GPU threads (IVPs) to solve
h_memThe host solver_memory structure (to be copied to the GPU)
d_memThe device solver_memory structure (to be operated on by the GPU)

Solves for the poles and residuals used for the Rational Approximants in the Krylov subspace methods and initializes solver_memory

Definition at line 39 of file exp4_init.cu.

◆ integrate()

int exp4cu::integrate ( const double  t_start,
const double  t_end,
const double  pr,
double *__restrict__  y,
const mechanism_memory *__restrict__  mech,
const solver_memory *__restrict__  solver 
)

4th-order exponential integrator function w/ adaptive Kyrlov subspace approximation

Parameters
t_startThe initial integration time
t_endThe final integration timestep
prUser data passed to the RHS function dydt() - commonly used for the Pressure term
yThe state vector
mechThe mechanism memory struct
solverThe solver memory struct
Returns
The result of this integration step (see enum in exp4_props.cuh) will be stored in solver->result for each thread

Definition at line 71 of file exp4.cu.

◆ required_solver_size()

size_t exp4cu::required_solver_size ( )

Returns the total size (in bytes) required for memory storage for a single GPU thread Used in calculation of the maximum number of possible GPU threads to launch, this method returns the size of the solver_memory structure (per-GPU thread)

See also
solver_memory

Definition at line 167 of file exp4_init.cu.

◆ solver_log()

exp4cu::solver_log ( )

Executes solver specific logging tasks.

Logs errors, step-sizes, and krylov subspace size (if LOG_OUTPUT is defined)

See also
solver_options.cuh

Definition at line 106 of file exp4_init.cu.

◆ solver_name()

char * exp4cu::solver_name ( )

Returns a descriptive solver name.

Definition at line 71 of file exp4_init.cu.