Classes | |
| struct | GBMat |
| General Band Matrix (LAPACK GB storage format) More... | |
| struct | GEMat |
| General Dense Matrix (LAPACK GE storage format) More... | |
| struct | PBMat |
| Packed Band Matrix (LAPACK PB storage format) More... | |
| struct | PeriodicMat |
| Periodic Band Matrix. More... | |
| struct | Spline1D |
| 1-dimensional B-spline More... | |
| struct | Spline2D |
| 2-dimensional B-spline (tensor product) More... | |
| struct | Spline2D1D |
| 2D+1D B-spline (for axisymmetric problems) More... | |
| struct | ZGBMat |
| Complex General Band Matrix. More... | |
| struct | ZGEMat |
| Complex General Dense Matrix. More... | |
| struct | ZPBMat |
| Complex Packed Band Matrix. More... | |
| struct | ZPeriodicMat |
| Complex Periodic Band Matrix. More... | |
Typedefs | |
| using | spline1d = Spline1D |
| Backward-compatible name for Spline1D. | |
| using | spline2d = Spline2D |
| Backward-compatible name for Spline2D. | |
| using | spline2d1d = Spline2D1D |
| Backward-compatible name for Spline2D1D. | |
Functions | |
| void | basfun (Real x, const Spline1D &sp, Real *fun, int left, int nderiv=1) |
| Evaluate basis functions and derivatives at a point. | |
| void | bsolve (const GBMat &mat, Real *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsolve (const GEMat &mat, Real *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsolve (const PBMat &mat, Real *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsolve (const PeriodicMat &mat, Real *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsolve (const ZGBMat &mat, Complex *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsolve (const ZGEMat &mat, Complex *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsolve (const ZPBMat &mat, Complex *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsolve (const ZPeriodicMat &mat, Complex *b, int nrhs=1) |
| Solve linear system A*x = b. | |
| void | bsplvb (const Real *t, int jhigh, Real x, int left, Real *biatx) |
| Evaluate B-spline basis functions at a point. | |
| void | bsplvd (const Real *t, int k, Real x, int left, Real *a, Real *dbiatx, int nderiv) |
| Evaluate B-spline basis functions and derivatives at a point. | |
| void | bspp2d (const Real *t, const Real *bcoef, int n, int k, Real *scrtch, Real *ppcoef) |
| Convert B-spline coefficients to PPFORM. | |
| void | calc_integ (const Spline1D &sp, Real *integ) |
| Calculate integral of each basis function. | |
| void | CompMassMatrix (const Spline1D &sp, GBMat &mat) |
| Compute mass matrix for FEM discretization. | |
| void | CompMassMatrix (const Spline1D &sp, PeriodicMat &mat) |
| Assemble the finite-element mass matrix with periodic index wrapping. | |
| void | def_basfun (Real x, const Spline1D &sp, Real *fun, int *left=nullptr, int nderiv=1) |
| Define basis functions at a point (auto-locates interval) | |
| void | destroy (GBMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy (GEMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy (PBMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy (PeriodicMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy (ZGBMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy (ZGEMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy (ZPBMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy (ZPeriodicMat &mat) |
| Release numerical storage and reset a matrix descriptor. | |
| void | destroy_sp (Spline1D &sp) |
| Release all 1-D Views/matrices and reset scalar metadata. | |
| void | destroy_sp (Spline2D &sp) |
| Release both one-dimensional factors and all 2-D storage. | |
| void | destroy_sp (Spline2D1D &sp) |
| Release all three factors and all 3-D storage. | |
| Real | determinant (const GBMat &mat) |
| Compute determinant of factorized matrix. | |
| Real | determinant (const GEMat &mat) |
| Compute determinant of factorized matrix. | |
| Real | determinant (const PBMat &mat) |
| Compute determinant of factorized matrix. | |
| Complex | determinant (const ZGBMat &mat) |
| Compute determinant of factorized matrix. | |
| Complex | determinant (const ZGEMat &mat) |
| Compute determinant of factorized matrix. | |
| Complex | determinant (const ZPBMat &mat) |
| Compute determinant of factorized matrix. | |
| int | factor (GBMat &mat) |
| Compute LU factorization of matrix. | |
| int | factor (GEMat &mat) |
| Compute LU factorization of matrix. | |
| int | factor (PBMat &mat) |
| Compute LU factorization of matrix. | |
| int | factor (PeriodicMat &mat) |
| Compute LU factorization of matrix. | |
| int | factor (ZGBMat &mat) |
| Compute LU factorization of matrix. | |
| int | factor (ZGEMat &mat) |
| Compute LU factorization of matrix. | |
| int | factor (ZPBMat &mat) |
| Compute LU factorization of matrix. | |
| int | factor (ZPeriodicMat &mat) |
| Compute LU factorization of matrix. | |
| void | gauleg (Real x1, Real x2, Real *x, Real *w, int n) |
| Compute Gauss-Legendre quadrature points and weights. | |
| void | get_dim (const Spline1D &sp, int &dim, int *nx=nullptr, int *nidbas=nullptr) |
| Get dimension information from 1D spline. | |
| void | get_dim (const Spline2D &sp, int dim[2], int nx[2]=nullptr, int nidbas[2]=nullptr) |
| Get dimension information from both factors of a 2-D spline. | |
| void | get_gauss (const Spline1D &sp, int &n, int i=-1, Real *x=nullptr, Real *w=nullptr) |
| Get Gauss quadrature information from spline. | |
| void | get_splcoef (const Spline1D &sp, const Real *bcoef, Real *fvals) |
| Get function values from spline coefficients. | |
| void | getcol (const GBMat &mat, int j, Real *col) |
| Expand one logical matrix column into contiguous storage. | |
| void | getcol (const PBMat &mat, int j, Real *col) |
| Expand one logical matrix column into contiguous storage. | |
| void | getcol (const PeriodicMat &mat, int j, Real *col) |
| Expand one logical matrix column into contiguous storage. | |
| Real | getele (const GBMat &mat, int i, int j) |
| Get matrix element. | |
| Real | getele (const PBMat &mat, int i, int j) |
| Get matrix element. | |
| Real | getele (const PeriodicMat &mat, int i, int j) |
| Get matrix element. | |
| Complex | getele (const ZGBMat &mat, int i, int j) |
| Get matrix element. | |
| Complex | getele (const ZPBMat &mat, int i, int j) |
| Get matrix element. | |
| Complex | getele (const ZPeriodicMat &mat, int i, int j) |
| Get matrix element. | |
| void | getrow (const GBMat &mat, int i, Real *row) |
| Get row of matrix. | |
| void | getrow (const GEMat &mat, int i, Real *row) |
| Get row of matrix. | |
| void | getrow (const PBMat &mat, int i, Real *row) |
| Get row of matrix. | |
| void | getrow (const PeriodicMat &mat, int i, Real *row) |
| Get row of matrix. | |
| void | getrow (const ZPBMat &mat, int i, Complex *row) |
| Get row of matrix. | |
| Real * | getvalp (GBMat &mat, int i, int j) |
| Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly. | |
| Real * | getvalp (GEMat &mat, int i, int j) |
| Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly. | |
| Real * | getvalp (PBMat &mat, int i, int j) |
| Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly. | |
| Complex * | getvalp (ZGBMat &mat, int i, int j) |
| Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly. | |
| Complex * | getvalp (ZGEMat &mat, int i, int j) |
| Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly. | |
| Complex * | getvalp (ZPBMat &mat, int i, int j) |
| Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly. | |
| void | gridval (const Spline1D &sp, const Real *xgrid, int npts, const Real *bcoef, Real *fvals, int jder=0) |
| Evaluate spline on a grid of points. | |
| void | gridval (const Spline2D &sp, const Real *xgrid1, int npts1, const Real *xgrid2, int npts2, const Real *bcoef, Real *fvals, int jder1=0, int jder2=0) |
| Evaluate a tensor-product spline on a Cartesian product grid. | |
| void | gridval (const Spline2D1D &sp, const Real *xgrid1, int npts1, const Real *xgrid2, int npts2, const Real *xgrid3, int npts3, const Real *bcoef, Real *fvals, int jder1=0, int jder2=0, int jder3=0) |
| Evaluate 3D spline (2D+1D) on a 3D grid. | |
| void | init (int kl, int ku, int n, int nterms, GBMat &mat, int kmat=0, int mrows=-1) |
| Initialize a general band matrix. | |
| void | init (int kl, int ku, int n, int nterms, PeriodicMat &mat, int kmat=0) |
| Initialize a real periodic band matrix and Woodbury factors. | |
| void | init (int kl, int ku, int n, int nterms, ZGBMat &mat, int kmat=0, int mrows=-1) |
| Initialize a general band matrix. | |
| void | init (int kl, int ku, int n, int nterms, ZPeriodicMat &mat, int kmat=0) |
| Initialize a real periodic band matrix and Woodbury factors. | |
| void | init (int ku, int n, int nterms, PBMat &mat, int kmat=0) |
| Initialize a real symmetric positive-definite band matrix. | |
| void | init (int ku, int n, int nterms, ZPBMat &mat, int kmat=0) |
| Initialize a real symmetric positive-definite band matrix. | |
| void | init (int n, int nterms, GEMat &mat, int kmat=0, int mrows=-1) |
| Initialize a real general dense matrix. | |
| void | init (int n, int nterms, ZGEMat &mat, int kmat=0, int mrows=-1) |
| Initialize a real general dense matrix. | |
| void | interv (const Real *xt, int lxt, Real x, int &left, int &mflag) |
| Locate interval containing x in a knot sequence. | |
| void | interv_hint (const Real *xt, int lxt, Real x, int &left, int &mflag, int &ilo) |
| Thread-safe version of interv with explicit previous guess. | |
| bool | is_equid (const Real *grid, int n) |
| Check if a grid is equidistant. | |
| void | locintv (const Spline1D &sp, Real x, int &left) |
| Locate interval containing x in spline knot sequence. | |
| void | maddto (Real alpha, const GBMat &a, GBMat &b) |
Accumulate B = B + alpha*A without changing storage layout. | |
| void | maddto (Real alpha, const GEMat &a, GEMat &b) |
Accumulate B = B + alpha*A without changing storage layout. | |
| void | maddto (Real alpha, const PBMat &a, PBMat &b) |
Accumulate B = B + alpha*A without changing storage layout. | |
| void | maddto (Real alpha, const PeriodicMat &a, PeriodicMat &b) |
Accumulate B = B + alpha*A without changing storage layout. | |
| void | mcopy (const GBMat &src, GBMat &dst) |
| Deep-copy matrix metadata and numerical storage. | |
| void | mcopy (const GEMat &src, GEMat &dst) |
| Deep-copy matrix metadata and numerical storage. | |
| void | mcopy (const PBMat &src, PBMat &dst) |
| Deep-copy matrix metadata and numerical storage. | |
| void | mcopy (const PeriodicMat &src, PeriodicMat &dst) |
| Deep-copy matrix metadata and numerical storage. | |
| Real | ppval (const Real *t, const Real *coef, int n, int k, Real x, int &left) |
| Evaluate polynomial in piecewise polynomial form. | |
| void | putcol (GBMat &mat, int j, const Real *col) |
| Replace one zero-based logical matrix column. | |
| void | putcol (GEMat &mat, int j, const Real *col) |
| Replace one zero-based logical matrix column. | |
| void | putcol (PBMat &mat, int j, const Real *col) |
| Replace one zero-based logical matrix column. | |
| void | putcol (PeriodicMat &mat, int j, const Real *col) |
| Replace one zero-based logical matrix column. | |
| void | putcol (ZPBMat &mat, int j, const Complex *col) |
| Replace one zero-based logical matrix column. | |
| void | putele (GBMat &mat, Real val, int i, int j) |
| Assign one zero-based logical matrix element. | |
| void | putele (PBMat &mat, Real val, int i, int j) |
| Assign one zero-based logical matrix element. | |
| void | putele (PeriodicMat &mat, Real val, int i, int j) |
| Assign one zero-based logical matrix element. | |
| void | putele (ZGBMat &mat, Complex val, int i, int j) |
| Assign one zero-based logical matrix element. | |
| void | putele (ZPBMat &mat, Complex val, int i, int j) |
| Assign one zero-based logical matrix element. | |
| void | putele (ZPeriodicMat &mat, Complex val, int i, int j) |
| Assign one zero-based logical matrix element. | |
| void | putrow (GBMat &mat, int i, const Real *row) |
| Replace one zero-based logical matrix row. | |
| void | putrow (GEMat &mat, int i, const Real *row) |
| Replace one zero-based logical matrix row. | |
| void | putrow (PBMat &mat, int i, const Real *row) |
| Replace one zero-based logical matrix row. | |
| void | putrow (PeriodicMat &mat, int i, const Real *row) |
| Replace one zero-based logical matrix row. | |
| void | putrow (ZPBMat &mat, int i, const Complex *row) |
| Replace one zero-based logical matrix row. | |
| void | set_splcoef (Spline1D &sp, const Real *fvals, Real *bcoef) |
| Set spline coefficients from function values. | |
| void | set_spline (const int p[2], const int ngauss[2], const Real *grid1, int ngrid1, const Real *grid2, int ngrid2, Spline2D &sp, const bool period[2]=nullptr, bool nlppform=true, const int nlequid[2]=nullptr) |
| Initialize a 2D spline. | |
| void | set_spline (const int p[3], const int ngauss[3], const Real *grid1, int ngrid1, const Real *grid2, int ngrid2, const Real *grid3, int ngrid3, Spline2D1D &sp, const bool period[3]=nullptr, bool nlppform=true, const int nlequid[3]=nullptr) |
| Initialize a 2D+1D spline. | |
| void | set_spline (int p, int ngauss, const Real *grid, int ngrid, Spline1D &sp, bool period=false, bool nlppform=true, int nlequid=-1) |
| Initialize a 1D spline. | |
| void | updtmat (GBMat &mat, Real val, int i, int j) |
| Update matrix element: mat(i,j) += val. | |
| void | updtmat (GEMat &mat, Real val, int i, int j) |
| Update matrix element: mat(i,j) += val. | |
| void | updtmat (PBMat &mat, Real val, int i, int j) |
| Update matrix element: mat(i,j) += val. | |
| void | updtmat (PeriodicMat &mat, Real val, int i, int j) |
| Update matrix element: mat(i,j) += val. | |
| void | updtmat (ZGBMat &mat, Complex val, int i, int j) |
| Update matrix element: mat(i,j) += val. | |
| void | updtmat (ZPBMat &mat, Complex val, int i, int j) |
| Update matrix element: mat(i,j) += val. | |
| void | updtmat (ZPeriodicMat &mat, Complex val, int i, int j) |
| Update matrix element: mat(i,j) += val. | |
| void | vmx (const GBMat &mat, const Real *x, Real *y) |
| Compute y = A*x. | |
| void | vmx (const GBMat &mat, const Real *x, Real *y, int nrhs) |
| Compute Y = A*X for multiple vectors. | |
| void | vmx (const GEMat &mat, const Real *x, Real *y) |
| Compute y = A*x. | |
| void | vmx (const GEMat &mat, const Real *x, Real *y, int nrhs) |
| Compute Y = A*X for multiple vectors. | |
| void | vmx (const PBMat &mat, const Real *x, Real *y) |
| Compute y = A*x. | |
| void | vmx (const PeriodicMat &mat, const Real *x, Real *y) |
| Compute y = A*x. | |
| void | vmx (const ZGBMat &mat, const Complex *x, Complex *y) |
| Compute y = A*x. | |
| void | vmx (const ZGEMat &mat, const Complex *x, Complex *y) |
| Compute y = A*x. | |
| void | vmx (const ZPBMat &mat, const Complex *x, Complex *y) |
| Compute y = A*x. | |
| void | vmx (const ZPeriodicMat &mat, const Complex *x, Complex *y) |
| Compute y = A*x. | |
Variables | |
| constexpr int | JMAX = 20 |
| Maximum spline order supported (degree + 1) | |
| using orb5x::spclibs::spline1d = typedef Spline1D |
Backward-compatible name for Spline1D.
| using orb5x::spclibs::spline2d = typedef Spline2D |
Backward-compatible name for Spline2D.
| using orb5x::spclibs::spline2d1d = typedef Spline2D1D |
Backward-compatible name for Spline2D1D.
Evaluate basis functions and derivatives at a point.
| [in] | x | Coordinate at which to evaluate, in grid units. |
| [in] | sp | Initialized spline. |
| [out] | fun | Array of at least order*nderiv values and derivatives: fun[i + j*order] = jth derivative of ith basis function i = 0, ..., order-1 (basis functions) j = 0, ..., nderiv-1 (derivatives) |
| [in] | left | One-based interval index, retained from the Fortran interface. |
| [in] | nderiv | Number of derivative levels including the value; one computes only values. |
| void orb5x::spclibs::bsolve | ( | const PeriodicMat & | mat, |
| Real * | b, | ||
| int | nrhs = 1 |
||
| ) |
| void orb5x::spclibs::bsolve | ( | const ZPeriodicMat & | mat, |
| Complex * | b, | ||
| int | nrhs = 1 |
||
| ) |
Evaluate B-spline basis functions at a point.
Evaluates all possibly nonzero B-splines at X of order jhigh with knot sequence T. Uses the recurrence relation:
X - T(I) T(I+J+1) - X
B(I,J+1)(X) = --------— * B(I,J)(X) + ------------— * B(I+1,J)(X) T(I+J)-T(I) T(I+J+1)-T(I+1)
| t | Knot sequence (at least left+jhigh elements) |
| jhigh | Order of B-splines to evaluate |
| x | Point at which to evaluate |
| left | Index such that t[left] <= x < t[left+1] |
| biatx | Output: B-spline values (jhigh elements) |
Note: Uses 0-based indexing (Fortran version uses 1-based)
| void orb5x::spclibs::bsplvd | ( | const Real * | t, |
| int | k, | ||
| Real | x, | ||
| int | left, | ||
| Real * | a, | ||
| Real * | dbiatx, | ||
| int | nderiv | ||
| ) |
Evaluate B-spline basis functions and derivatives at a point.
Computes values at X of all the relevant B-splines of order k, k-1, ..., k+1-nderiv and their derivatives.
| t | Knot sequence (at least left+k elements) |
| k | Order of B-splines |
| x | Point at which to evaluate |
| left | Index such that t[left] <= x < t[left+1] |
| a | Workspace array (k x k) |
| dbiatx | Output: B-spline values and derivatives (k x nderiv) dbiatx[i + m*k] = (m-1)th derivative of (left-k+i+1)th B-spline |
| nderiv | Number of derivatives (including value) to compute |
Note: Uses 0-based indexing
| void orb5x::spclibs::bspp2d | ( | const Real * | t, |
| const Real * | bcoef, | ||
| int | n, | ||
| int | k, | ||
| Real * | scrtch, | ||
| Real * | ppcoef | ||
| ) |
Convert B-spline coefficients to PPFORM.
Converts B-spline representation to piecewise polynomial form.
| t | Knot sequence |
| bcoef | B-spline coefficients (dim elements) |
| n | Number of intervals |
| k | Order |
| scrtch | Scratch array (k x k) |
| ppcoef | Output: PPFORM coefficients (k x n) |
Calculate integral of each basis function.
| [in] | sp | Initialized spline, preferably with Gauss quadrature data. |
| [out] | integ | Array of sp.dim basis integrals in coordinate units. |
Compute mass matrix for FEM discretization.
| [in] | sp | Initialized nonperiodic spline with Gauss quadrature data. |
| [out] | mat | Initialized general band matrix representing \(M_{ij}=\int B_i(x)B_j(x)\,dx\). |
| void orb5x::spclibs::CompMassMatrix | ( | const Spline1D & | sp, |
| PeriodicMat & | mat | ||
| ) |
Assemble the finite-element mass matrix with periodic index wrapping.
| [in] | sp | Initialized periodic spline with Gauss quadrature data. |
| [out] | mat | Initialized periodic band matrix representing \(M_{ij}=\int B_i(x)B_j(x)\,dx\). |
| void orb5x::spclibs::def_basfun | ( | Real | x, |
| const Spline1D & | sp, | ||
| Real * | fun, | ||
| int * | left = nullptr, |
||
| int | nderiv = 1 |
||
| ) |
Define basis functions at a point (auto-locates interval)
| [in] | x | Coordinate at which to evaluate, in grid units. |
| [in] | sp | Initialized spline. |
| [out] | fun | Array of at least order*nderiv values and derivatives. |
| [out] | left | Optional zero-based containing interval. |
| [in] | nderiv | Number of derivative levels including the value. |
| void orb5x::spclibs::destroy | ( | GBMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy | ( | GEMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy | ( | PBMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy | ( | PeriodicMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy | ( | ZGBMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy | ( | ZGEMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy | ( | ZPBMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy | ( | ZPeriodicMat & | mat | ) |
Release numerical storage and reset a matrix descriptor.
| [in,out] | mat | Matrix to destroy; it is empty on return. |
| void orb5x::spclibs::destroy_sp | ( | Spline1D & | sp | ) |
Release all 1-D Views/matrices and reset scalar metadata.
| [in,out] | sp | Descriptor to return to the uninitialized state. |
| void orb5x::spclibs::destroy_sp | ( | Spline2D & | sp | ) |
Release both one-dimensional factors and all 2-D storage.
| [in,out] | sp | Descriptor to return to the uninitialized state. |
| void orb5x::spclibs::destroy_sp | ( | Spline2D1D & | sp | ) |
Release all three factors and all 3-D storage.
| [in,out] | sp | Descriptor to return to the uninitialized state. |
Compute determinant of factorized matrix.
| mat | Factorized matrix |
Compute determinant of factorized matrix.
| mat | Factorized matrix |
Compute determinant of factorized matrix.
| mat | Factorized matrix |
Compute determinant of factorized matrix.
| mat | Factorized matrix |
Compute determinant of factorized matrix.
| mat | Factorized matrix |
Compute determinant of factorized matrix.
| mat | Factorized matrix |
| int orb5x::spclibs::factor | ( | GBMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
| int orb5x::spclibs::factor | ( | GEMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
| int orb5x::spclibs::factor | ( | PBMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
| int orb5x::spclibs::factor | ( | PeriodicMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
| int orb5x::spclibs::factor | ( | ZGBMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
| int orb5x::spclibs::factor | ( | ZGEMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
| int orb5x::spclibs::factor | ( | ZPBMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
| int orb5x::spclibs::factor | ( | ZPeriodicMat & | mat | ) |
Compute LU factorization of matrix.
| mat | Matrix to factorize (modified in place) |
For GBMat: Uses LAPACK DGBTRF For GEMat: Uses LAPACK DGETRF For PBMat: Uses LAPACK DPBTRF (Cholesky) For PeriodicMat: Uses Woodbury formula with DGBTRF
Compute Gauss-Legendre quadrature points and weights.
Computes the n-point Gauss-Legendre quadrature rule on [x1, x2].
| x1 | Left endpoint of interval |
| x2 | Right endpoint of interval |
| x | Output: quadrature points (n elements) |
| w | Output: quadrature weights (n elements) |
| n | Number of quadrature points |
| void orb5x::spclibs::get_dim | ( | const Spline1D & | sp, |
| int & | dim, | ||
| int * | nx = nullptr, |
||
| int * | nidbas = nullptr |
||
| ) |
Get dimension information from 1D spline.
| [in] | sp | Initialized spline descriptor. |
| [out] | dim | Number of independent spline coefficients. |
| [out] | nx | Optional number of knot intervals. |
| [out] | nidbas | Optional polynomial degree (order-1). |
| void orb5x::spclibs::get_dim | ( | const Spline2D & | sp, |
| int | dim[2], | ||
| int | nx[2] = nullptr, |
||
| int | nidbas[2] = nullptr |
||
| ) |
Get dimension information from both factors of a 2-D spline.
| [in] | sp | Initialized tensor-product descriptor. |
| [out] | dim | Two coefficient-space dimensions. |
| [out] | nx | Optional interval counts in the two directions. |
| [out] | nidbas | Optional polynomial degrees in the two directions. |
| void orb5x::spclibs::get_gauss | ( | const Spline1D & | sp, |
| int & | n, | ||
| int | i = -1, |
||
| Real * | x = nullptr, |
||
| Real * | w = nullptr |
||
| ) |
Get Gauss quadrature information from spline.
| [in] | sp | Initialized spline with optional quadrature storage. |
| [out] | n | Number of Gauss points per interval, possibly zero. |
| [in] | i | Zero-based interval to copy, or a negative value for count only. |
| [out] | x | Optional array of at least n abscissas; written only with w and valid i. |
| [out] | w | Optional array of at least n integration weights; written only with x and valid i. |
Get function values from spline coefficients.
Computes fvals = M * bcoef where M is the interpolation matrix.
| [in] | sp | Spline with its appropriate interpolation matrix initialized. |
| [in] | bcoef | Array of sp.dim spline coefficients. |
| [out] | fvals | Array of sp.dim values receiving the matrix product. |
Expand one logical matrix column into contiguous storage.
| [in] | mat | Source matrix. |
| [in] | j | Zero-based logical column. |
| [out] | col | Caller storage with at least mrows elements. |
Expand one logical matrix column into contiguous storage.
| [in] | mat | Source matrix. |
| [in] | j | Zero-based logical column. |
| [out] | col | Caller storage with at least mrows elements. |
| void orb5x::spclibs::getcol | ( | const PeriodicMat & | mat, |
| int | j, | ||
| Real * | col | ||
| ) |
Expand one logical matrix column into contiguous storage.
| [in] | mat | Source matrix. |
| [in] | j | Zero-based logical column. |
| [out] | col | Caller storage with at least mrows elements. |
Get matrix element.
| mat | Matrix |
| i | Row index (0-based) |
| j | Column index (0-based) |
Get matrix element.
| mat | Matrix |
| i | Row index (0-based) |
| j | Column index (0-based) |
| Real orb5x::spclibs::getele | ( | const PeriodicMat & | mat, |
| int | i, | ||
| int | j | ||
| ) |
Get matrix element.
| mat | Matrix |
| i | Row index (0-based) |
| j | Column index (0-based) |
Get matrix element.
| mat | Matrix |
| i | Row index (0-based) |
| j | Column index (0-based) |
Get matrix element.
| mat | Matrix |
| i | Row index (0-based) |
| j | Column index (0-based) |
| Complex orb5x::spclibs::getele | ( | const ZPeriodicMat & | mat, |
| int | i, | ||
| int | j | ||
| ) |
Get matrix element.
| mat | Matrix |
| i | Row index (0-based) |
| j | Column index (0-based) |
Get row of matrix.
| mat | Matrix |
| i | Row index (0-based) |
| row | Output array (must be pre-allocated with size ncols) |
Get row of matrix.
| mat | Matrix |
| i | Row index (0-based) |
| row | Output array (must be pre-allocated with size ncols) |
Get row of matrix.
| mat | Matrix |
| i | Row index (0-based) |
| row | Output array (must be pre-allocated with size ncols) |
| void orb5x::spclibs::getrow | ( | const PeriodicMat & | mat, |
| int | i, | ||
| Real * | row | ||
| ) |
Get row of matrix.
| mat | Matrix |
| i | Row index (0-based) |
| row | Output array (must be pre-allocated with size ncols) |
Get row of matrix.
| mat | Matrix |
| i | Row index (0-based) |
| row | Output array (must be pre-allocated with size ncols) |
Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly.
| [in,out] | mat | Matrix whose physical storage is requested. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
(i,j) is not represented. Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly.
| [in,out] | mat | Matrix whose physical storage is requested. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
(i,j) is not represented. Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly.
| [in,out] | mat | Matrix whose physical storage is requested. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
(i,j) is not represented. Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly.
| [in,out] | mat | Matrix whose physical storage is requested. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
(i,j) is not represented. Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly.
| [in,out] | mat | Matrix whose physical storage is requested. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
(i,j) is not represented. Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly.
| [in,out] | mat | Matrix whose physical storage is requested. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
(i,j) is not represented. | void orb5x::spclibs::gridval | ( | const Spline1D & | sp, |
| const Real * | xgrid, | ||
| int | npts, | ||
| const Real * | bcoef, | ||
| Real * | fvals, | ||
| int | jder = 0 |
||
| ) |
Evaluate spline on a grid of points.
Given spline coefficients bcoef, compute function values on grid.
| [in] | sp | Initialized spline. |
| [in] | xgrid | Evaluation coordinates of length npts. |
| [in] | npts | Number of evaluation coordinates. |
| [in] | bcoef | Spline coefficients of length sp.dim. |
| [out] | fvals | Evaluated values or derivatives of length npts. |
| [in] | jder | Derivative order; zero evaluates the represented function. |
| void orb5x::spclibs::gridval | ( | const Spline2D & | sp, |
| const Real * | xgrid1, | ||
| int | npts1, | ||
| const Real * | xgrid2, | ||
| int | npts2, | ||
| const Real * | bcoef, | ||
| Real * | fvals, | ||
| int | jder1 = 0, |
||
| int | jder2 = 0 |
||
| ) |
Evaluate a tensor-product spline on a Cartesian product grid.
| [in] | sp | Initialized two-dimensional descriptor. |
| [in] | xgrid1 | First-direction coordinates of length npts1. |
| [in] | npts1 | First-direction point count. |
| [in] | xgrid2 | Second-direction coordinates of length npts2. |
| [in] | npts2 | Second-direction point count. |
| [in] | bcoef | Coefficients of length sp1.dim*sp2.dim, direction 1 fastest. |
| [out] | fvals | Results of length npts1*npts2, direction 1 fastest. |
| [in] | jder1 | Derivative order in direction 1. |
| [in] | jder2 | Derivative order in direction 2. |
| void orb5x::spclibs::gridval | ( | const Spline2D1D & | sp, |
| const Real * | xgrid1, | ||
| int | npts1, | ||
| const Real * | xgrid2, | ||
| int | npts2, | ||
| const Real * | xgrid3, | ||
| int | npts3, | ||
| const Real * | bcoef, | ||
| Real * | fvals, | ||
| int | jder1 = 0, |
||
| int | jder2 = 0, |
||
| int | jder3 = 0 |
||
| ) |
Evaluate 3D spline (2D+1D) on a 3D grid.
Given spline coefficients bcoef, compute function values on 3D grid. Based on Fortran gridval2d1d_3d (bsplines.f90 lines 2613-2753).
| [in] | sp | 2-D-plus-1-D spline (sp12 for directions 1–2 and sp3 for direction 3). |
| [in] | xgrid1 | Direction-1 coordinates of length npts1. |
| [in] | npts1 | Direction-1 point count. |
| [in] | xgrid2 | Direction-2 coordinates of length npts2. |
| [in] | npts2 | Direction-2 point count. |
| [in] | xgrid3 | Direction-3 coordinates of length npts3. |
| [in] | npts3 | Direction-3 point count. |
| [in] | bcoef | dim1*dim2*dim3 coefficients, direction 1 fastest. |
| [out] | fvals | npts1*npts2*npts3 results, direction 1 fastest. |
| [in] | jder1 | Derivative order in direction 1. |
| [in] | jder2 | Derivative order in direction 2. |
| [in] | jder3 | Derivative order in direction 3. |
| void orb5x::spclibs::init | ( | int | kl, |
| int | ku, | ||
| int | n, | ||
| int | nterms, | ||
| GBMat & | mat, | ||
| int | kmat = 0, |
||
| int | mrows = -1 |
||
| ) |
Initialize a general band matrix.
| kl | Number of subdiagonals |
| ku | Number of superdiagonals |
| n | Matrix dimension (square matrix) |
| nterms | Number of non-zero terms (informational) |
| mat | Output matrix |
| kmat | Optional matrix identifier |
| mrows | Optional number of rows (defaults to n) Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
Referenced by orb5x::Zbmat::allocate_band().
| void orb5x::spclibs::init | ( | int | kl, |
| int | ku, | ||
| int | n, | ||
| int | nterms, | ||
| PeriodicMat & | mat, | ||
| int | kmat = 0 |
||
| ) |
Initialize a real periodic band matrix and Woodbury factors.
| [in] | kl | Number of subdiagonals. |
| [in] | ku | Number of superdiagonals. |
| [in] | n | Square matrix dimension. |
| [in] | nterms | Informational assembled-term count. |
| [out] | mat | Allocated periodic descriptor. |
| [in] | kmat | Optional caller-defined identifier. Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
| void orb5x::spclibs::init | ( | int | kl, |
| int | ku, | ||
| int | n, | ||
| int | nterms, | ||
| ZGBMat & | mat, | ||
| int | kmat = 0, |
||
| int | mrows = -1 |
||
| ) |
Initialize a general band matrix.
| kl | Number of subdiagonals |
| ku | Number of superdiagonals |
| n | Matrix dimension (square matrix) |
| nterms | Number of non-zero terms (informational) |
| mat | Output matrix |
| kmat | Optional matrix identifier |
| mrows | Optional number of rows (defaults to n) Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
| void orb5x::spclibs::init | ( | int | kl, |
| int | ku, | ||
| int | n, | ||
| int | nterms, | ||
| ZPeriodicMat & | mat, | ||
| int | kmat = 0 |
||
| ) |
Initialize a real periodic band matrix and Woodbury factors.
| [in] | kl | Number of subdiagonals. |
| [in] | ku | Number of superdiagonals. |
| [in] | n | Square matrix dimension. |
| [in] | nterms | Informational assembled-term count. |
| [out] | mat | Allocated periodic descriptor. |
| [in] | kmat | Optional caller-defined identifier. Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
| void orb5x::spclibs::init | ( | int | ku, |
| int | n, | ||
| int | nterms, | ||
| PBMat & | mat, | ||
| int | kmat = 0 |
||
| ) |
Initialize a real symmetric positive-definite band matrix.
| [in] | ku | Number of stored upper superdiagonals. |
| [in] | n | Square matrix dimension. |
| [in] | nterms | Informational assembled-term count. |
| [out] | mat | Allocated packed-band descriptor. |
| [in] | kmat | Optional caller-defined identifier. Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
| void orb5x::spclibs::init | ( | int | ku, |
| int | n, | ||
| int | nterms, | ||
| ZPBMat & | mat, | ||
| int | kmat = 0 |
||
| ) |
Initialize a real symmetric positive-definite band matrix.
| [in] | ku | Number of stored upper superdiagonals. |
| [in] | n | Square matrix dimension. |
| [in] | nterms | Informational assembled-term count. |
| [out] | mat | Allocated packed-band descriptor. |
| [in] | kmat | Optional caller-defined identifier. Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
| void orb5x::spclibs::init | ( | int | n, |
| int | nterms, | ||
| GEMat & | mat, | ||
| int | kmat = 0, |
||
| int | mrows = -1 |
||
| ) |
Initialize a real general dense matrix.
| [in] | n | Number of columns and default row count. |
| [in] | nterms | Informational assembled-term count. |
| [out] | mat | Allocated matrix descriptor. |
| [in] | kmat | Optional caller-defined identifier. |
| [in] | mrows | Optional row count; negative selects n. Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
| void orb5x::spclibs::init | ( | int | n, |
| int | nterms, | ||
| ZGEMat & | mat, | ||
| int | kmat = 0, |
||
| int | mrows = -1 |
||
| ) |
Initialize a real general dense matrix.
| [in] | n | Number of columns and default row count. |
| [in] | nterms | Informational assembled-term count. |
| [out] | mat | Allocated matrix descriptor. |
| [in] | kmat | Optional caller-defined identifier. |
| [in] | mrows | Optional row count; negative selects n. Allocate matrix storage and initialize dimensions, bandwidths, identifiers, and pivots. |
Locate interval containing x in a knot sequence.
Given a nondecreasing sequence xt and a value x, finds the largest index left such that xt[left] <= x.
| xt | Knot sequence (lxt elements) |
| lxt | Length of knot sequence |
| x | Point to locate |
| left | Output: index of bracketing value 0 if x < xt[0] i if xt[i] <= x < xt[i+1] lxt-1 if xt[lxt-1] <= x |
| mflag | Output: indicates position relative to knot sequence -1: x < xt[0] 0: xt[left] <= x < xt[left+1] +1: xt[lxt-1] <= x |
Note: Uses 0-based indexing
| void orb5x::spclibs::interv_hint | ( | const Real * | xt, |
| int | lxt, | ||
| Real | x, | ||
| int & | left, | ||
| int & | mflag, | ||
| int & | ilo | ||
| ) |
Thread-safe version of interv with explicit previous guess.
| xt | Knot sequence |
| lxt | Length of sequence |
| x | Point to locate |
| left | Output: interval index |
| mflag | Output: boundary flag |
| ilo | Previous guess for left (updated on output) |
| bool orb5x::spclibs::is_equid | ( | const Real * | grid, |
| int | n | ||
| ) |
Check if a grid is equidistant.
| [in] | grid | Grid coordinates of length n. |
| [in] | n | Number of coordinates. |
Locate interval containing x in spline knot sequence.
| [in] | sp | Initialized spline and knot sequence. |
| [in] | x | Coordinate to locate; periodic coordinates are wrapped by lperiod. |
| [out] | left | Clamped zero-based interval index in [0,nints-1]. |
Accumulate B = B + alpha*A without changing storage layout.
| [in] | alpha | Scalar multiplier. |
| [in] | a | Source matrix. |
| [in,out] | b | Compatible destination/accumulator matrix. |
Accumulate B = B + alpha*A without changing storage layout.
| [in] | alpha | Scalar multiplier. |
| [in] | a | Source matrix. |
| [in,out] | b | Compatible destination/accumulator matrix. |
Accumulate B = B + alpha*A without changing storage layout.
| [in] | alpha | Scalar multiplier. |
| [in] | a | Source matrix. |
| [in,out] | b | Compatible destination/accumulator matrix. |
| void orb5x::spclibs::maddto | ( | Real | alpha, |
| const PeriodicMat & | a, | ||
| PeriodicMat & | b | ||
| ) |
Accumulate B = B + alpha*A without changing storage layout.
| [in] | alpha | Scalar multiplier. |
| [in] | a | Source matrix. |
| [in,out] | b | Compatible destination/accumulator matrix. |
Deep-copy matrix metadata and numerical storage.
| [in] | src | Initialized source matrix. |
| [out] | dst | Independently allocated destination matrix. |
Deep-copy matrix metadata and numerical storage.
| [in] | src | Initialized source matrix. |
| [out] | dst | Independently allocated destination matrix. |
Deep-copy matrix metadata and numerical storage.
| [in] | src | Initialized source matrix. |
| [out] | dst | Independently allocated destination matrix. |
| void orb5x::spclibs::mcopy | ( | const PeriodicMat & | src, |
| PeriodicMat & | dst | ||
| ) |
Deep-copy matrix metadata and numerical storage.
| [in] | src | Initialized source matrix. |
| [out] | dst | Independently allocated destination matrix. |
Evaluate polynomial in piecewise polynomial form.
Evaluates the piecewise polynomial at point x using the PPFORM coefficients.
| t | Breakpoints (n+1 elements) |
| coef | PPFORM coefficients (k x n, column-major) |
| n | Number of intervals |
| k | Order of polynomial |
| x | Point at which to evaluate |
| left | Hint for interval location |
Replace one zero-based logical matrix column.
| [in,out] | mat | Matrix to modify. |
| [in] | j | Zero-based logical column. |
| [in] | col | Contiguous input with at least mrows elements. |
Replace one zero-based logical matrix column.
| [in,out] | mat | Matrix to modify. |
| [in] | j | Zero-based logical column. |
| [in] | col | Contiguous input with at least mrows elements. |
Replace one zero-based logical matrix column.
| [in,out] | mat | Matrix to modify. |
| [in] | j | Zero-based logical column. |
| [in] | col | Contiguous input with at least mrows elements. |
| void orb5x::spclibs::putcol | ( | PeriodicMat & | mat, |
| int | j, | ||
| const Real * | col | ||
| ) |
Replace one zero-based logical matrix column.
| [in,out] | mat | Matrix to modify. |
| [in] | j | Zero-based logical column. |
| [in] | col | Contiguous input with at least mrows elements. |
Replace one zero-based logical matrix column.
| [in,out] | mat | Matrix to modify. |
| [in] | j | Zero-based logical column. |
| [in] | col | Contiguous input with at least mrows elements. |
Assign one zero-based logical matrix element.
| [in,out] | mat | Matrix to modify. |
| [in] | val | New scalar value. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
Assign one zero-based logical matrix element.
| [in,out] | mat | Matrix to modify. |
| [in] | val | New scalar value. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
| void orb5x::spclibs::putele | ( | PeriodicMat & | mat, |
| Real | val, | ||
| int | i, | ||
| int | j | ||
| ) |
Assign one zero-based logical matrix element.
| [in,out] | mat | Matrix to modify. |
| [in] | val | New scalar value. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
Assign one zero-based logical matrix element.
| [in,out] | mat | Matrix to modify. |
| [in] | val | New scalar value. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
Assign one zero-based logical matrix element.
| [in,out] | mat | Matrix to modify. |
| [in] | val | New scalar value. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
| void orb5x::spclibs::putele | ( | ZPeriodicMat & | mat, |
| Complex | val, | ||
| int | i, | ||
| int | j | ||
| ) |
Assign one zero-based logical matrix element.
| [in,out] | mat | Matrix to modify. |
| [in] | val | New scalar value. |
| [in] | i | Zero-based logical row. |
| [in] | j | Zero-based logical column. |
Replace one zero-based logical matrix row.
| [in,out] | mat | Matrix to modify. |
| [in] | i | Zero-based logical row. |
| [in] | row | Contiguous input with at least ncols elements. |
Replace one zero-based logical matrix row.
| [in,out] | mat | Matrix to modify. |
| [in] | i | Zero-based logical row. |
| [in] | row | Contiguous input with at least ncols elements. |
Replace one zero-based logical matrix row.
| [in,out] | mat | Matrix to modify. |
| [in] | i | Zero-based logical row. |
| [in] | row | Contiguous input with at least ncols elements. |
| void orb5x::spclibs::putrow | ( | PeriodicMat & | mat, |
| int | i, | ||
| const Real * | row | ||
| ) |
Replace one zero-based logical matrix row.
| [in,out] | mat | Matrix to modify. |
| [in] | i | Zero-based logical row. |
| [in] | row | Contiguous input with at least ncols elements. |
Replace one zero-based logical matrix row.
| [in,out] | mat | Matrix to modify. |
| [in] | i | Zero-based logical row. |
| [in] | row | Contiguous input with at least ncols elements. |
Set spline coefficients from function values.
Computes spline coefficients by interpolation: solve M * bcoef = fvals where M is the interpolation matrix.
| [in] | sp | Spline with its appropriate periodic or nonperiodic interpolation matrix initialized. |
| [in] | fvals | Function values at sp.dim interpolation sites. |
| [out] | bcoef | Array of sp.dim coefficients; initially receives a copy of fvals and is overwritten by the matrix solve when the matrix exists. |
| void orb5x::spclibs::set_spline | ( | const int | p[2], |
| const int | ngauss[2], | ||
| const Real * | grid1, | ||
| int | ngrid1, | ||
| const Real * | grid2, | ||
| int | ngrid2, | ||
| Spline2D & | sp, | ||
| const bool | period[2] = nullptr, |
||
| bool | nlppform = true, |
||
| const int | nlequid[2] = nullptr |
||
| ) |
Initialize a 2D spline.
| [in] | p | Polynomial degrees [direction 1,direction 2]. |
| [in] | ngauss | Gauss-point counts per interval in the two directions. |
| [in] | grid1 | First-direction grid edges of length ngrid1. |
| [in] | ngrid1 | Number of first-direction grid edges. |
| [in] | grid2 | Second-direction grid edges of length ngrid2. |
| [in] | ngrid2 | Number of second-direction grid edges. |
| [out] | sp | Initialized tensor-product descriptor and coefficient View. |
| [in] | period | Optional two-element periodicity flags; null means nonperiodic. |
| [in] | nlppform | Use cached piecewise-polynomial basis evaluation. |
| [in] | nlequid | Optional two-element equidistance overrides; null auto-detects. |
bsplines.f90: two-dimensional set_spline interface.| void orb5x::spclibs::set_spline | ( | const int | p[3], |
| const int | ngauss[3], | ||
| const Real * | grid1, | ||
| int | ngrid1, | ||
| const Real * | grid2, | ||
| int | ngrid2, | ||
| const Real * | grid3, | ||
| int | ngrid3, | ||
| Spline2D1D & | sp, | ||
| const bool | period[3] = nullptr, |
||
| bool | nlppform = true, |
||
| const int | nlequid[3] = nullptr |
||
| ) |
Initialize a 2D+1D spline.
| [in] | p | Polynomial degrees for the three directions. |
| [in] | ngauss | Gauss-point counts per interval for the three directions. |
| [in] | grid1 | First-direction grid edges of length ngrid1. |
| [in] | ngrid1 | Number of first-direction grid edges. |
| [in] | grid2 | Second-direction grid edges of length ngrid2. |
| [in] | ngrid2 | Number of second-direction grid edges. |
| [in] | grid3 | Third-direction grid edges of length ngrid3. |
| [in] | ngrid3 | Number of third-direction grid edges. |
| [out] | sp | Initialized 2-D-plus-1-D descriptor and coefficient View. |
| [in] | period | Optional three-element periodicity flags; null means nonperiodic. |
| [in] | nlppform | Use cached piecewise-polynomial basis evaluation. |
| [in] | nlequid | Optional three-element equidistance overrides; null auto-detects. |
bsplines.f90: set_spline2d1d family.| void orb5x::spclibs::set_spline | ( | int | p, |
| int | ngauss, | ||
| const Real * | grid, | ||
| int | ngrid, | ||
| Spline1D & | sp, | ||
| bool | period = false, |
||
| bool | nlppform = true, |
||
| int | nlequid = -1 |
||
| ) |
Initialize a 1D spline.
| [in] | p | Polynomial degree; the stored order is p+1. |
| [in] | ngauss | Gauss–Legendre points per interval, or zero to omit quadrature. |
| [in] | grid | Strictly ordered grid edges of length ngrid. |
| [in] | ngrid | Number of grid edges; creates ngrid-1 intervals. |
| [out] | sp | Initialized descriptor, cached bases, quadrature, integrals, and coefficients. |
| [in] | period | Wrap the knot extension and basis indices periodically. |
| [in] | nlppform | Use cached piecewise-polynomial basis values during evaluation. |
| [in] | nlequid | Equidistance override: negative detects it, zero disables it, and a positive value enables the direct uniform-grid locator. |
bsplines.f90: set_spline1d.Update matrix element: mat(i,j) += val.
| mat | Matrix to update |
| val | Value to add |
| i | Row index (0-based) |
| j | Column index (0-based) |
Update matrix element: mat(i,j) += val.
| mat | Matrix to update |
| val | Value to add |
| i | Row index (0-based) |
| j | Column index (0-based) |
Update matrix element: mat(i,j) += val.
| mat | Matrix to update |
| val | Value to add |
| i | Row index (0-based) |
| j | Column index (0-based) |
| void orb5x::spclibs::updtmat | ( | PeriodicMat & | mat, |
| Real | val, | ||
| int | i, | ||
| int | j | ||
| ) |
Update matrix element: mat(i,j) += val.
| mat | Matrix to update |
| val | Value to add |
| i | Row index (0-based) |
| j | Column index (0-based) |
Update matrix element: mat(i,j) += val.
| mat | Matrix to update |
| val | Value to add |
| i | Row index (0-based) |
| j | Column index (0-based) |
Update matrix element: mat(i,j) += val.
| mat | Matrix to update |
| val | Value to add |
| i | Row index (0-based) |
| j | Column index (0-based) |
| void orb5x::spclibs::updtmat | ( | ZPeriodicMat & | mat, |
| Complex | val, | ||
| int | i, | ||
| int | j | ||
| ) |
Update matrix element: mat(i,j) += val.
| mat | Matrix to update |
| val | Value to add |
| i | Row index (0-based) |
| j | Column index (0-based) |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
Compute Y = A*X for multiple vectors.
| mat | Matrix A |
| x | Input vectors (n x nrhs) |
| y | Output vectors (n x nrhs) |
| nrhs | Number of right-hand sides |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
Compute Y = A*X for multiple vectors.
| mat | Matrix A |
| x | Input vectors (n x nrhs) |
| y | Output vectors (n x nrhs) |
| nrhs | Number of right-hand sides |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
| void orb5x::spclibs::vmx | ( | const PeriodicMat & | mat, |
| const Real * | x, | ||
| Real * | y | ||
| ) |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
| void orb5x::spclibs::vmx | ( | const ZPeriodicMat & | mat, |
| const Complex * | x, | ||
| Complex * | y | ||
| ) |
Compute y = A*x.
| mat | Matrix A |
| x | Input vector |
| y | Output vector |
|
constexpr |
Maximum spline order supported (degree + 1)