Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/TO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,18 @@ function adaptiveTOCollocationStiffnessMatrix(ctx::GridContext{2}, flow_maps, ti
else
N = length(times)
end
num_real_points = ctx.n
if on_torus || on_cylinder
num_real_points = ctx.n - length(bdata.periodic_dofs_from)
end
flow_map_images = zeros(Vec{2}, (N,num_real_points))

flow_map_images = zeros(Vec{2}, (N,ctx.n))
if times === nothing
for i in 1:num_real_points
for i in 1:ctx.n
if flow_map_mode == 0
flow_map_images[1,i] = Vec{2}(flow_maps(ctx.grid.nodes[i].x))
else
flow_map_images[1,i] = Vec{2}(flow_maps(i))
end
end
else
for i in 1:num_real_points
for i in 1:ctx.n
if flow_map_mode == 0
flow_map_images[:,i] = Vec{2}.(flow_maps(ctx.grid.nodes[i].x, times))
else
Expand Down
11 changes: 11 additions & 0 deletions test/test_fem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,15 @@ end

λ, = get_smallest_eigenpairs(D, M, 3)
@test all(<(sqrt(eps())), λ)

LL, UR = (0., 0.), (1., 1.)
gs = 10
ctx, _ = regularTriangularGrid((gs, gs), LL, UR);
predicate = (p1, p2) -> peuclidean(p1, p2, [1.0,Inf]) < 2e-10
bdata = BoundaryData(ctx, predicate, [])

@test !isnothing(
adaptiveTOCollocationStiffnessMatrix(
ctx, identity; on_cylinder=true, bdata)
)
end