|
OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
|
Base class for for matrix algebra containers. More...
#include <base.hpp>
Inheritance diagram for bem::MatrixBase< T >:Base class for for matrix algebra containers.
| T | - Data type to be stored in the matrix (e.g., float, double, std::complex). |
Returns the total number of rows in the matrix.
Implemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
Returns the total number of rows in the matrix.
Implemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
Resizes the matrix to a new number of rows and columns.
| [in] | rows | - New number of rows. |
| [in] | cols | - New number of columns. |
Implemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
Clears all data in the matrix and sets its size to 0.
Implemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
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 >.
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 >.
|
pure virtual |
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. |
Implemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
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 >.
Sets all matrix entries to zero.
Implemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
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 virtual |
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 >.
Returns the size (rows * cols) of the matrix.
Reimplemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
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 >.
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 >.
|
inlinevirtual |
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 >.
Sets the matrix to identity (ones along the diagonal, zeros elsewhere).
Reimplemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Prints the matrix to the terminal in a formatted manner.
Reimplemented in bem::EigenMatrixBase< T, MatrixType >, bem::EigenMatrixBase< T, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > >, and bem::EigenMatrixBase< T, Eigen::SparseMatrix< T, Eigen::ColMajor > >.