accelerInt  v0.1
Functions | Variables
radau2a Namespace Reference

Functions

static void scale (const double *__restrict__ y0, const double *__restrict__ y, double *__restrict__ sc)
 Computes error weight scaling from initial and current state. More...
 
static void scale_init (const double *__restrict__ y0, double *__restrict__ sc)
 Computes error weight scaling from initial state. More...
 
static void RK_Decomp (const double H, double *__restrict__ E1, double complex *__restrict__ E2, const double *__restrict__ Jac, int *__restrict__ ipiv1, int *__restrict__ ipiv2, int *__restrict__ info)
 Compute E1 & E2 matricies and their LU Decomposition. More...
 
static void RK_Make_Interpolate (const double *__restrict__ Z1, const double *__restrict__ Z2, const double *__restrict__ Z3, double *__restrict__ CONT)
 Compute Quadaratic interpolate. More...
 
static void RK_Interpolate (const double H, const double Hold, double *__restrict__ Z1, double *__restrict__ Z2, double *__restrict__ Z3, const double *__restrict__ CONT)
 Apply quadaratic interpolate to get initial values. More...
 
static void WADD (const double *__restrict__ X, const double *__restrict__ Y, double *__restrict__ Z)
 Performs \(Z:= X + Y\) with unrolled (or at least bounds known at compile time) loops. More...
 
static void DAXPY3 (const double DA1, const double DA2, const double DA3, const double *__restrict__ DX, double *__restrict__ DY1, double *__restrict__ DY2, double *__restrict__ DY3)
 Sepcialization of DAXPY with unrolled (or at least bounds known at compile time) loops. More...
 
static void RK_PrepareRHS (const double t, const double pr, const double H, const double *__restrict__ Y, const double *__restrict__ Z1, const double *__restrict__ Z2, const double *__restrict__ Z3, double *__restrict__ R1, double *__restrict__ R2, double *__restrict__ R3)
 Prepare the right-hand side for Newton iterations: \(R = Z - hA * F\). More...
 
static void RK_Solve (const double H, double *__restrict__ E1, double complex *__restrict__ E2, double *__restrict__ R1, double *__restrict__ R2, double *__restrict__ R3, int *__restrict__ ipiv1, int *__restrict__ ipiv2)
 Solves for the RHS values in the Newton iteration. More...
 
static double RK_ErrorNorm (const double *__restrict__ scale, double *__restrict__ DY)
 Computes the scaled error norm from the given scale and DY vectors. More...
 
static double RK_ErrorEstimate (const double H, const double t, const double pr, const double *__restrict__ Y, const double *__restrict__ F0, const double *__restrict__ Z1, const double *__restrict__ Z2, const double *__restrict__ Z3, const double *__restrict__ scale, double *__restrict__ E1, int *__restrict__ ipiv1, const bool FirstStep, const bool Reject)
 Computes and returns the error estimate for this step. More...
 
int integrate (const double t_start, const double t_end, const double pr, double *y)
 5th-order Radau2A CPU implementation More...
 
void initialize_solver ()
 
const char * solver_name ()
 Returns a descriptive solver name. More...
 
void cleanup_solver ()
 
void init_solver_log ()
 
void solver_log ()
 

Variables

static const double rkA [3][3]
 
static const double rkB [3]
 
static const double rkC [3]
 
static const double rkE [4]
 
static const double rkTheta [3]
 
static const double rkGamma = 3.637834252744495732208418513577775
 
static const double rkAlpha = 2.681082873627752133895790743211112
 
static const double rkBeta = 3.050430199247410569426377624787569
 
static const double rkT [3][3]
 
static const double rkTinv [3][3]
 
static const double rkTinvAinv [3][3]
 
static const double rkAinvT [3][3]
 
static const double rkELO = 4
 
static char TRANS = 'N'
 Lapack - non-transpose. More...
 
static int NRHS = 1
 Lapack - 1 RHS solve. More...
 
static int ARRSIZE = NSP
 Lapack - Array size. More...
 

Function Documentation

◆ cleanup_solver()

void radau2a::cleanup_solver ( )

Definition at line 26 of file radau2a_init.c.

◆ DAXPY3()

static void radau2a::DAXPY3 ( const double  DA1,
const double  DA2,
const double  DA3,
const double *__restrict__  DX,
double *__restrict__  DY1,
double *__restrict__  DY2,
double *__restrict__  DY3 
)
inlinestatic

Sepcialization of DAXPY with unrolled (or at least bounds known at compile time) loops.

Performs:

  • \(DY1:= DA1 * DX\)
  • \(DY2:= DA2 * DX\)
  • \(DY3:= DA3 * DX\)

Definition at line 338 of file radau2a.c.

◆ init_solver_log()

void radau2a::init_solver_log ( )

Definition at line 30 of file radau2a_init.c.

◆ initialize_solver()

void radau2a::initialize_solver ( )

Definition at line 14 of file radau2a_init.c.

◆ integrate()

int radau2a::integrate ( const double  t_start,
const double  t_end,
const double  pr,
double *  y 
)

5th-order Radau2A CPU implementation

A header definition of the integrate method, that must be implemented by various solvers.

Parameters
[in]t_startThe starting time
[in]t_endThe end integration time
[in]prThe system constant variable (pressure/density)
[in,out]yThe system state vector at time t_start. Overwritten with the system state at time t_end
Returns
Return code,
See also
Return codes of Radau-IIa integrator

Definition at line 520 of file radau2a.c.

◆ RK_Decomp()

static void radau2a::RK_Decomp ( const double  H,
double *__restrict__  E1,
double complex *__restrict__  E2,
const double *__restrict__  Jac,
int *__restrict__  ipiv1,
int *__restrict__  ipiv2,
int *__restrict__  info 
)
static

Compute E1 & E2 matricies and their LU Decomposition.

Parameters
[in]HThe timestep size
[in,out]E1The non-complex matrix system
[in,out]E2The complex matrix system
[in]JacThe Jacobian matrix
[out]ipiv1The pivot indicies for E1
[out]ipiv2The pivot indicies for E2
[out]infoAn indicator variable determining if an error occured.

Definition at line 256 of file radau2a.c.

◆ RK_ErrorEstimate()

static double radau2a::RK_ErrorEstimate ( const double  H,
const double  t,
const double  pr,
const double *__restrict__  Y,
const double *__restrict__  F0,
const double *__restrict__  Z1,
const double *__restrict__  Z2,
const double *__restrict__  Z3,
const double *__restrict__  scale,
double *__restrict__  E1,
int *__restrict__  ipiv1,
const bool  FirstStep,
const bool  Reject 
)
static

Computes and returns the error estimate for this step.

Definition at line 458 of file radau2a.c.

◆ RK_ErrorNorm()

static double radau2a::RK_ErrorNorm ( const double *__restrict__  scale,
double *__restrict__  DY 
)
inlinestatic

Computes the scaled error norm from the given scale and DY vectors.

Definition at line 446 of file radau2a.c.

◆ RK_Interpolate()

static void radau2a::RK_Interpolate ( const double  H,
const double  Hold,
double *__restrict__  Z1,
double *__restrict__  Z2,
double *__restrict__  Z3,
const double *__restrict__  CONT 
)
static

Apply quadaratic interpolate to get initial values.

Definition at line 302 of file radau2a.c.

◆ RK_Make_Interpolate()

static void radau2a::RK_Make_Interpolate ( const double *__restrict__  Z1,
const double *__restrict__  Z2,
const double *__restrict__  Z3,
double *__restrict__  CONT 
)
static

Compute Quadaratic interpolate.

Definition at line 283 of file radau2a.c.

◆ RK_PrepareRHS()

static void radau2a::RK_PrepareRHS ( const double  t,
const double  pr,
const double  H,
const double *__restrict__  Y,
const double *__restrict__  Z1,
const double *__restrict__  Z2,
const double *__restrict__  Z3,
double *__restrict__  R1,
double *__restrict__  R2,
double *__restrict__  R3 
)
static

Prepare the right-hand side for Newton iterations: \(R = Z - hA * F\).

Definition at line 353 of file radau2a.c.

◆ RK_Solve()

static void radau2a::RK_Solve ( const double  H,
double *__restrict__  E1,
double complex *__restrict__  E2,
double *__restrict__  R1,
double *__restrict__  R2,
double *__restrict__  R3,
int *__restrict__  ipiv1,
int *__restrict__  ipiv2 
)
static

Solves for the RHS values in the Newton iteration.

Definition at line 388 of file radau2a.c.

◆ scale()

static void radau2a::scale ( const double *__restrict__  y0,
const double *__restrict__  y,
double *__restrict__  sc 
)
inlinestatic

Computes error weight scaling from initial and current state.

Parameters
[in]y0the initial state vector to use
[in]ythe current state vector
[out]scthe populated error weight scalings

Definition at line 74 of file radau2a.c.

◆ scale_init()

static void radau2a::scale_init ( const double *__restrict__  y0,
double *__restrict__  sc 
)
inlinestatic

Computes error weight scaling from initial state.

Parameters
[in]y0the initial state vector to use
[out]scthe populated error weight scalings

Definition at line 88 of file radau2a.c.

◆ solver_log()

void radau2a::solver_log ( )

Definition at line 34 of file radau2a_init.c.

◆ solver_name()

char * radau2a::solver_name ( )

Returns a descriptive solver name.

Definition at line 21 of file radau2a_init.c.

◆ WADD()

static void radau2a::WADD ( const double *__restrict__  X,
const double *__restrict__  Y,
double *__restrict__  Z 
)
inlinestatic

Performs \(Z:= X + Y\) with unrolled (or at least bounds known at compile time) loops.

Definition at line 320 of file radau2a.c.

Variable Documentation

◆ ARRSIZE

int radau2a::ARRSIZE = NSP
static

Lapack - Array size.

Definition at line 242 of file radau2a.c.

◆ NRHS

int radau2a::NRHS = 1
static

Lapack - 1 RHS solve.

Definition at line 240 of file radau2a.c.

◆ TRANS

char radau2a::TRANS = 'N'
static

Lapack - non-transpose.

Definition at line 238 of file radau2a.c.