Skip to content

Primal to Dual Point Interpolation #173

Open
@GeorgeR227

Description

@GeorgeR227

Upon inspection of the below code, it was determined that the procedure to produce the wedge_pd_01 matrix incorporates a form of primal point to dual point interpolation, namely a bilinear interpolation with weights adjusted to favor the primal edge under consideration. This code could be hoisted out into a standalone function and generalized to produce primal to dual point interpolation in 2D.

This would, with the current d0_p0_interpolation complete a roundtrip which could be analyzed for development of errors. An implementation of dual to primal point interpolation may also be pursued by using the same principles established in the primal to dual case.

function wedge_pd_01_mat(sd::HasDeltaSet)
m = spzeros(ne(sd), nv(sd))
for e in edges(sd)
α, β = edge_vertices(sd,e)
des = elementary_duals(1,sd,e)
dvs = sd[des, :D_∂v0]
tris = only.(incident(sd, dvs, :tri_center))
γδ = map(tris) do t
only(filter(x -> x [α,β], triangle_vertices(sd,t)))
end
ws = sd[des, :dual_length] ./ sum(sd[des, :dual_length])
for (w,l) in zip(ws,γδ)
m[e,α] += w*5/12
m[e,β] += w*5/12
m[e,l] += w*2/12
end
end
m
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions