STARS-H
Software for Testing Accuracy, Reliability and Scalability of Hierarchical computations
Cauchy example

Cauchy example. More...

Collaboration diagram for Cauchy example:

Typedefs

typedef STARSH_particles STARSH_cauchy
 

Functions

void starsh_cauchy_block_kernel (int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
 The Cauchy kernel for STARSH_cauchy object. More...
 
int starsh_cauchy_init (STARSH_cauchy **data, STARSH_int count, double *point)
 Create container for Cauchy example. More...
 
int starsh_cauchy_new (STARSH_cauchy **data, STARSH_int count, double *point, double *diag)
 Create container for Cauchy example. More...
 
int starsh_cauchy_new_va (STARSH_cauchy **data, STARSH_int count, va_list args)
 Generate STARSH_cauchy object by incomplete set of parameters. More...
 
int starsh_cauchy_new_el (STARSH_cauchy **data, STARSH_int count,...)
 Generate STARSH_cauchy object by incomplete set of parameters. More...
 
void starsh_cauchy_free (STARSH_cauchy *data)
 
int starsh_cauchy_get_kernel (STARSH_kernel **kernel, STARSH_cauchy *data, enum STARSH_CAUCHY_KERNEL type)
 Get kernel for minimal working example. More...
 

Detailed Description

Cauchy example.

Uses STARSH_particles structure to hold locations of points (1-dimensional) and values for diagonal elements of corresponding matrix.

Typedef Documentation

◆ STARSH_cauchy

Cauchy problem reuses structure for particles.

Function Documentation

◆ starsh_cauchy_block_kernel()

void starsh_cauchy_block_kernel ( int  nrows,
int  ncols,
STARSH_int irow,
STARSH_int icol,
void *  row_data,
void *  col_data,
void *  result,
int  ld 
)

The Cauchy kernel for STARSH_cauchy object.

Each off-diagonal element is generated as

\[ A_{ij} = \frac{1}{x_i-y_j}, \]

where \( x \) and \( y \) are coordinates of points in one-dimensional space. Diagonal elements are simply set as

\[ A_{ii} = d_i, \]

with given values of \( d_i \).

Parameters
[in]nrowsNumber of rows of \( A \).
[in]ncolsNumber of columns of \( A \).
[in]irowArray of row indexes.
[in]icolArray of column indexes.
[in]row_dataPointer to physical data (STARSH_cauchy object).
[in]col_dataPointer to physical data (STARSH_cauchy object).
[out]resultPointer to memory of \( A \).
[in]ldLeading dimension of result.
See also
starsh_cauchy_get_kernel().

◆ starsh_cauchy_free()

void starsh_cauchy_free ( STARSH_cauchy data)

Free data.

◆ starsh_cauchy_get_kernel()

int starsh_cauchy_get_kernel ( STARSH_kernel **  kernel,
STARSH_cauchy data,
enum STARSH_CAUCHY_KERNEL  type 
)

Get kernel for minimal working example.

Kernel can be selected with this call or manually. Currently, there is only one kernel for STARSH_cauchy problem.

Parameters
[out]kernelAddress of STARSH_kernel function.
[in]dataPointer to STARSH_cauchy object.
[in]typeType of kernel. For more info look at STARSH_CAUCHY_KERNEL.
Returns
Error code STARSH_ERRNO.
See also
starsh_cauchy_block_kernel().

◆ starsh_cauchy_init()

int starsh_cauchy_init ( STARSH_cauchy **  data,
STARSH_int  count,
double *  point 
)

Create container for Cauchy example.

Parameters
[out]dataAddress of pointer to STARSH_cauchy object.
[in]countSize of matrix.
[in]pointCoordinates of points (1D space) and values for diagonals of Cauchy matrix.
Returns
Error code STARSH_ERRNO.
See also
starsh_cauchy_new().

◆ starsh_cauchy_new()

int starsh_cauchy_new ( STARSH_cauchy **  data,
STARSH_int  count,
double *  point,
double *  diag 
)

Create container for Cauchy example.

Parameters
[out]dataAddress of pointer to STARSH_cauchy object.
[in]countSize of matrix.
[in]pointCoordinates of points (1D space).
[in]diagValues for diagonal of Cauchy matrix.
Returns
Error code STARSH_ERRNO.
See also
starsh_cauchy_init().

◆ starsh_cauchy_new_el()

int starsh_cauchy_new_el ( STARSH_cauchy **  data,
STARSH_int  count,
  ... 
)

Generate STARSH_cauchy object by incomplete set of parameters.

See also
starsh_cauchy_new().

◆ starsh_cauchy_new_va()

int starsh_cauchy_new_va ( STARSH_cauchy **  data,
STARSH_int  count,
va_list  args 
)

Generate STARSH_cauchy object by incomplete set of parameters.

See also
starsh_cauchy_new().