Skip to content

Commit 29341cb

Browse files
committed
Documentation
1 parent 64df35d commit 29341cb

File tree

3 files changed

+28
-43
lines changed

3 files changed

+28
-43
lines changed

docs/examples.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ IV = map(row_partition) do row_indices
145145
I,V
146146
end
147147
I,V = tuple_of_arrays(IV)
148-
b = old_pvector!(I,V,row_partition) |> fetch
148+
b = pvector(I,V,row_partition) |> fetch
149149

150150

151151
# Compute the system matrix
@@ -172,7 +172,7 @@ IJV = map(row_partition) do row_indices
172172
end
173173
I,J,V = tuple_of_arrays(IJV)
174174
col_partition = row_partition
175-
A = old_psparse!(I,J,V,row_partition,col_partition) |> fetch
175+
A = psparse(I,J,V,row_partition,col_partition) |> fetch
176176

177177
# Generate an initial guess that fulfills
178178
# the boundary conditions.
@@ -188,4 +188,3 @@ norm(r)
188188

189189

190190

191-

src/p_sparse_matrix.jl

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,9 +1014,6 @@ Crate an instance of [`PSparseMatrix`](@ref) by setting arbitrary entries
10141014
from each of the underlying parts. It returns a task that produces the
10151015
instance of [`PSparseMatrix`](@ref) allowing latency hiding while performing
10161016
the communications needed in its setup.
1017-
1018-
!!! warning
1019-
Improve me!
10201017
"""
10211018
function psparse(f,I,J,V,rows,cols;
10221019
split=true,
@@ -1097,8 +1094,7 @@ function psparse(f,I,J,V,rows,cols;
10971094
end
10981095

10991096
"""
1100-
!!! warning
1101-
Document me!
1097+
psparse!(C::PSparseMatrix,V,cache)
11021098
"""
11031099
function psparse!(C,V,cache)
11041100
(A,B,K,cacheB,cacheC,split,assembled) = cache
@@ -1122,8 +1118,7 @@ function assemble(A::PSparseMatrix;kwargs...)
11221118
end
11231119

11241120
"""
1125-
!!! warning
1126-
Document me!
1121+
assemble(A::PSparseMatrix[,rows];kwargs...)
11271122
"""
11281123
function assemble(A::PSparseMatrix,rows;kwargs...)
11291124
@boundscheck @assert matching_own_indices(axes(A,1),PRange(rows))
@@ -1132,8 +1127,7 @@ function assemble(A::PSparseMatrix,rows;kwargs...)
11321127
end
11331128

11341129
"""
1135-
!!! warning
1136-
Document me!
1130+
assemble!(B::PSparseMatrix,A::PSparseMatrix,cache)
11371131
"""
11381132
function assemble!(B::PSparseMatrix,A::PSparseMatrix,cache)
11391133
T = eltype(partition(A))
@@ -1385,8 +1379,7 @@ function psparse_assemble_impl!(B,A,::Type{<:AbstractSplitMatrix},cache)
13851379
end
13861380

13871381
"""
1388-
!!! warning
1389-
Document me!
1382+
consistent(A::PSparseMatrix,rows;kwargs...)
13901383
"""
13911384
function consistent(A::PSparseMatrix,rows_co;kwargs...)
13921385
@assert A.assembled
@@ -1395,8 +1388,7 @@ function consistent(A::PSparseMatrix,rows_co;kwargs...)
13951388
end
13961389

13971390
"""
1398-
!!! warning
1399-
Document me!
1391+
consistent!(B::PSparseMatrix,A::PSparseMatrix,cache)
14001392
"""
14011393
function consistent!(B::PSparseMatrix,A::PSparseMatrix,cache)
14021394
@assert A.assembled
@@ -1668,8 +1660,7 @@ function IterativeSolvers.zerox(A::PSparseMatrix,b::PVector)
16681660
end
16691661

16701662
"""
1671-
!!! warning
1672-
Document me!
1663+
repartition(A::PSparseMatrix,new_rows,new_cols;reuse=false)
16731664
"""
16741665
function repartition(A::PSparseMatrix,new_rows,new_cols;reuse=Val(false))
16751666
function prepare_triplets(A_own_own,A_own_ghost,A_rows,A_cols)
@@ -1703,8 +1694,7 @@ function repartition(A::PSparseMatrix,new_rows,new_cols;reuse=Val(false))
17031694
end
17041695

17051696
"""
1706-
!!! warning
1707-
Document me!
1697+
repartition!(B::PSparseMatrix,A::PSparseMatrix,cache)
17081698
"""
17091699
function repartition!(B::PSparseMatrix,A::PSparseMatrix,cache)
17101700
(V,cacheB) = cache
@@ -1723,8 +1713,7 @@ function repartition!(B::PSparseMatrix,A::PSparseMatrix,cache)
17231713
end
17241714

17251715
"""
1726-
!!! warning
1727-
Document me!
1716+
repartition(A::PSparseMatrix,b::PVector,new_rows,new_cols;reuse=false)
17281717
"""
17291718
function repartition(A::PSparseMatrix,b::PVector,new_rows,new_cols;reuse=Val(false))
17301719
# TODO this is just a reference implementation
@@ -1744,8 +1733,14 @@ function repartition(A::PSparseMatrix,b::PVector,new_rows,new_cols;reuse=Val(fal
17441733
end
17451734

17461735
"""
1747-
!!! warning
1748-
Document me!
1736+
repartition!(B,c,A,b,cache)
1737+
1738+
- `B::PSparseMatrix`
1739+
- `c::PVector`
1740+
- `A::PSparseMatrix`
1741+
- `b::PVector`
1742+
- `cache`
1743+
17491744
"""
17501745
function repartition!(B::PSparseMatrix,c::PVector,A::PSparseMatrix,b::PVector,cache)
17511746
(cacheB,cachec) = cache
@@ -1759,8 +1754,7 @@ function repartition!(B::PSparseMatrix,c::PVector,A::PSparseMatrix,b::PVector,ca
17591754
end
17601755

17611756
"""
1762-
!!! warning
1763-
Document me!
1757+
psystem(I,J,V,I2,V2,rows,cols;kwargs...)
17641758
"""
17651759
function psystem(I,J,V,I2,V2,rows,cols;
17661760
assembled=false,
@@ -1809,8 +1803,7 @@ function psystem(I,J,V,I2,V2,rows,cols;
18091803
end
18101804

18111805
"""
1812-
!!! warning
1813-
Document me!
1806+
psystem!(A,b,V,V2,cache)
18141807
"""
18151808
function psystem!(A,b,V,V2,cache)
18161809
(cacheA,cacheb) = cache

src/p_vector.jl

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ function pvector(I,V,rows;kwargs...)
562562
end
563563

564564
"""
565-
pvector([f,]I,V,index_partition;discover_rows=true) -> Task
565+
pvector([f,]I,V,index_partition;kwargs...) -> Task
566566
567567
Crate an instance of [`PVector`](@ref) by setting arbitrary entries
568568
from each of the underlying parts. It returns a task that produces the
@@ -618,8 +618,7 @@ function pvector(f,I,V,rows;
618618
end
619619

620620
"""
621-
!!! warning
622-
Document me!
621+
pvector!(B::PVector,V,cache)
623622
"""
624623
function pvector!(B,V,cache)
625624
function update!(A,K,V)
@@ -935,8 +934,7 @@ function assemble(v::PVector;kwargs...)
935934
end
936935

937936
"""
938-
!!! warning
939-
Document me!
937+
assemble(v::PVector[,rows];reuse=false)
940938
"""
941939
function assemble(v::PVector,rows;reuse=Val(false))
942940
@boundscheck @assert matching_own_indices(axes(v,1),PRange(rows))
@@ -959,8 +957,7 @@ function assemble(v::PVector,rows;reuse=Val(false))
959957
end
960958

961959
"""
962-
!!! warning
963-
Document me!
960+
assemble!(w::PVector,v::PVector,cache)
964961
"""
965962
function assemble!(w::PVector,v::PVector,cache)
966963
# TODO this is just a reference implementation
@@ -977,8 +974,7 @@ function assemble!(w::PVector,v::PVector,cache)
977974
end
978975

979976
"""
980-
!!! warning
981-
Document me!
977+
consistent(v::PVector,rows;reuse=false)
982978
"""
983979
function consistent(v::PVector,rows;reuse=Val(false))
984980
# TODO this is just a reference implementation
@@ -998,8 +994,7 @@ function consistent(v::PVector,rows;reuse=Val(false))
998994
end
999995

1000996
"""
1001-
!!! warning
1002-
Document me!
997+
consistent!(w::PVector,v::PVector,cache)
1003998
"""
1004999
function consistent!(w::PVector,v::PVector,cache)
10051000
w .= v
@@ -1024,8 +1019,7 @@ function repartition_cache(v::PVector,new_partition)
10241019
end
10251020

10261021
"""
1027-
!!! warning
1028-
Document me!
1022+
repartition(v::PVector,new_partition;reuse=false)
10291023
"""
10301024
function repartition(v::PVector,new_partition;reuse=Val(false))
10311025
w = similar(v,PRange(new_partition))
@@ -1047,8 +1041,7 @@ function repartition!(w::PVector,v::PVector;kwargs...)
10471041
end
10481042

10491043
"""
1050-
!!! warning
1051-
Document me!
1044+
repartition!(w::PVector,v::PVector[,cache];reversed=false)
10521045
"""
10531046
function repartition!(w::PVector,v::PVector,cache;reversed=false)
10541047
new_partition = partition(axes(w,1))

0 commit comments

Comments
 (0)