Skip to content

Commit

Permalink
update variable name to N
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwinters5000 committed Dec 13, 2023
1 parent 316555d commit 4cae6f3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/solvers/fdsbp_unstructured/containers_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ function calc_normal_directions!(normal_directions, element, jacobian_matrix)

# normal directions on the boundary for the left (local side 4) and right (local side 2)
N = size(jacobian_matrix, 4)
for j in 1:N_
for j in 1:N
# +x side or side 2 in the local indexing
X_xi = jacobian_matrix[1, 1, N_, j, element]
X_eta = jacobian_matrix[1, 2, N_, j, element]
Y_xi = jacobian_matrix[2, 1, N_, j, element]
Y_eta = jacobian_matrix[2, 2, N_, j, element]
X_xi = jacobian_matrix[1, 1, N, j, element]
X_eta = jacobian_matrix[1, 2, N, j, element]
Y_xi = jacobian_matrix[2, 1, N, j, element]
Y_eta = jacobian_matrix[2, 2, N, j, element]
Jtemp = X_xi * Y_eta - X_eta * Y_xi
normal_directions[1, j, 2, element] = sign(Jtemp) * (Y_eta)
normal_directions[2, j, 2, element] = sign(Jtemp) * (-X_eta)
Expand All @@ -99,7 +99,7 @@ function calc_normal_directions!(normal_directions, element, jacobian_matrix)

# normal directions on the boundary for the top (local side 3) and bottom (local side 1)
N = size(jacobian_matrix, 3)
for i in 1:N_
for i in 1:N
# -y side or side 1 in the local indexing
X_xi = jacobian_matrix[1, 1, i, 1, element]
X_eta = jacobian_matrix[1, 2, i, 1, element]
Expand All @@ -110,10 +110,10 @@ function calc_normal_directions!(normal_directions, element, jacobian_matrix)
normal_directions[2, i, 1, element] = -sign(Jtemp) * (X_xi)

# +y side or side 3 in the local indexing
X_xi = jacobian_matrix[1, 1, i, N_, element]
X_eta = jacobian_matrix[1, 2, i, N_, element]
Y_xi = jacobian_matrix[2, 1, i, N_, element]
Y_eta = jacobian_matrix[2, 2, i, N_, element]
X_xi = jacobian_matrix[1, 1, i, N, element]
X_eta = jacobian_matrix[1, 2, i, N, element]
Y_xi = jacobian_matrix[2, 1, i, N, element]
Y_eta = jacobian_matrix[2, 2, i, N, element]
Jtemp = X_xi * Y_eta - X_eta * Y_xi
normal_directions[1, i, 3, element] = sign(Jtemp) * (-Y_xi)
normal_directions[2, i, 3, element] = sign(Jtemp) * (X_xi)
Expand Down

0 comments on commit 4cae6f3

Please sign in to comment.