From 5a18a046823587c5a9735c7358b480588af73b58 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 6 Nov 2024 14:43:07 +0000 Subject: [PATCH] build based on d9190dd --- dev/index.html | 2 +- dev/reference/index.html | 10 +++++----- dev/search/index.html | 2 +- dev/tutorial/index.html | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dev/index.html b/dev/index.html index 0244a1b..c8ff133 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Home · PartitionedVectors.jl

PartitionedVectors.jl

Compatibility

Julia ≥ 1.6.

How to install

This module can be installed with the following command:

pkg> add PartitionedVectors
-pkg> test PartitionedVectors

Synopsis

A PartitionedVector <: DenseVector <: AbstractVector wraps a PartitionedStructures.Elemental_pv, to make JuliaSmoothOptimizers modules able to exploit the partially separable structure.

How to use

Check the tutorial.

How to Cite

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

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, so questions about any of our packages are welcome.

+pkg> test PartitionedVectors

Synopsis

A PartitionedVector <: DenseVector <: AbstractVector wraps a PartitionedStructures.Elemental_pv, to make JuliaSmoothOptimizers modules able to exploit the partially separable structure.

How to use

Check the tutorial.

How to Cite

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

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, so questions about any of our packages are welcome.

diff --git a/dev/reference/index.html b/dev/reference/index.html index 4fe1f12..e2b9429 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,14 +1,14 @@ -Reference · PartitionedVectors.jl

Reference

Contents

Index

Base.getindexMethod
element_vector = getindex(pv::PartitionedVector, i::Int)

Return the i-th element of pv, e.g. the i-th element vector.

source
Base.setindex!Method
setindex!(pv::PartitionedVector, val::Elemental_elt_vec, index::Int)
+Reference · PartitionedVectors.jl

Reference

Contents

Index

Base.getindexMethod
element_vector = getindex(pv::PartitionedVector, i::Int)

Return the i-th element of pv, e.g. the i-th element vector.

source
Base.setindex!Method
setindex!(pv::PartitionedVector, val::Elemental_elt_vec, index::Int)
 setindex!(pv::PartitionedVector{T}, val::T, index::Int) where T<:Number
-setindex!(pv::PartitionedVector{T}, val::Vector{T}, index::Int) where T<:Number

Set pv[index] (i.e. the index-th element vector) to val.

source
LinearAlgebra.dotMethod
dot(pv1::PartitionedVector{T}, pv2::PartitionedVector{T}; kwargs...) where {T}
+setindex!(pv::PartitionedVector{T}, val::Vector{T}, index::Int) where T<:Number

Set pv[index] (i.e. the index-th element vector) to val.

source
LinearAlgebra.dotMethod
dot(pv1::PartitionedVector{T}, pv2::PartitionedVector{T}; kwargs...) where {T}
 dot(pv1::PartitionedVector{T}, pv2::PartitionedVector{T}, ::Val{true}, ::Val{false}; kwargs...) where {T}
 dot(pv1::PartitionedVector{T}, pv2::PartitionedVector{T}, ::Val{false}, ::Val{true}; kwargs...) where {T}
 dot(pv1::PartitionedVector{T}, pv2::PartitionedVector{T}, ::Val{true}, ::Val{true}; kwargs...) where {T}
-dot(pv1::PartitionedVector{T}, pv2::PartitionedVector{T}, ::Val{false}, ::Val{false}; kwargs...) where {T}

Compute the dot product between two partitioned vectors. Methods having Val{true} and Val{false} as parameters compute dedicated dot routines depending the usage of pv1, pv2. See the tutorial for more details about the usage of a PartitionedVector.

source
PartitionedVectors._filterMethod
_filter(i::Int, arg::Tuple{})
+dot(pv1::PartitionedVector{T}, pv2::PartitionedVector{T}, ::Val{false}, ::Val{false}; kwargs...) where {T}

Compute the dot product between two partitioned vectors. Methods having Val{true} and Val{false} as parameters compute dedicated dot routines depending the usage of pv1, pv2. See the tutorial for more details about the usage of a PartitionedVector.

source
PartitionedVectors._filterMethod
_filter(i::Int, arg::Tuple{})
 element_vector = _filter(i::Int, arg::PartitionedVector)
 _filter(i::Int, arg::Any)
-_filter(i::Int, args::Tuple)

Pass through a Tuple to select the i-th element if necessary.

source
PartitionedVectors.build!Method
build!(pv::PartitionedVector)

Set in place of pv.epv.v the Vector that pv represents. If pv.simulate=false, it aggregates contributions from elemental vectors. If pv.simulate=true, common variables among element vectors value the same. For each index 1 ≤ i ≤ n, , build! will take the first element containing i and sets pv.epv.v[i] to its value.

source
PartitionedVectors.find_pvMethod
pv = find_pv(bc::Base.Broadcast.Broadcasted)
+_filter(i::Int, args::Tuple)

Pass through a Tuple to select the i-th element if necessary.

source
PartitionedVectors.build!Method
build!(pv::PartitionedVector)

Set in place of pv.epv.v the Vector that pv represents. If pv.simulate=false, it aggregates contributions from elemental vectors. If pv.simulate=true, common variables among element vectors value the same. For each index 1 ≤ i ≤ n, , build! will take the first element containing i and sets pv.epv.v[i] to its value.

source
PartitionedVectors.find_pvMethod
pv = find_pv(bc::Base.Broadcast.Broadcasted)
 pv = find_pv(x::PartitionedVector)
 pv = find_pv(x::PartitionedVector, a::Any)
-pv = find_pv(x::Any, a::Any)

Pass through a Broadcasted tape to retrieve a PartitionedVector.

source
PartitionedVectors.partitionedMulOp!Method
partitionedMulOp!(epm::PS.Part_mat, Hv::PartitionedVector, pv_res::PartitionedVector, pv::PartitionedVector, α, β)

Partitioned matrix-vector product for PartitionedVectors: Hv, res and v.

source
PartitionedVectors.partitionedMulOpVec!Method
partitionedMulOpVec!(epm::PS.Part_mat{T}, Hv::Vector{T}, res::Vector{T}, v::Vector{T}, α, β;

Partitioned matrix-vector product for Vectors: Hv, res and v. Made to test LinearOperators.LinearOperator(epm::Part_mat{T}) (which relies on PartitionedVectors).

source
+pv = find_pv(x::Any, a::Any)

Pass through a Broadcasted tape to retrieve a PartitionedVector.

source
PartitionedVectors.partitionedMulOp!Method
partitionedMulOp!(epm::PS.Part_mat, Hv::PartitionedVector, pv_res::PartitionedVector, pv::PartitionedVector, α, β)

Partitioned matrix-vector product for PartitionedVectors: Hv, res and v.

source
PartitionedVectors.partitionedMulOpVec!Method
partitionedMulOpVec!(epm::PS.Part_mat{T}, Hv::Vector{T}, res::Vector{T}, v::Vector{T}, α, β;

Partitioned matrix-vector product for Vectors: Hv, res and v. Made to test LinearOperators.LinearOperator(epm::Part_mat{T}) (which relies on PartitionedVectors).

source
diff --git a/dev/search/index.html b/dev/search/index.html index 2a07aff..cf6121d 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · PartitionedVectors.jl

Loading search...

    +Search · PartitionedVectors.jl

    Loading search...

      diff --git a/dev/tutorial/index.html b/dev/tutorial/index.html index 7fd487b..4cbcf80 100644 --- a/dev/tutorial/index.html +++ b/dev/tutorial/index.html @@ -28,7 +28,7 @@ epm = PartitionedStructures.identity_epm(Uis) lo = LinearOperators.LinearOperator(epm) lo * pv
      PartitionedVector{Float64}
      -[6.9146656277033e-310, 6.91465603711443e-310, 6.91466425673755e-310, 6.9146561231451e-310, 6.91465602574776e-310, 6.91465602574776e-310, 6.91466425673755e-310, 6.91465602478097e-310]

      Note: Matrix(lo) will produce an error, since the default implementation assumes a complete Vector-like behaviour.

      using Krylov # 0.9.0
      +[6.94793826897265e-310, 6.9479384064747e-310, 6.9479382690011e-310, 6.9479282451127e-310, 6.9479377523705e-310, 6.94793912326e-310, 1.5499e-319, NaN]

      Note: Matrix(lo) will produce an error, since the default implementation assumes a complete Vector-like behaviour.

      using Krylov # 0.9.0
       solver = Krylov.CgSolver(pv)
       
       pv_gradient = similar(pv)
      @@ -65,4 +65,4 @@
        Aresiduals: []
        κ₂(A): []
        status: solution good enough given atol and rtol
      -
      +