|
svMultiPhysics
|
Linear algebra vocabulary types and dense utilities for finite-element computations. More...
Topics | |
| Matrix | |
| Fixed-size matrix type aliases. | |
| Vector | |
| Fixed-size vector type aliases. | |
Classes | |
| struct | svmp::math::DensePseudoInverseResult |
| Result of a rank-revealing pseudo-inverse. More... | |
| struct | svmp::math::DenseMatrixDiagnostics |
| SVD-based conditioning and rank diagnostics for a dense matrix. More... | |
| struct | svmp::math::DenseInverseResult |
| A dense inverse together with its diagnostics. More... | |
| struct | svmp::math::DenseLUSolver |
| LU factorization of a dense square matrix with a cached pivot summary. More... | |
Functions | |
| double | svmp::math::dense_matrix_max_abs (std::span< const double > matrix) noexcept |
| Largest absolute entry of a dense matrix. | |
| double | svmp::math::dense_matrix_pivot_tolerance (std::size_t rows, std::size_t cols, double max_abs, double multiplier=double(64)) noexcept |
| Scale-aware pivot tolerance for dense factorization. | |
| double | svmp::math::dense_matrix_singular_value_tolerance (std::size_t rows, std::size_t cols, double largest_singular_value, double multiplier=double(64)) noexcept |
| Scale-aware singular-value tolerance for rank decisions. | |
| double | svmp::math::dense_matrix_condition_fallback_threshold () noexcept |
| Condition estimate above which the inverse switches to an SVD fallback. | |
| double | svmp::math::dense_matrix_condition_error_threshold () noexcept |
| Condition estimate above which validation rejects a dense inverse. | |
| DenseMatrixDiagnostics | svmp::math::dense_matrix_diagnostics (std::span< const double > matrix, std::size_t rows, std::size_t cols, std::string_view error_message_label="dense matrix") |
| SVD-based rank and conditioning diagnostics for a dense matrix. | |
| DenseLUSolver | svmp::math::factor_dense_matrix (std::vector< double > matrix, std::size_t n, std::string_view error_message_label="dense matrix") |
| LU-factor a dense square matrix. | |
| std::vector< double > | svmp::math::invert_dense_matrix (std::vector< double > matrix, std::size_t n, std::string_view error_message_label="dense matrix") |
| Invert a dense square matrix. | |
| DenseInverseResult | svmp::math::invert_dense_matrix_with_diagnostics (std::vector< double > matrix, std::size_t n, std::string_view error_message_label="dense matrix") |
| Invert a dense square matrix with diagnostics, using an SVD fallback for high-condition matrices. | |
| void | svmp::math::validate_dense_inverse_diagnostics (const DenseInverseResult &result, std::size_t expected_rank, std::string_view error_message_label="dense matrix", double max_condition=dense_matrix_condition_error_threshold()) |
| Validate that a dense inverse has full rank and acceptable conditioning. | |
| std::size_t | svmp::math::dense_matrix_rank (std::vector< double > matrix, std::size_t rows, std::size_t cols) |
| Numerical rank of a dense matrix from its singular values. | |
| DensePseudoInverseResult | svmp::math::rank_revealing_pseudo_inverse (std::span< const double > matrix, std::size_t rows, std::size_t cols, std::string_view error_message_label="dense matrix") |
| Moore-Penrose pseudo-inverse via a rank-revealing SVD. | |
Linear algebra vocabulary types and dense utilities for finite-element computations.
The Math module defines the fixed-size vector and matrix types used in element-level kernels (as aliases of Eigen types) and dense linear algebra utilities used by basis construction and local transforms.
|
nodiscardnoexcept |
Condition estimate above which validation rejects a dense inverse.
|
nodiscardnoexcept |
Condition estimate above which the inverse switches to an SVD fallback.
|
nodiscard |
SVD-based rank and conditioning diagnostics for a dense matrix.
| matrix | Row-major matrix of size rows * cols. |
| rows | Row count. |
| cols | Column count. |
| error_message_label | Prefix for the message of any exception thrown. |
| CoreException | If the matrix size is inconsistent or the matrix is empty. |
|
nodiscardnoexcept |
Largest absolute entry of a dense matrix.
| matrix | Row-major matrix entries. |
|
nodiscardnoexcept |
Scale-aware pivot tolerance for dense factorization.
Proportional to machine epsilon scaled by the matrix size and magnitude; pivots below it are treated as rank-deficient.
| rows | Row count. |
| cols | Column count. |
| max_abs | Largest absolute matrix entry (see dense_matrix_max_abs()). |
| multiplier | Safety factor applied to the epsilon-scaled tolerance. |
|
nodiscard |
Numerical rank of a dense matrix from its singular values.
| matrix | Row-major matrix of size rows * cols (consumed). |
| rows | Row count. |
| cols | Column count. |
| CoreException | If the matrix size is inconsistent. |
|
nodiscardnoexcept |
Scale-aware singular-value tolerance for rank decisions.
Singular values at or below the returned tolerance are treated as zero when computing rank or a pseudo-inverse.
| rows | Row count. |
| cols | Column count. |
| largest_singular_value | Largest singular value of the matrix. |
| multiplier | Safety factor applied to the epsilon-scaled tolerance. |
|
nodiscard |
LU-factor a dense square matrix.
| matrix | Row-major n * n matrix (consumed). |
| n | Matrix dimension. |
| error_message_label | Prefix for the message of any exception thrown. |
| CoreException | If the size is inconsistent or the matrix is rank-deficient. |
|
nodiscard |
Invert a dense square matrix.
| matrix | Row-major n * n matrix (consumed). |
| n | Matrix dimension. |
| error_message_label | Prefix for the message of any exception thrown. |
| CoreException | If the size is inconsistent or the matrix is singular. |
|
nodiscard |
Invert a dense square matrix with diagnostics, using an SVD fallback for high-condition matrices.
| matrix | Row-major n * n matrix (consumed). |
| n | Matrix dimension. |
| error_message_label | Prefix for the message of any exception thrown. |
| CoreException | If the size is inconsistent or the matrix is rank-deficient. |
|
nodiscard |
Moore-Penrose pseudo-inverse via a rank-revealing SVD.
| matrix | Row-major matrix of size rows * cols. |
| rows | Row count. |
| cols | Column count. |
| error_message_label | Prefix for the message of any exception thrown. |
| CoreException | If the matrix size is inconsistent or the matrix is empty. |
| void svmp::math::validate_dense_inverse_diagnostics | ( | const DenseInverseResult & | result, |
| std::size_t | expected_rank, | ||
| std::string_view | error_message_label = "dense matrix", | ||
| double | max_condition = dense_matrix_condition_error_threshold() ) |
Validate that a dense inverse has full rank and acceptable conditioning.
| result | Result from invert_dense_matrix_with_diagnostics(). |
| expected_rank | Required (full) rank. |
| error_message_label | Prefix for the message of any exception thrown. |
| max_condition | Largest acceptable condition estimate. |
| CoreException | If the rank is below expected_rank or the condition exceeds max_condition. |