26 __constant__
int index_list[23] = {1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 17, 21, 27, 34, 42, 53, 67, 84, 106, 133, 167, 211, 265};
52 const int p,
const double h,
53 const double* __restrict__ A,
55 const double* __restrict__ v,
double* __restrict__ beta,
56 double * __restrict__ work,
57 cuDoubleComplex* __restrict__ work2)
59 const double* __restrict__ sc = solver->sc;
60 double* __restrict__ Vm = solver->Vm;
61 double* __restrict__ Hm = solver->Hm;
62 double* __restrict__ phiHm = solver->phiHm;
78 for (
int i = 0; i <= j; i++)
92 #ifndef CONST_TIME_STEP 105 for (
int i = 0; i < (j + 2); ++i)
112 for (
int i = 1; i < p; i++)
115 for (
int k = 0; k < (j + i + 2); ++k)
139 #if defined(LOG_OUTPUT) && defined(EXACT_KRYLOV) 147 #ifdef CONST_TIME_STEP __device__ double dotproduct(const double *__restrict__ w, const double *__restrict__ Vm)
Performs the dot product of the w (NSP x 1) vector with the given subspace vector (NSP x 1) ...
__device__ void scale_subtract(const double s, const double *__restrict__ Vm, double *__restrict__ w)
Subtracts Vm scaled by s from w.
int expAc_variable(const int m, const double *A, const double c, double *phiA)
Compute the zeroth order Phi (exponential) matrix function. This is the regular matrix exponential...
#define GRID_DIM
The total number of threads in the Grid, provides an offset between vector entries.
#define STRIDE
the matrix dimensions
__constant__ int index_list[23]
The list of indicies to check the Krylov projection error at.
__device__ void scale_mult(const double s, const double *__restrict__ w, double *__restrict__ Vm)
Sets Vm to s * w.
int phiAc_variable(const int m, const double *A, const double c, double *phiA)
Compute the first order Phi (exponential) matrix function.
__device__ double normalize(const double *__restrict__ v, double *__restrict__ v_out)
Normalize the input vector using a 2-norm.
void sparse_multiplier(const double *A, const double *Vm, double *w)
Implements Jacobian \ vector multiplication in sparse (or unrolled) form.
Definitions of various linear algebra functions needed in the exponential integrators.
simple convenience file to include the correct solver properties file
__device__ void scale(const double *__restrict__ y0, const double *__restrict__ y1, double *__restrict__ sc)
Get scaling for weighted norm.
Header definition for CUDA Jacobian vector multiplier, used in exponential integrators.
__device__ int arnoldi(const double scale, const int p, const double h, const double *__restrict__ A, const solver_memory *__restrict__ solver, const double *__restrict__ v, double *__restrict__ beta, double *__restrict__ work, cuDoubleComplex *__restrict__ work2)
Runs the arnoldi iteration to calculate the Krylov projection.
Header for Matrix exponential (phi) methods.
A file generated by Scons that specifies various options to the solvers.
__device__ double sc_norm(const double *__restrict__ nums, const double *__restrict__ sc)
Perform weighted norm.
#define INDEX(i)
Convenience macro to get the value of a vector at index i, calculated as i * GRID_DIM + T_ID...
__device__ double two_norm(const double *__restrict__ v)
Computes and returns the two norm of a vector.