PSparseMatrix

Type signature

PartitionedArrays.PSparseMatrixType
struct PSparseMatrix{V,B,C,D,T}

PSparseMatrix (partitioned sparse matrix) is a type representing a matrix whose rows are distributed (a.k.a. partitioned) over different parts for distributed-memory parallel computations. Each part stores a subset of the rows of the matrix and their corresponding non zero columns.

This type overloads numerous array-like operations with corresponding parallel implementations.

Properties

  • matrix_partition::A
  • row_partition::B
  • col_partition::C
  • assembled::Bool

matrix_partition[i] contains a (sparse) matrix with the local rows and the corresponding nonzero columns (the local columns) in the part number i. eltype(matrix_partition) == V. row_partition[i] and col_partition[i] contain information about the local, own, and ghost rows and columns respectively in part number i. The types eltype(row_partition) and eltype(col_partition) implement the AbstractLocalIndices interface. For assembled==true, it is assumed that the matrix data is fully contained in the own rows.

Supertype hierarchy

PSparseMatrix{V,A,B,C,T} <: AbstractMatrix{T}

with T=eltype(V).

source

Accessors

PartitionedArrays.own_ghost_valuesMethod
own_ghost_values(a::PSparseMatrix)

Get a vector of matrices containing the own rows and ghost columns in each part of a.

The row indices of the returned matrices can be mapped to global indices, local indices, and owner by using own_to_global, own_to_local, and own_to_owner, respectively.

The column indices of the returned matrices can be mapped to global indices, local indices, and owner by using ghost_to_global, ghost_to_local, and ghost_to_owner, respectively.

source
PartitionedArrays.ghost_own_valuesMethod
ghost_own_values(a::PSparseMatrix)

Get a vector of matrices containing the ghost rows and own columns in each part of a.

The row indices of the returned matrices can be mapped to global indices, local indices, and owner by using ghost_to_global, ghost_to_local, and ghost_to_owner, respectively.

The column indices of the returned matrices can be mapped to global indices, local indices, and owner by using own_to_global, own_to_local, and own_to_owner, respectively.

source

Constructors

PartitionedArrays.psparseMethod
psparse(f,row_partition,col_partition;assembled)

Build an instance of PSparseMatrix from the initialization function f and the partition for rows and columns row_partition and col_partition.

Equivalent to

matrix_partition = map(f,row_partition,col_partition)
PSparseMatrix(matrix_partition,row_partition,col_partition,assembled)
source
PartitionedArrays.psparseMethod
psparse([f,]I,J,V,row_partition,col_partition;kwargs...) -> Task

Crate an instance of PSparseMatrix by setting arbitrary entries from each of the underlying parts. It returns a task that produces the instance of PSparseMatrix allowing latency hiding while performing the communications needed in its setup.

source

Assembly

Re-partition