Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_SpMatUtil.H File Reference
#include <AMReX_Config.H>
#include <AMReX_SpMatrix.H>
#include <AMReX_Random.H>

Go to the source code of this file.

Namespaces

namespace  amrex
 

Functions

template<typename T , template< typename > class V>
CSR< T, V > amrex::transpose (CSR< T, V > const &csr, Long ncols)
 Build the transpose CSR of csr.
 
template<typename T , template< typename > class Allocator>
SpMatrix< T, Allocator > amrex::transpose (SpMatrix< T, Allocator > const &A, AlgPartition const &col_partition)
 Transpose sparse matrix.
 
template<typename T , template< typename > class Allocator = DefaultAllocator>
SpMatrix< T, Allocator > amrex::IdentityMatrix (AlgPartition partition)
 Return an identity matrix with given partition.
 
template<typename T , template< typename > class Allocator = DefaultAllocator>
SpMatrix< T, Allocator > amrex::RandomMatrix (AlgPartition partition, Long nrows, Long ncols, Real lambda, int nnz_per_row_max)
 Return a random sparse matrix.
 
template<typename T , template< typename > class Allocator = DefaultAllocator>
bool amrex::almostEqual (SpMatrix< T, Allocator > const &A, SpMatrix< T, Allocator > const &B, int ulp=2)
 Check whether two sparse matrices are almost equal.
 

Detailed Description

Utility helpers for sparse matrices (CSR transpose, etc.).