From 88f2ab5568f496ab92e7f53b6adde46049d85f58 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 8 Nov 2024 19:43:33 +0000 Subject: [PATCH] build based on 4425905 --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/reference/index.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 726dee7..04c9ef4 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-06T04:10:03","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-08T19:43:29","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index ed2ccc0..1213bb0 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,4 +1,4 @@ Home · KrylovPreconditioners.jl

KrylovPreconditioners.jl documentation

This package provides a collection of preconditioners.

How to Cite

If you use KrylovPreconditioners.jl in your work, please cite using the format given in CITATION.cff.

How to Install

KrylovPreconditioners.jl can be installed and tested through the Julia package manager:

julia> ]
 pkg> add KrylovPreconditioners
-pkg> test KrylovPreconditioners

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.

+pkg> test KrylovPreconditioners

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.

diff --git a/dev/reference/index.html b/dev/reference/index.html index 8cc7ac3..88acb0c 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,7 +1,7 @@ -Reference · KrylovPreconditioners.jl

Reference

Index

Base.push!Method

For the L-factor: insert in row head column value For the U-factor: insert in column head row value

source
KrylovPreconditioners.add!Method

Sets v[idx] += a when idx is occupied, or sets v[idx] = a. Complexity is O(nnz). The prev_idx can be used to start the linear search at prev_idx, useful when multiple already sorted values are added.

source
KrylovPreconditioners.append_col!Function

Basically A[:, j] = scale * drop(y), where drop removes values less than drop. Note: sorts the nzind's of y, so that the column can be appended to a SparseMatrixCSC.

Resets the SparseVectorAccumulator.

Note: does not update A.colptr for columns > j + 1, as that is done during the steps.

source
KrylovPreconditioners.append_col!Method

Basically A[:, j] = scale * drop(y), where drop removes values less than drop.

Resets the InsertableSparseVector.

Note: does not update A.colptr for columns > j + 1, as that is done during the steps.

source
KrylovPreconditioners.backward_substitution!Method

Applies in-place backward substitution with the U factor of F, under the assumptions:

  1. U is stored transposed / row-wise
  2. U has no lower-triangular elements stored
  3. U has (nonzero) diagonal elements stored.
source
KrylovPreconditioners.overlapMethod
overlap(Graph, subset, level)

Given subset embedded within Graph, compute subset2 such that subset2 contains subset and all of its adjacent vertices.

source
KrylovPreconditioners.update!Method
function update!(p, J::SparseMatrixCSC)

Update the preconditioner p from the sparse Jacobian J in CSC format for the CPU

Note that this implements the same algorithm as for the GPU and becomes very slow on CPU with growing number of blocks.

source
LinearAlgebra.axpy!Method

Add a part of a SparseMatrixCSC column to a SparseVectorAccumulator, starting at a given index until the end.

source
SparseArrays.nnzMethod

Returns the number of nonzeros of the L and U factor combined.

Excludes the unit diagonal of the L factor, which is not stored.

source
KrylovPreconditioners.BlockJacobiPreconditionerType
BlockJacobiPreconditioner

Overlapping-Schwarz preconditioner.

Attributes

  • nblocks::Int64: Number of partitions or blocks.
  • blocksize::Int64: Size of each block.
  • partitions::Vector{Vector{Int64}}:npart` partitions stored as lists
  • cupartitions: partitions transfered to the GPU
  • lpartitions::Vector{Int64}`: Length of each partitions.
  • culpartitions::Vector{Int64}`: Length of each partitions, on the GPU.
  • blocks: Dense blocks of the block-Jacobi
  • cublocks: Js transfered to the GPU
  • map: The partitions as a mapping to construct views
  • cumap: cumap transferred to the GPU`
  • part: Partitioning as output by Metis
  • cupart: part transferred to the GPU
source
KrylovPreconditioners.InsertableSparseVectorType

InsertableSparseVector accumulates the sparse vector result from SpMV. Initialization requires O(N) work, therefore the data structure is reused. Insertion requires O(nnz) at worst, as insertion sort is used.

source
KrylovPreconditioners.LinkedListsType

The factor L is stored column-wise, but we need all nonzeros in row row. We already keep track of the first nonzero in each column (at most n indices). Take l = LinkedLists(n). Let l.head[row] be the column of some nonzero in row row. Then we can store the column of the next nonzero of row row in l.next[l.head[row]], etc. That "spot" is empty and there will never be a conflict because as long as we only store the first nonzero per column: the column is then a unique identifier.

source
KrylovPreconditioners.SortedSetType

SortedSet keeps track of a sorted set of integers ≤ N using insertion sort with a linked list structure in a pre-allocated vector. Requires O(N + 1) memory. Insertion goes via a linear scan in O(n) where n is the number of stored elements, but can be accelerated by passing along a known value in the set (which is useful when pushing in an already sorted list). The insertion itself requires O(1) operations due to the linked list structure. Provides iterators:

ints = SortedSet(10)
+Reference · KrylovPreconditioners.jl

Reference

Index

Base.push!Method

For the L-factor: insert in row head column value For the U-factor: insert in column head row value

source
KrylovPreconditioners.add!Method

Sets v[idx] += a when idx is occupied, or sets v[idx] = a. Complexity is O(nnz). The prev_idx can be used to start the linear search at prev_idx, useful when multiple already sorted values are added.

source
KrylovPreconditioners.append_col!Function

Basically A[:, j] = scale * drop(y), where drop removes values less than drop. Note: sorts the nzind's of y, so that the column can be appended to a SparseMatrixCSC.

Resets the SparseVectorAccumulator.

Note: does not update A.colptr for columns > j + 1, as that is done during the steps.

source
KrylovPreconditioners.append_col!Method

Basically A[:, j] = scale * drop(y), where drop removes values less than drop.

Resets the InsertableSparseVector.

Note: does not update A.colptr for columns > j + 1, as that is done during the steps.

source
KrylovPreconditioners.backward_substitution!Method

Applies in-place backward substitution with the U factor of F, under the assumptions:

  1. U is stored transposed / row-wise
  2. U has no lower-triangular elements stored
  3. U has (nonzero) diagonal elements stored.
source
KrylovPreconditioners.overlapMethod
overlap(Graph, subset, level)

Given subset embedded within Graph, compute subset2 such that subset2 contains subset and all of its adjacent vertices.

source
KrylovPreconditioners.update!Method
function update!(p, J::SparseMatrixCSC)

Update the preconditioner p from the sparse Jacobian J in CSC format for the CPU

Note that this implements the same algorithm as for the GPU and becomes very slow on CPU with growing number of blocks.

source
LinearAlgebra.axpy!Method

Add a part of a SparseMatrixCSC column to a SparseVectorAccumulator, starting at a given index until the end.

source
SparseArrays.nnzMethod

Returns the number of nonzeros of the L and U factor combined.

Excludes the unit diagonal of the L factor, which is not stored.

source
KrylovPreconditioners.BlockJacobiPreconditionerType
BlockJacobiPreconditioner

Overlapping-Schwarz preconditioner.

Attributes

  • nblocks::Int64: Number of partitions or blocks.
  • blocksize::Int64: Size of each block.
  • partitions::Vector{Vector{Int64}}:npart` partitions stored as lists
  • cupartitions: partitions transfered to the GPU
  • lpartitions::Vector{Int64}`: Length of each partitions.
  • culpartitions::Vector{Int64}`: Length of each partitions, on the GPU.
  • blocks: Dense blocks of the block-Jacobi
  • cublocks: Js transfered to the GPU
  • map: The partitions as a mapping to construct views
  • cumap: cumap transferred to the GPU`
  • part: Partitioning as output by Metis
  • cupart: part transferred to the GPU
source
KrylovPreconditioners.InsertableSparseVectorType

InsertableSparseVector accumulates the sparse vector result from SpMV. Initialization requires O(N) work, therefore the data structure is reused. Insertion requires O(nnz) at worst, as insertion sort is used.

source
KrylovPreconditioners.LinkedListsType

The factor L is stored column-wise, but we need all nonzeros in row row. We already keep track of the first nonzero in each column (at most n indices). Take l = LinkedLists(n). Let l.head[row] be the column of some nonzero in row row. Then we can store the column of the next nonzero of row row in l.next[l.head[row]], etc. That "spot" is empty and there will never be a conflict because as long as we only store the first nonzero per column: the column is then a unique identifier.

source
KrylovPreconditioners.SortedSetType

SortedSet keeps track of a sorted set of integers ≤ N using insertion sort with a linked list structure in a pre-allocated vector. Requires O(N + 1) memory. Insertion goes via a linear scan in O(n) where n is the number of stored elements, but can be accelerated by passing along a known value in the set (which is useful when pushing in an already sorted list). The insertion itself requires O(1) operations due to the linked list structure. Provides iterators:

ints = SortedSet(10)
 push!(ints, 5)
 push!(ints, 3)
 for value in ints
     println(value)
-end
source
+end
source