#include <dense_matrix_base.h>

Public Member Functions | |
| DenseMatrixBase (DenseMatrixBase &&)=default | |
| DenseMatrixBase (const DenseMatrixBase &)=default | |
| DenseMatrixBase & | operator= (const DenseMatrixBase &)=default |
| DenseMatrixBase & | operator= (DenseMatrixBase &&)=default |
| virtual | ~DenseMatrixBase ()=default |
| virtual void | zero ()=0 |
| virtual T | el (const unsigned int i, const unsigned int j) const =0 |
| virtual T & | el (const unsigned int i, const unsigned int j)=0 |
| virtual void | left_multiply (const DenseMatrixBase< T > &M2)=0 |
| virtual void | right_multiply (const DenseMatrixBase< T > &M3)=0 |
| unsigned int | m () const |
| unsigned int | n () const |
| void | print (std::ostream &os=libMesh::out) const |
| void | print_scientific (std::ostream &os, unsigned precision=8) const |
| template<typename T2 , typename T3 > | |
| boostcopy::enable_if_c< ScalarTraits< T2 >::value, void >::type | add (const T2 factor, const DenseMatrixBase< T3 > &mat) |
Protected Member Functions | |
| DenseMatrixBase (const unsigned int new_m=0, const unsigned int new_n=0) | |
| void | condense (const unsigned int i, const unsigned int j, const T val, DenseVectorBase< T > &rhs) |
Static Protected Member Functions | |
| static void | multiply (DenseMatrixBase< T > &M1, const DenseMatrixBase< T > &M2, const DenseMatrixBase< T > &M3) |
Protected Attributes | |
| unsigned int | _m |
| unsigned int | _n |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const DenseMatrixBase< T > &m) |
Defines an abstract dense matrix base class for use in Finite Element-type computations. Specialized dense matrices, for example DenseSubMatrices, can be derived from this class.
Definition at line 44 of file dense_matrix_base.h.
|
inlineprotected |
Constructor. Creates a dense matrix of dimension m by n. Protected so that there is no way the user can create one.
Definition at line 52 of file dense_matrix_base.h.
|
default |
The 5 special functions can be defaulted for this class, as it does not manage any memory itself.
|
default |
|
virtualdefault |
|
inline |
Adds factor to every element in the matrix. This should only work if T += T2 * T3 is valid C++ and if T2 is scalar. Return type is void
Definition at line 188 of file dense_matrix_base.h.
References libMesh::DenseMatrixBase< T >::el(), libMesh::DenseMatrixBase< T >::m(), and libMesh::DenseMatrixBase< T >::n().
|
protected |
Condense-out the (i,j) entry of the matrix, forcing it to take on the value val. This is useful in numerical simulations for applying boundary conditions. Preserves the symmetry of the matrix.
Definition at line 58 of file dense_matrix_base.C.
References libMesh::DenseVectorBase< T >::el(), and libMesh::DenseVectorBase< T >::size().
Referenced by libMesh::DenseMatrix< Number >::condense().
|
pure virtual |
(i,j) element of the matrix. Since internal data representations may differ, you must redefine this function. Implemented in libMesh::DenseSubMatrix< T >, libMesh::DenseMatrix< T >, and libMesh::DenseMatrix< Number >.
Referenced by libMesh::DenseMatrixBase< T >::add(), and libMesh::DenseMatrixBase< T >::multiply().
|
pure virtual |
(i,j) element of the matrix as a writable reference. Since internal data representations may differ, you must redefine this function. Implemented in libMesh::DenseSubMatrix< T >, libMesh::DenseMatrix< T >, and libMesh::DenseMatrix< Number >.
|
pure virtual |
Performs the operation: (*this) <- M2 * (*this)
Implemented in libMesh::DenseSubMatrix< T >, and libMesh::DenseMatrix< T >.
|
inline |
Definition at line 102 of file dense_matrix_base.h.
References libMesh::DenseMatrixBase< T >::_m.
Referenced by libMesh::DenseMatrix< Number >::_multiply_blas(), libMesh::DenseMatrix< Number >::_svd_solve_lapack(), libMesh::DenseMatrixBase< T >::add(), libMesh::DenseMatrix< Number >::add(), libMesh::PetscMatrix< T >::add_block_matrix(), libMesh::SparseMatrix< ValOut >::add_block_matrix(), libMesh::EigenSparseMatrix< T >::add_matrix(), libMesh::LaspackMatrix< T >::add_matrix(), libMesh::EpetraMatrix< T >::add_matrix(), libMesh::PetscMatrix< T >::add_matrix(), libMesh::DofMap::build_constraint_matrix(), libMesh::DofMap::build_constraint_matrix_and_vector(), libMesh::DofMap::constrain_element_dyad_matrix(), libMesh::DofMap::constrain_element_matrix(), libMesh::DofMap::constrain_element_matrix_and_vector(), libMesh::DofMap::constrain_element_vector(), libMesh::DofMap::extract_local_vector(), libMesh::DenseMatrix< Number >::get_transpose(), libMesh::DofMap::heterogenously_constrain_element_matrix_and_vector(), libMesh::DofMap::heterogenously_constrain_element_vector(), libMesh::DenseMatrix< Number >::left_multiply(), libMesh::DenseMatrix< Number >::left_multiply_transpose(), libMesh::DofMap::max_constraint_error(), libMesh::DenseMatrixBase< T >::multiply(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::DenseMatrix< Number >::operator=(), libMesh::DenseMatrix< Number >::right_multiply(), and libMesh::DenseMatrix< Number >::right_multiply_transpose().
|
staticprotected |
Helper function - Performs the computation M1 = M2 * M3 where: M1 = (m x n) M2 = (m x p) M3 = (p x n)
Definition at line 31 of file dense_matrix_base.C.
References libMesh::DenseMatrixBase< T >::el(), libMesh::DenseMatrixBase< T >::m(), and libMesh::DenseMatrixBase< T >::n().
|
inline |
Definition at line 107 of file dense_matrix_base.h.
References libMesh::DenseMatrixBase< T >::_n.
Referenced by libMesh::DenseMatrix< Number >::_multiply_blas(), libMesh::DenseMatrix< Number >::_svd_solve_lapack(), libMesh::DenseMatrixBase< T >::add(), libMesh::DenseMatrix< Number >::add(), libMesh::PetscMatrix< T >::add_block_matrix(), libMesh::SparseMatrix< ValOut >::add_block_matrix(), libMesh::EigenSparseMatrix< T >::add_matrix(), libMesh::LaspackMatrix< T >::add_matrix(), libMesh::EpetraMatrix< T >::add_matrix(), libMesh::PetscMatrix< T >::add_matrix(), libMesh::DofMap::build_constraint_matrix(), libMesh::DofMap::build_constraint_matrix_and_vector(), libMesh::DofMap::constrain_element_dyad_matrix(), libMesh::DofMap::constrain_element_matrix(), libMesh::DofMap::constrain_element_matrix_and_vector(), libMesh::DofMap::constrain_element_vector(), libMesh::DofMap::extract_local_vector(), libMesh::DenseMatrix< Number >::get_transpose(), libMesh::DofMap::heterogenously_constrain_element_matrix_and_vector(), libMesh::DofMap::heterogenously_constrain_element_vector(), libMesh::DenseMatrix< Number >::left_multiply(), libMesh::DenseMatrix< Number >::left_multiply_transpose(), libMesh::DofMap::max_constraint_error(), libMesh::DenseMatrixBase< T >::multiply(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::DenseMatrix< Number >::operator=(), libMesh::DenseMatrix< Number >::right_multiply(), and libMesh::DenseMatrix< Number >::right_multiply_transpose().
|
default |
|
default |
| void libMesh::DenseMatrixBase< T >::print | ( | std::ostream & | os = libMesh::out | ) | const |
Pretty-print the matrix, by default to libMesh::out.
Definition at line 110 of file dense_matrix_base.C.
| void libMesh::DenseMatrixBase< T >::print_scientific | ( | std::ostream & | os, |
| unsigned | precision = 8 |
||
| ) | const |
Prints the matrix entries with more decimal places in scientific notation.
Definition at line 86 of file dense_matrix_base.C.
|
pure virtual |
Performs the operation: (*this) <- (*this) * M3
Implemented in libMesh::DenseMatrix< T >, and libMesh::DenseSubMatrix< T >.
|
pure virtual |
Set every element in the matrix to 0. You must redefine what you mean by zeroing the matrix since it depends on how your values are stored.
Implemented in libMesh::DenseSubMatrix< T >, libMesh::DenseMatrix< T >, and libMesh::DenseMatrix< Number >.
|
friend |
Formatted print as above but allows you to do DenseMatrix K; libMesh::out << K << std::endl;
Definition at line 119 of file dense_matrix_base.h.
|
protected |
The row dimension.
Definition at line 169 of file dense_matrix_base.h.
Referenced by libMesh::DenseMatrixBase< T >::m(), and libMesh::DenseMatrix< Number >::swap().
|
protected |
The column dimension.
Definition at line 174 of file dense_matrix_base.h.
Referenced by libMesh::DenseMatrixBase< T >::n(), and libMesh::DenseMatrix< Number >::swap().