Skip to content

Commit

Permalink
Bugfix: repeated_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed May 1, 2024
1 parent e93e121 commit 38ad633
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ChainRules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -785,9 +785,7 @@ repeated_blocks(V0::FESpace,x::AbstractBlockVector) = blocks(x)
repeated_blocks(V0::FESpace,xh) = xh

repeated_blocks(V0::MultiFieldSpaceTypes,x::AbstractBlockVector) = repeated_blocks(MultiFieldStyle(V0),V0,x)
repeated_blocks(V0::MultiFieldSpaceTypes,x) = repeated_blocks(MultiFieldStyle(V0),V0,x)
repeated_blocks(::ConsecutiveMultiFieldStyle,V0,x::AbstractBlockVector) = blocks(x)
repeated_blocks(::ConsecutiveMultiFieldStyle,V0,xh) = xh

function repeated_blocks(::BlockMultiFieldStyle{NB},V0::MultiFieldSpaceTypes,x::AbstractBlockVector) where NB
xb = blocks(x)
Expand All @@ -800,7 +798,7 @@ function repeated_blocks(::BlockMultiFieldStyle{NB},V0::MultiFieldSpaceTypes,x::
return rep_blocks
end

function repeated_blocks(::BlockMultiFieldStyle,V0::MultiFieldSpaceTypes,xh)
function repeated_blocks(V0::MultiFieldSpaceTypes,xh)
x_blocks = repeated_blocks(MultiFieldStyle(V0),V0,get_free_dof_values(xh))
rep_blocks = map(x_blocks) do xb
FEFunction(V0,xb)
Expand Down

0 comments on commit 38ad633

Please sign in to comment.