CeedBasis

int CeedHouseholderReflect(CeedScalar *A, const CeedScalar *v, CeedScalar b, CeedInt m, CeedInt n, CeedInt row, CeedInt col)

Compute Householder reflection.

Computes A = (I - b v v^T) A where A is an mxn matrix indexed as A[i*row + j*col]

Library Developer Functions

Return

An error code: 0 - success, otherwise - failure

Parameters
  • [inout] A: Matrix to apply Householder reflection to, in place

  • v: Householder vector

  • b: Scaling factor

  • m: Number of rows in A

  • n: Number of columns in A

  • row: Row stride

  • col: Col stride

int CeedHouseholderApplyQ(CeedScalar *A, const CeedScalar *Q, const CeedScalar *tau, CeedTransposeMode tmode, CeedInt m, CeedInt n, CeedInt k, CeedInt row, CeedInt col)

Apply Householder Q matrix.

Compute A = Q A where Q is mxm and A is mxn.

Library Developer Functions

Return

An error code: 0 - success, otherwise - failure

Parameters
  • [inout] A: Matrix to apply Householder Q to, in place

  • Q: Householder Q matrix

  • tau: Householder scaling factors

  • tmode: Transpose mode for application

  • m: Number of rows in A

  • n: Number of columns in A

  • k: Number of elementary reflectors in Q, k<m

  • row: Row stride in A

  • col: Col stride in A

int CeedGivensRotation(CeedScalar *A, CeedScalar c, CeedScalar s, CeedTransposeMode tmode, CeedInt i, CeedInt k, CeedInt m, CeedInt n)

Compute Givens rotation.

Computes A = G A (or G^T A in transpose mode) where A is an mxn matrix indexed as A[i*n + j*m]

Library Developer Functions

Return

An error code: 0 - success, otherwise - failure

Parameters
  • [inout] A: Row major matrix to apply Givens rotation to, in place

  • c: Cosine factor

  • s: Sine factor

  • tmode: CEED_NOTRANSPOSE to rotate the basis counter-clockwise, which has the effect of rotating columns of A clockwise; CEED_TRANSPOSE for the opposite rotation

  • i: First row/column to apply rotation

  • k: Second row/column to apply rotation

  • m: Number of rows in A

  • n: Number of columns in A

int CeedScalarView(const char *name, const char *fpformat, CeedInt m, CeedInt n, const CeedScalar *a, FILE *stream)

View an array stored in a CeedBasis.

Library Developer Functions

Return

An error code: 0 - success, otherwise - failure

Parameters
  • [in] name: Name of array

  • [in] fpformat: Printing format

  • [in] m: Number of rows in array

  • [in] n: Number of columns in array

  • [in] a: Array to be viewed

  • [in] stream: Stream to view to, e.g., stdout