Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Oct 2, 2023
1 parent 13ae464 commit eee16f9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Algebra.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@

# Vector allocation

function Algebra.allocate_vector(::Type{<:PVector{V}},ids::PRange) where {V}
PVector{V}(undef,partition(ids))
end

function Algebra.allocate_vector(::Type{<:BlockPVector{V}},ids::BlockPRange) where {V}
BlockPVector{V}(undef,ids)
end

# This might go to Gridap in the future. We keep it here for the moment.
function change_axes(a::Algebra.ArrayCounter,axes)
@notimplemented
Expand Down Expand Up @@ -288,14 +299,6 @@ function local_views(a::BlockPMatrix,new_rows::BlockPRange,new_cols::BlockPRange
return map(mortar,vals)
end

function Algebra.allocate_vector(::Type{<:PVector{V}},ids::PRange) where {V}
PVector{V}(undef,partition(ids))
end

function Algebra.allocate_vector(::Type{<:BlockPVector{V}},ids::BlockPRange) where {V}
BlockPVector{V}(undef,ids)
end

# PSparseMatrix assembly

struct FullyAssembledRows end
Expand Down

0 comments on commit eee16f9

Please sign in to comment.