#include <dense_submatrix.h>
Public Member Functions | |
DenseSubMatrix (DenseMatrix< T > &new_parent, const unsigned int ioff=0, const unsigned int joff=0, const unsigned int m=0, const unsigned int n=0) | |
DenseSubMatrix (DenseSubMatrix &&)=default | |
DenseSubMatrix (const DenseSubMatrix &)=default | |
DenseSubMatrix & | operator= (const DenseSubMatrix &)=default |
DenseSubMatrix & | operator= (DenseSubMatrix &&)=default |
virtual | ~DenseSubMatrix ()=default |
DenseMatrix< T > & | parent () |
virtual void | zero () override |
T | operator() (const unsigned int i, const unsigned int j) const |
T & | operator() (const unsigned int i, const unsigned int j) |
virtual T | el (const unsigned int i, const unsigned int j) const override |
virtual T & | el (const unsigned int i, const unsigned int j) override |
virtual void | left_multiply (const DenseMatrixBase< T > &M2) override |
virtual void | right_multiply (const DenseMatrixBase< T > &M3) override |
void | reposition (const unsigned int ioff, const unsigned int joff, const unsigned int new_m, const unsigned int new_n) |
unsigned int | i_off () const |
unsigned int | j_off () const |
void | condense (const unsigned int i, const unsigned int j, const T val, DenseSubVector< T > &rhs) |
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 | |
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 |
Private Attributes | |
DenseMatrix< T > & | _parent_matrix |
unsigned int | _i_off |
unsigned int | _j_off |
Defines a dense submatrix for use in Finite Element-type computations. Useful for storing element stiffness matrices before summation into a global matrix, particularly when you have systems of equations. All overridden virtual functions are documented in dense_matrix_base.h.
Definition at line 44 of file dense_submatrix.h.
|
inline |
Constructor. Creates a dense submatrix of the matrix parent
. The submatrix has dimensions , and the entry of the submatrix is located at the location in the parent matrix.
Definition at line 158 of file dense_submatrix.h.
References libMesh::DenseSubMatrix< T >::reposition().
|
default |
The 5 special functions can be defaulted for this class, as it does not manage any memory itself.
|
default |
|
virtualdefault |
|
inlineinherited |
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().
|
inline |
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 125 of file dense_submatrix.h.
References libMesh::DenseSubMatrix< T >::i_off(), libMesh::DenseSubMatrix< T >::j_off(), libMesh::DenseSubVector< T >::parent(), and libMesh::DenseSubMatrix< T >::parent().
|
protectedinherited |
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().
|
inlineoverridevirtual |
(i,j) element of the matrix. Since internal data representations may differ, you must redefine this function. Implements libMesh::DenseMatrixBase< T >.
Definition at line 89 of file dense_submatrix.h.
|
inlineoverridevirtual |
(i,j) element of the matrix as a writable reference. Since internal data representations may differ, you must redefine this function. Implements libMesh::DenseMatrixBase< T >.
Definition at line 93 of file dense_submatrix.h.
|
inline |
Definition at line 112 of file dense_submatrix.h.
References libMesh::DenseSubMatrix< T >::_i_off.
Referenced by libMesh::DenseSubMatrix< T >::condense().
|
inline |
Definition at line 117 of file dense_submatrix.h.
References libMesh::DenseSubMatrix< T >::_j_off.
Referenced by libMesh::DenseSubMatrix< T >::condense().
|
overridevirtual |
Performs the operation: (*this) <- M2 * (*this)
Implements libMesh::DenseMatrixBase< T >.
Definition at line 31 of file dense_submatrix.C.
|
inlineinherited |
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().
|
staticprotectedinherited |
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().
|
inlineinherited |
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().
|
inline |
(i,j) element of the submatrix. Definition at line 203 of file dense_submatrix.h.
|
inline |
(i,j) element of the submatrix as a writable reference. Definition at line 218 of file dense_submatrix.h.
|
default |
|
default |
|
inline |
Definition at line 73 of file dense_submatrix.h.
References libMesh::DenseSubMatrix< T >::_parent_matrix.
Referenced by libMesh::DenseSubMatrix< T >::condense().
|
inherited |
Pretty-print the matrix, by default to libMesh::out
.
Definition at line 110 of file dense_matrix_base.C.
|
inherited |
Prints the matrix entries with more decimal places in scientific notation.
Definition at line 86 of file dense_matrix_base.C.
|
inline |
Changes the location of the submatrix in the parent matrix.
Definition at line 172 of file dense_submatrix.h.
Referenced by libMesh::DenseSubMatrix< T >::DenseSubMatrix().
|
overridevirtual |
Performs the operation: (*this) <- (*this) * M3
Implements libMesh::DenseMatrixBase< T >.
Definition at line 49 of file dense_submatrix.C.
|
inlineoverridevirtual |
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.
Implements libMesh::DenseMatrixBase< T >.
Definition at line 191 of file dense_submatrix.h.
|
private |
The row offset into the parent matrix.
Definition at line 145 of file dense_submatrix.h.
Referenced by libMesh::DenseSubMatrix< T >::i_off().
|
private |
The column offset into the parent matrix.
Definition at line 150 of file dense_submatrix.h.
Referenced by libMesh::DenseSubMatrix< T >::j_off().
|
protectedinherited |
The row dimension.
Definition at line 169 of file dense_matrix_base.h.
Referenced by libMesh::DenseMatrixBase< T >::m(), and libMesh::DenseMatrix< Number >::swap().
|
protectedinherited |
The column dimension.
Definition at line 174 of file dense_matrix_base.h.
Referenced by libMesh::DenseMatrixBase< T >::n(), and libMesh::DenseMatrix< Number >::swap().
|
private |
The parent matrix that contains this submatrix.
Definition at line 140 of file dense_submatrix.h.
Referenced by libMesh::DenseSubMatrix< T >::parent().