Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwinters5000 committed May 23, 2024
1 parent a807227 commit e86cc89
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/solvers/scratch_p4est.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,9 @@ end

i_large = i_large_start
j_large = j_large_start

Check warning on line 344 in src/solvers/scratch_p4est.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/scratch_p4est.jl#L343-L344

Added lines #L343 - L344 were not covered by tests
# maybe similar(u_buffer) instead? Would avoid adding to the cache
flux_buffer = cache.f_threaded[Threads.threadid()]
for i in eachnode(dg)
for node in eachnode(dg)

Check warning on line 347 in src/solvers/scratch_p4est.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/scratch_p4est.jl#L346-L347

Added lines #L346 - L347 were not covered by tests
# Get the proper normal_direction now that we are back computing on the large element
normal_direction = Trixi.get_normal_direction(large_direction,

Check warning on line 349 in src/solvers/scratch_p4est.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/scratch_p4est.jl#L349

Added line #L349 was not covered by tests
contravariant_vectors,
Expand All @@ -353,16 +354,18 @@ end
# solution state to recover the physical flux at this point because the surface flux
# has in-built mechanisms to avoid division by zero in dry regions whereas `Trixi.flux`
# does not have such mechanisms to desingularize the velocity computation.
flux_buffer[:, i] = surface_flux(view(cache.mortars.u, 3, :, 1, i, mortar),
view(cache.mortars.u, 3, :, 1, i, mortar),
normal_direction, equations)
flux = surface_flux(view(cache.mortars.u, 3, :, 1, node, mortar),

Check warning on line 357 in src/solvers/scratch_p4est.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/scratch_p4est.jl#L357

Added line #L357 was not covered by tests
view(cache.mortars.u, 3, :, 1, node, mortar),
normal_direction, equations)

noncons = nonconservative_flux(view(cache.mortars.u, 3, :, 1, i, mortar),
view(cache.mortars.u, 3, :, 1, i, mortar),
noncons = nonconservative_flux(view(cache.mortars.u, 3, :, 1, node, mortar),

Check warning on line 361 in src/solvers/scratch_p4est.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/scratch_p4est.jl#L361

Added line #L361 was not covered by tests
view(cache.mortars.u, 3, :, 1, node, mortar),
normal_direction, normal_direction,
equations)

flux_buffer[:, i] += 0.5 * noncons
flux_plus_noncons = flux + 0.5 * noncons

Check warning on line 366 in src/solvers/scratch_p4est.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/scratch_p4est.jl#L366

Added line #L366 was not covered by tests

set_node_vars!(flux_buffer, flux_plus_noncons, equations, dg, node)

Check warning on line 368 in src/solvers/scratch_p4est.jl

View check run for this annotation

Codecov / codecov/patch

src/solvers/scratch_p4est.jl#L368

Added line #L368 was not covered by tests

i_large += i_large_step
j_large += j_large_step
Expand Down

0 comments on commit e86cc89

Please sign in to comment.