Matrix/vector representation
HYPRE.jl defines the structs HYPREMatrix and HYPREVector representing HYPREs datastructures. Specifically it uses the IJ System Interface which can be used for general sparse matrices.
HYPRE.jl defines conversion methods from standard Julia datastructures to HYPREMatrix and HYPREVector, respectively. See the following sections for details:
- PartitionedArrays.jl (multi-process)
SparseMatrixCSC/SparseMatrixCSR(single-process)SparseMatrixCSC/SparseMatrixCSR(multi-process)
PartitionedArrays.jl (multi-process)
HYPRE.jl integrates seemlessly with PSparseMatrix and PVector from the PartitionedArrays.jl package. These can be passed directly to solve and solve!. Internally this will construct a HYPREMatrix and HYPREVectors and then convert the solution back to a PVector.
The HYPREMatrix constructor support both SparseMatrixCSC and SparseMatrixCSR as storage backends for the PSparseMatrix. However, since HYPREs internal storage is also CSR based it can be slightly more resource efficient to use SparseMatrixCSR.
The constructors also support both PartitionedArrays.jl backends: When using the MPI backend the communicator of the PSparseMatrix/PVector is used also for the HYPREMatrix/HYPREVector, and when using the Sequential backend it is assumed to be a single-process setup, and the global communicator MPI.COMM_WORLD is used.
Example pseudocode
# Assemble linear system (see documentation for PartitionedArrays)
+Matrix/vector representation · HYPRE.jl Matrix/vector representation
HYPRE.jl defines the structs HYPREMatrix and HYPREVector representing HYPREs datastructures. Specifically it uses the IJ System Interface which can be used for general sparse matrices.
HYPRE.jl defines conversion methods from standard Julia datastructures to HYPREMatrix and HYPREVector, respectively. See the following sections for details:
- PartitionedArrays.jl (multi-process)
SparseMatrixCSC / SparseMatrixCSR (single-process)SparseMatrixCSC / SparseMatrixCSR (multi-process)
PartitionedArrays.jl (multi-process)
HYPRE.jl integrates seemlessly with PSparseMatrix and PVector from the PartitionedArrays.jl package. These can be passed directly to solve and solve!. Internally this will construct a HYPREMatrix and HYPREVectors and then convert the solution back to a PVector.
The HYPREMatrix constructor support both SparseMatrixCSC and SparseMatrixCSR as storage backends for the PSparseMatrix. However, since HYPREs internal storage is also CSR based it can be slightly more resource efficient to use SparseMatrixCSR.
The constructors also support both PartitionedArrays.jl backends: When using the MPI backend the communicator of the PSparseMatrix/PVector is used also for the HYPREMatrix/HYPREVector, and when using the Sequential backend it is assumed to be a single-process setup, and the MPI.COMM_SELF communicator is used.
Example pseudocode
# Assemble linear system (see documentation for PartitionedArrays)
A = PSparseMatrix(...)
b = PVector(...)
@@ -30,4 +30,4 @@ x = solve(solver, A, b)
# Inplace solve with x as initial guess
x = zeros(length(b))
-solve!(solver, x, A, b)
SparseMatrixCSC / SparseMatrixCSR (multi-process)
Warning This interface isn't finalized yet and is therefore not documented since it is subject to change.
Settings
This document was generated with Documenter.jl version 0.28.0-DEV on Wednesday 27 July 2022. Using Julia version 1.7.3.
+solve!(solver, x, A, b)SparseMatrixCSC / SparseMatrixCSR (multi-process)
This interface isn't finalized yet and is therefore not documented since it is subject to change.