|
OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
|
Base class for Eigen-based matrices. More...
#include <eigen_base.hpp>
Inheritance diagram for bem::EigenMatrixBase< T, MatrixType >:Base class for Eigen-based matrices.
| T | - Data type to be stored in the matrix (e.g., float, double, std::complex). |
| MatrixType | - Specific Eigen matrix type. |
Definition at line 46 of file eigen_base.hpp.
|
inline |
Constructs an EigenMatrixBase object with a specified number of rows and columns.
| [in] | rows | - Number of rows. |
| [in] | cols | - Number of columns. |
Definition at line 55 of file eigen_base.hpp.
|
inline |
Constructs an empty zero-size EigenMatrixBase object.
Definition at line 66 of file eigen_base.hpp.
|
pure virtual |
Sets a block of values in this matrix to the values of a given matrix, starting at a given position.
| [in] | x | - Matrix to insert. |
| [in] | row_start | - Starting row index for the block. |
| [in] | col_start | - Starting column index for the block. |
| [in] | a | - Scalar to multiply the values of x before inserting (optional). |
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
|
pure virtual |
Adds a block of values to this matrix from the values of a given matrix, starting at a given position.
| [in] | x | - Matrix whose values should be added to a block of this matrix. |
| [in] | row_start | - Starting row index for the block. |
| [in] | col_start | - Starting column index for the block. |
| [in] | a | - Scalar to multiply the values of x before adding (optional). |
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
|
pure virtual |
Retrieves a block of values from this matrix.
| [out] | x | - Matrix to store the retrieved block of values. |
| [in] | row_start | - Starting row index for the block. |
| [in] | col_start | - Starting column index for the block. |
| [in] | b_rows | - Number of rows in the block to retrieve. |
| [in] | b_cols | - Number of columns in the block to retrieve. |
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
|
inline |
Returns a writable reference to the underlying raw matrix - use with caution.
Definition at line 120 of file eigen_base.hpp.
|
inline |
Returns a read-only reference to the underlying raw matrix.
Definition at line 129 of file eigen_base.hpp.
|
inline |
Sets the underlying raw matrix by copying over data from a given matrix.
| [in] | matrix | - The raw matrix to set. |
Definition at line 139 of file eigen_base.hpp.
|
inline |
Binds the underlying raw matrix to the data pointed at by a given matrix pointer.
| [in] | matrix | - Pointer to the raw matrix to be bound. |
The purpose of this method is to allow creating an external Eigen matrix of type MatrixType, and then transferring ownership of that matrix to this object, but without copying over the underlying data, unlike set_raw_matrix().
Definition at line 154 of file eigen_base.hpp.
|
inlineoverridevirtual |
Returns the total number of rows in the matrix.
Implements bem::MatrixBase< T >.
Definition at line 165 of file eigen_base.hpp.
|
inlineoverridevirtual |
Returns the total number of rows in the matrix.
Implements bem::MatrixBase< T >.
Definition at line 175 of file eigen_base.hpp.
|
inlineoverridevirtual |
Returns the size (rows * cols) of the matrix.
Reimplemented from bem::MatrixBase< T >.
Definition at line 185 of file eigen_base.hpp.
|
inlineoverridevirtual |
Resizes the matrix to a new number of rows and columns.
| [in] | rows | - New number of rows. |
| [in] | cols | - New number of columns. |
Implements bem::MatrixBase< T >.
Definition at line 196 of file eigen_base.hpp.
|
inlineoverridevirtual |
Clears all data in the matrix and sets its size to 0.
Implements bem::MatrixBase< T >.
Definition at line 207 of file eigen_base.hpp.
|
inlineoverridevirtual |
Sets all matrix entries to zero.
Implements bem::MatrixBase< T >.
Definition at line 217 of file eigen_base.hpp.
|
inlineoverridevirtual |
Sets the matrix to identity (ones along the diagonal).
Reimplemented from bem::MatrixBase< T >.
Definition at line 227 of file eigen_base.hpp.
|
inline |
Computes \( \mathbf{M} = \mathbf{X}^T \) where \( \mathbf{M} \) is this matrix, \( \mathbf{X} \) is a given matrix, and \( \mathbf{X}^T \) is its transpose.
| [in] | x | - Matrix to transpose. |
Definition at line 240 of file eigen_base.hpp.
|
inline |
Retrieves matrix values on the diagonal, zeroing out all other entries.
| [out] | x | - Diagonal matrix. |
Definition at line 252 of file eigen_base.hpp.
|
inlineoverridevirtual |
Computes \( \mathbf{M} = \mathbf{M} + a\mathbf{X} \) where \( \mathbf{M} \) is this matrix, \( a \) is a scalar, and \( \mathbf{X} \) is a matrix.
| [in] | x | - Matrix to scale and add, must have the same dimensions as this matrix. |
| [in] | a | - Scalar which which to scale x. |
Implements bem::MatrixBase< T >.
Definition at line 266 of file eigen_base.hpp.
|
inline |
Computes \( \mathbf{M} = a\mathbf{X} + b\mathbf{Y} \) where \( \mathbf{M} \) is this matrix, \( a \) and \( b \) are scalars, and \( \mathbf{X} \) and \( \mathbf{Y} \) are matrices.
| [in] | x | - First matrix to scale and add, must have the same dimensions as y. |
| [in] | y | - Second matrix to scale and add, must have the same dimensions as x. |
| [in] | a | - Scalar which which to scale x. |
| [in] | b | - Scalar which which to scale y. |
Definition at line 282 of file eigen_base.hpp.
|
inline |
Computes \( \mathbf{M} = a\mathbf{X}\mathbf{Y} \) where \( \mathbf{M} \) is this matrix, \( a \) is a scalar, and \( \mathbf{X} \) and \( \mathbf{Y} \) are matrices.
| [in] | x | - First matrix to multiply, must have the same number of columns as y has rows. |
| [in] | y | - Second matrix to multiply , must have the same number of rows as x has columns. |
| [in] | a | - Scalar which which to scale the product of x and y. |
Definition at line 298 of file eigen_base.hpp.
|
inline |
Computes \( \mathbf{M} = \mathbf{M} + a\mathbf{X}\mathbf{Y} \) where \( \mathbf{M} \) is this matrix, \( a \) is a scalar, and \( \mathbf{X} \) and \( \mathbf{Y} \) are matrices.
| [in] | x | - First matrix to multiply, must have the same number of columns as y has rows. |
| [in] | y | - Second matrix to multiply , must have the same number of rows as x has columns. |
| [in] | a | - Scalar which which to scale the product of x and y. |
Definition at line 314 of file eigen_base.hpp.
|
inline |
Solves \( \mathbf{M}\mathbf{X} = \mathbf{B} \) for matrix \( \mathbf{X} \) with an iterative solver, where \( \mathbf{M} \) is this matrix, and \( \mathbf{B} \) is a given right-hand side matrix.
| [out] | x | - Solution. |
| [in] | b | - Right-hand side matrix, must have the same number of rows as this matrix. |
| [in] | tol | - Tolerance for convergence (optional). |
Definition at line 332 of file eigen_base.hpp.
|
inline |
Solves \( \mathbf{M}\mathbf{X} = \mathbf{B} \) for matrix \( \mathbf{X} \) with the GMRES iterative solver, where \( \mathbf{M} \) is this matrix, and \( \mathbf{B} \) is a given right-hand side matrix.
| [out] | x | - Solution. |
| [in] | b | - Right-hand side matrix, must have the same number of rows as this matrix. |
| [in] | tol | - Tolerance for convergence (optional). |
| [in] | restart | - Restart iteration at which the Krylov subspace is discarded (optional). |
Definition at line 349 of file eigen_base.hpp.
|
inline |
Solves \( \mathbf{M}\mathbf{X} = \mathbf{B} \) for matrix \( \mathbf{X} \) with the BiCGSTAB iterative solver, where \( \mathbf{M} \) is this matrix, and \( \mathbf{B} \) is a given right-hand side matrix.
| [out] | x | - Solution. |
| [in] | b | - Right-hand side matrix, must have the same number of rows as this matrix. |
| [in] | tol | - Tolerance for convergence (optional). |
Definition at line 390 of file eigen_base.hpp.
|
inline |
Computes the condition number (ratio of largest to smallest singular value) of the matrix.
Definition at line 424 of file eigen_base.hpp.
|
inlineoverridevirtual |
Prints the matrix to the terminal in a formatted manner.
Reimplemented from bem::MatrixBase< T >.
Definition at line 440 of file eigen_base.hpp.
Returns the matrix value at the specified row and column.
| [in] | row | - Row index. |
| [in] | col | - Column index. |
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
|
pure virtualinherited |
Sets the matrix value at the specified row and column.
| [in] | row | - Row index. |
| [in] | col | - Column index. |
| [in] | a | - Value to set. |
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
Scales all matrix entries by a given value.
| [in] | a | - Value by which to scale. |
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
Returns a read-only pointer to the underlying raw data.
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
Returns a writable pointer to the underlying raw data - use with care.
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
|
pure virtualinherited |
Solves \( \mathbf{M}\mathbf{X} = \mathbf{B} \) for matrix \( \mathbf{X} \) with a direct solver, where \( \mathbf{M} \) is this matrix, and \( \mathbf{B} \) is a given right-hand side matrix.
| [out] | x | - Solution. |
| [in] | b | - Right-hand side matrix, must have the same number of rows as this matrix. |
Implemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
|
inlinevirtualinherited |
Adds to the matrix value at the specified row and column.
| [in] | row | - Row index. |
| [in] | col | - Column index. |
| [in] | a | - Value to add. |
Reimplemented in bem::EigenDenseMatrix< T, StorageOrder >, and bem::EigenSparseMatrix< T, StorageOrder >.
|
inlinevirtualinherited |
Preallocates memory for a given number of non-zero values per row.
| [in] | nnz | - Vector containing the number of non-zero values for each row. |
Reimplemented in bem::EigenSparseMatrix< T, StorageOrder >.
|
inlinevirtualinherited |
Preallocates memory for a given total number of non-zero values.
| [in] | num_entries | - Total number of non-zero values. |
Reimplemented in bem::EigenSparseMatrix< T, StorageOrder >.
Assembles cached data into the matrix.
Reimplemented in bem::EigenSparseMatrix< T, StorageOrder >.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
protected |
Definition at line 451 of file eigen_base.hpp.