Skip to content

Commit

Permalink
Scaled wedge 11 (#68)
Browse files Browse the repository at this point in the history
Added back a scaling factor in the wedge 11. This is reflected by scaling down the precomputed coeffs by 2.
  • Loading branch information
GeorgeR227 authored Feb 21, 2024
1 parent a7c3639 commit a5553f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/FastDEC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function dec_p_wedge_product(::Type{Tuple{1,1}}, sd::EmbeddedDeltaDualComplex2D{

shift = ntriangles(sd)
@inbounds for i in 1:ntriangles(sd)
area = areas[i]
area = 2 * areas[i]
coeffs[1, i] = (d_areas[i] + d_areas[i+shift]) / area
coeffs[2, i] = (d_areas[i+2*shift] + d_areas[i+3*shift]) / area
coeffs[3, i] = (d_areas[i+4*shift] + d_areas[i+5*shift]) / area
Expand Down
2 changes: 1 addition & 1 deletion test/Operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ end

@test all(dec_wedge_product(Tuple{0, 2}, sd)(V_1, T_2) / 2 .== (Tuple{0, 2}, sd, V_1, T_2))

@test all(dec_wedge_product(Tuple{1, 1}, sd)(E_1, E_2) / 2 .== (Tuple{1, 1}, sd, E_1, E_2))
@test all(dec_wedge_product(Tuple{1, 1}, sd)(E_1, E_2) .== (Tuple{1, 1}, sd, E_1, E_2))
end
end

Expand Down

0 comments on commit a5553f4

Please sign in to comment.