Skip to content
Merged
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
66 changes: 33 additions & 33 deletions src/solvers/dgsem_p4est/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ function prolong2interfaces!(backend::Backend, cache, u,
end

@kernel function prolong2interfaces_KAkernel!(interfaces_u, u,
mT::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
MeshT::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
equations, neighbor_ids,
node_indices, index_range)
interface = @index(Global)
prolong2interfaces_per_interface!(interfaces_u, u, interface, mT, equations,
prolong2interfaces_per_interface!(interfaces_u, u, interface, MeshT, equations,
neighbor_ids, node_indices, index_range)
end

Expand Down Expand Up @@ -195,29 +195,29 @@ function calc_interface_flux!(backend::Backend, surface_flux_values,
end

@kernel function calc_interface_flux_KAkernel!(surface_flux_values,
mt::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
MeshT::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
have_nonconservative_terms,
equations, surface_integral,
st::Type{<:DG}, u_interface,
SolverT::Type{<:DG}, u_interface,
neighbor_ids, node_indices,
contravariant_vectors, index_range)
interface = @index(Global)
calc_interface_flux_per_interface!(surface_flux_values, mt,
calc_interface_flux_per_interface!(surface_flux_values, MeshT,
have_nonconservative_terms, equations,
surface_integral, st, u_interface,
surface_integral, SolverT, u_interface,
interface, neighbor_ids, node_indices,
contravariant_vectors, index_range)
end

@inline function calc_interface_flux_per_interface!(surface_flux_values,
mt::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
MeshT::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
have_nonconservative_terms,
equations, surface_integral,
st::Type{<:DG},
SolverT::Type{<:DG},
u_interface, interface,
neighbor_ids,
node_indices, contravariant_vectors,
Expand Down Expand Up @@ -263,9 +263,9 @@ end
i_primary, j_primary,
primary_element)

calc_interface_flux!(surface_flux_values, mt, have_nonconservative_terms,
equations, surface_integral, st, u_interface, interface,
normal_direction, node, primary_direction,
calc_interface_flux!(surface_flux_values, MeshT, have_nonconservative_terms,
equations, surface_integral, SolverT, u_interface,
interface, normal_direction, node, primary_direction,
primary_element, node_secondary,
secondary_direction, secondary_element)

Expand All @@ -285,7 +285,7 @@ end
P4estMeshView{2},
T8codeMesh{2}}},
have_nonconservative_terms::False, equations,
surface_integral, st::Type{<:DG},
surface_integral, SolverT::Type{<:DG},
u_interface, interface_index,
normal_direction, primary_node_index,
primary_direction_index,
Expand All @@ -295,7 +295,7 @@ end
secondary_element_index)
@unpack surface_flux = surface_integral

u_ll, u_rr = get_surface_node_vars(u_interface, equations, st,
u_ll, u_rr = get_surface_node_vars(u_interface, equations, SolverT,
primary_node_index,
interface_index)

Expand All @@ -313,7 +313,7 @@ end
@inline function calc_interface_flux!(surface_flux_values,
MeshT::Type{<:Union{P4estMesh{2}, T8codeMesh{2}}},
have_nonconservative_terms::True, equations,
surface_integral, st::Type{<:DG},
surface_integral, SolverT::Type{<:DG},
u_interface, interface_index,
normal_direction, primary_node_index,
primary_direction_index,
Expand All @@ -326,7 +326,7 @@ end
combine_conservative_and_nonconservative_fluxes(surface_flux,
equations),
equations,
surface_integral, st, u_interface,
surface_integral, SolverT, u_interface,
interface_index, normal_direction,
primary_node_index, primary_direction_index,
primary_element_index,
Expand All @@ -340,16 +340,16 @@ end
have_nonconservative_terms::True,
combine_conservative_and_nonconservative_fluxes::False,
equations,
surface_integral, st::Type{<:DG}, u_interface,
interface_index, normal_direction,
surface_integral, SolverT::Type{<:DG},
u_interface, interface_index, normal_direction,
primary_node_index, primary_direction_index,
primary_element_index,
secondary_node_index, secondary_direction_index,
secondary_element_index)
surface_flux, nonconservative_flux = surface_integral.surface_flux

u_ll, u_rr = get_surface_node_vars(u_interface, equations, st, primary_node_index,
interface_index)
u_ll, u_rr = get_surface_node_vars(u_interface, equations, SolverT,
primary_node_index, interface_index)

flux_ = surface_flux(u_ll, u_rr, normal_direction, equations)

Expand Down Expand Up @@ -378,16 +378,16 @@ end
have_nonconservative_terms::True,
combine_conservative_and_nonconservative_fluxes::True,
equations,
surface_integral, st::Type{<:DG}, u_interface,
interface_index, normal_direction,
surface_integral, SolverT::Type{<:DG},
u_interface, interface_index, normal_direction,
primary_node_index, primary_direction_index,
primary_element_index,
secondary_node_index, secondary_direction_index,
secondary_element_index)
@unpack surface_flux = surface_integral

u_ll, u_rr = get_surface_node_vars(u_interface, equations, st, primary_node_index,
interface_index)
u_ll, u_rr = get_surface_node_vars(u_interface, equations, SolverT,
primary_node_index, interface_index)

flux_left, flux_right = surface_flux(u_ll, u_rr, normal_direction, equations)

Expand Down Expand Up @@ -934,15 +934,15 @@ function calc_surface_integral!(backend::Backend, du, u,
end

@kernel function calc_surface_integral_KAkernel!(du,
mT::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
MeshT::Type{<:Union{P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
equations,
surface_integral::SurfaceIntegralWeakForm,
dg::DGSEM, factor,
surface_flux_values)
element = @index(Global)
calc_surface_integral_per_element!(du, mT, equations, surface_integral,
calc_surface_integral_per_element!(du, MeshT, equations, surface_integral,
dg, factor, surface_flux_values, element)
end

Expand Down
24 changes: 12 additions & 12 deletions src/solvers/dgsem_p4est/dg_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ end

@kernel function calc_interface_flux_KAkernel!(surface_flux_values, MeshT,
have_nonconservative_terms, equations,
surface_integral, solverT, u_interface,
surface_integral, SolverT, u_interface,
neighbor_ids, node_indices,
contravariant_vectors, index_range)
interface = @index(Global)
calc_interface_flux_per_interface!(surface_flux_values,
MeshT,
have_nonconservative_terms,
equations, surface_integral, solverT,
equations, surface_integral, SolverT,
u_interface,
neighbor_ids, node_indices,
contravariant_vectors,
Expand All @@ -260,7 +260,7 @@ end
T8codeMesh{3}}},
have_nonconservative_terms,
equations, surface_integral,
solverT::Type{<:DG}, u_interface,
SolverT::Type{<:DG}, u_interface,
neighbor_ids,
node_indices, contravariant_vectors,
index_range, interface)
Expand Down Expand Up @@ -308,7 +308,7 @@ end

calc_interface_flux!(surface_flux_values, MeshT, have_nonconservative_terms,
equations,
surface_integral, solverT, u_interface,
surface_integral, SolverT, u_interface,
interface, normal_direction,
i, j, primary_direction, primary_element,
i_secondary, j_secondary, secondary_direction,
Expand Down Expand Up @@ -337,7 +337,7 @@ end
@inline function calc_interface_flux!(surface_flux_values,
::Type{<:Union{P4estMesh{3}, T8codeMesh{3}}},
have_nonconservative_terms::False, equations,
surface_integral, solverT::Type{<:DG},
surface_integral, SolverT::Type{<:DG},
u_interface,
interface_index, normal_direction,
primary_i_node_index, primary_j_node_index,
Expand All @@ -347,7 +347,7 @@ end
secondary_element_index)
@unpack surface_flux = surface_integral

u_ll, u_rr = get_surface_node_vars(u_interface, equations, solverT,
u_ll, u_rr = get_surface_node_vars(u_interface, equations, SolverT,
primary_i_node_index,
primary_j_node_index, interface_index)

Expand All @@ -367,7 +367,7 @@ end
@inline function calc_interface_flux!(surface_flux_values,
MeshT::Type{<:Union{P4estMesh{3}, T8codeMesh{3}}},
have_nonconservative_terms::True, equations,
surface_integral, solverT::Type{<:DG},
surface_integral, SolverT::Type{<:DG},
u_interface,
interface_index, normal_direction,
primary_i_node_index, primary_j_node_index,
Expand All @@ -378,7 +378,7 @@ end
calc_interface_flux!(surface_flux_values, MeshT, have_nonconservative_terms,
combine_conservative_and_nonconservative_fluxes(surface_integral.surface_flux,
equations),
equations, surface_integral, solverT, u_interface,
equations, surface_integral, SolverT, u_interface,
interface_index,
normal_direction, primary_i_node_index, primary_j_node_index,
primary_direction_index, primary_element_index,
Expand All @@ -392,7 +392,7 @@ end
have_nonconservative_terms::True,
combine_conservative_and_nonconservative_fluxes::False,
equations,
surface_integral, solverT::Type{<:DG},
surface_integral, SolverT::Type{<:DG},
u_interface,
interface_index, normal_direction,
primary_i_node_index, primary_j_node_index,
Expand All @@ -401,7 +401,7 @@ end
secondary_direction_index,
secondary_element_index)
surface_flux, nonconservative_flux = surface_integral.surface_flux
u_ll, u_rr = get_surface_node_vars(u_interface, equations, solverT,
u_ll, u_rr = get_surface_node_vars(u_interface, equations, SolverT,
primary_i_node_index,
primary_j_node_index, interface_index)

Expand Down Expand Up @@ -433,7 +433,7 @@ end
have_nonconservative_terms::True,
combine_conservative_and_nonconservative_fluxes::True,
equations,
surface_integral, solverT::Type{<:DG},
surface_integral, SolverT::Type{<:DG},
u_interface,
interface_index, normal_direction,
primary_i_node_index, primary_j_node_index,
Expand All @@ -442,7 +442,7 @@ end
secondary_direction_index,
secondary_element_index)
@unpack surface_flux = surface_integral
u_ll, u_rr = get_surface_node_vars(u_interface, equations, solverT,
u_ll, u_rr = get_surface_node_vars(u_interface, equations, SolverT,
primary_i_node_index, primary_j_node_index,
interface_index)

Expand Down
14 changes: 7 additions & 7 deletions src/solvers/dgsem_structured/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -768,15 +768,15 @@ function apply_jacobian!(backend::Backend, du,
end

@kernel function apply_jacobian_KAkernel!(du,
mT::Type{<:Union{StructuredMesh{2},
StructuredMeshView{2},
UnstructuredMesh2D,
P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
MeshT::Type{<:Union{StructuredMesh{2},
StructuredMeshView{2},
UnstructuredMesh2D,
P4estMesh{2},
P4estMeshView{2},
T8codeMesh{2}}},
equations, dg::DG, inverse_jacobian)
element = @index(Global)
apply_jacobian_per_element!(du, mT, equations, dg, inverse_jacobian, element)
apply_jacobian_per_element!(du, MeshT, equations, dg, inverse_jacobian, element)
end

@inline function apply_jacobian_per_element!(du,
Expand Down
Loading