Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check BCs for periodicity for periodic Tree & Structured meshes #1860

Merged
36 changes: 9 additions & 27 deletions src/semidiscretization/semidiscretization_hyperbolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -252,29 +252,18 @@ end

function check_periodicity_mesh_boundary_conditions(mesh::Union{TreeMesh{1},
StructuredMesh{1}},
boundary_conditions::NamedTuple)
@unpack x_neg, x_pos = boundary_conditions
check_periodicity_mesh_boundary_conditions_x(mesh, x_neg, x_pos)
end

function check_periodicity_mesh_boundary_conditions(mesh::Union{TreeMesh{1},
StructuredMesh{1}},
boundary_conditions::NTuple{2, Any})
boundary_conditions::Union{NamedTuple,
NTuple{2,
Any}})
ranocha marked this conversation as resolved.
Show resolved Hide resolved
check_periodicity_mesh_boundary_conditions_x(mesh, boundary_conditions[1],
boundary_conditions[2])
end

function check_periodicity_mesh_boundary_conditions(mesh::Union{TreeMesh{2},
StructuredMesh{2}},
boundary_conditions::NamedTuple)
@unpack x_neg, x_pos, y_neg, y_pos = boundary_conditions
check_periodicity_mesh_boundary_conditions_x(mesh, x_neg, x_pos)
check_periodicity_mesh_boundary_conditions_y(mesh, y_neg, y_pos)
end

function check_periodicity_mesh_boundary_conditions(mesh::Union{TreeMesh{2},
StructuredMesh{2}},
boundary_conditions::NTuple{4, Any})
boundary_conditions::Union{NamedTuple,
NTuple{4,
Any}})
check_periodicity_mesh_boundary_conditions_x(mesh, boundary_conditions[1],
boundary_conditions[2])
check_periodicity_mesh_boundary_conditions_y(mesh, boundary_conditions[3],
Expand All @@ -283,16 +272,9 @@ end

function check_periodicity_mesh_boundary_conditions(mesh::Union{TreeMesh{3},
StructuredMesh{3}},
boundary_conditions::NamedTuple)
@unpack x_neg, x_pos, y_neg, y_pos, z_neg, z_pos = boundary_conditions
check_periodicity_mesh_boundary_conditions_x(mesh, x_neg, x_pos)
check_periodicity_mesh_boundary_conditions_y(mesh, y_neg, y_pos)
check_periodicity_mesh_boundary_conditions_z(mesh, z_neg, z_pos)
end

function check_periodicity_mesh_boundary_conditions(mesh::Union{TreeMesh{3},
StructuredMesh{3}},
boundary_conditions::NTuple{6, Any})
boundary_conditions::Union{NamedTuple,
NTuple{6,
Any}})
check_periodicity_mesh_boundary_conditions_x(mesh, boundary_conditions[1],
boundary_conditions[2])
check_periodicity_mesh_boundary_conditions_y(mesh, boundary_conditions[3],
Expand Down
Loading