Namespaces | Functions
matrices.cc File Reference

Go to the source code of this file.

Namespaces

 oomph
 //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
 
 oomph::CRDoubleMatrixHelpers
 Namespace for helper functions for CRDoubleMatrices.
 

Functions

void oomph::CRDoubleMatrixHelpers::create_uniformly_distributed_matrix (const unsigned &nrow, const unsigned &ncol, const OomphCommunicator *const comm_pt, const Vector< double > &values, const Vector< int > &column_indices, const Vector< int > &row_start, CRDoubleMatrix &matrix_out)
 Builds a uniformly distributed matrix. A locally replicated matrix is constructed then redistributed using OOMPH-LIB's default uniform row distribution. This is memory intensive thus should be used for testing or small problems only. More...
 
double oomph::CRDoubleMatrixHelpers::inf_norm (const DenseMatrix< CRDoubleMatrix * > &matrix_pt)
 Compute infinity (maximum) norm of sub blocks as if it was one matrix. More...
 
double oomph::CRDoubleMatrixHelpers::gershgorin_eigenvalue_estimate (const DenseMatrix< CRDoubleMatrix * > &matrix_pt)
 Calculates the largest Gershgorin disc whilst preserving the sign. Let A be an n by n matrix, with entries aij. For $ i \in \{ 1,...,n \} $ let $ R_i = \sum_{i\neq j} |a_{ij}| $ be the sum of the absolute values of the non-diagonal entries in the i-th row. Let $ D(a_{ii},R_i) $ be the closed disc centered at $ a_{ii} $ with radius $ R_i $, such a disc is called a Gershgorin disc. More...
 
void oomph::CRDoubleMatrixHelpers::concatenate (const DenseMatrix< CRDoubleMatrix * > &matrix_pt, CRDoubleMatrix &result_matrix)
 Concatenate CRDoubleMatrix matrices. The in matrices are concatenated such that the block structure of the in matrices are preserved in the result matrix. Communication between processors is required. If the block structure of the sub matrices does not need to be preserved, consider using CRDoubleMatrixHelpers::concatenate_without_communication(...). More...
 
void oomph::CRDoubleMatrixHelpers::concatenate_without_communication (const Vector< LinearAlgebraDistribution * > &row_distribution_pt, const Vector< LinearAlgebraDistribution * > &col_distribution_pt, const DenseMatrix< CRDoubleMatrix * > &matrix_pt, CRDoubleMatrix &result_matrix)
 Concatenate CRDoubleMatrix matrices. More...
 
void oomph::CRDoubleMatrixHelpers::concatenate_without_communication (const Vector< LinearAlgebraDistribution * > &block_distribution_pt, const DenseMatrix< CRDoubleMatrix * > &matrix_pt, CRDoubleMatrix &result_matrix)
 Concatenate CRDoubleMatrix matrices. This calls the other concatenate_without_communication(...) function, passing block_distribution_pt as both the row_distribution_pt and col_distribution_pt. This should only be called for block square matrices. More...