You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2023. It is now read-only.
# Because it's a N x (N+2) operator, the last stencil on the sides are the [b,0,x,x,x,x] stencils, not the [0,x,x,x,x,x] stencils, since we're never solving for the derivative at the boundary point.
136
-
deriv_spots = (-div(stencil_length,2)+1) :-1
136
+
deriv_spots = (-div(stencil_length,2)+1) :-1>
137
137
138
138
stencil_coefs = [convert(SVector{stencil_length, T}, calculate_weights(derivative_order, zero(T), generate_coordinates(i, stencil_x, dummy_x, dx))) for i in interior_x]
@@ -181,8 +181,8 @@ function CompleteCenteredDifference{N}(derivative_order::Int,
181
181
boundary_point_count =div(stencil_length,2) # -1 due to the ghost point
182
182
# Because it's a N x (N+2) operator, the last stencil on the sides are the [b,0,x,x,x,x] stencils, not the [0,x,x,x,x,x] stencils, since we're never solving for the derivative at the boundary point.
_low_boundary_coefs = SVector{boundary_stencil_length, T}[convert(SVector{boundary_stencil_length, T}, (1/dx^derivative_order) *calculate_weights(derivative_order, oneunit(T)*x0, left_boundary_x)) for x0 in L_boundary_deriv_spots]
@@ -208,69 +208,33 @@ function CompleteCenteredDifference{N}(derivative_order::Int,
208
208
)
209
209
end
210
210
211
-
struct CompleteCenteredDifference{N} end
212
211
213
212
"""
214
-
A helper function to compute the coefficients of a derivative operator including the boundary coefficients in the centered scheme.
213
+
A helper function to compute the coefficients of a derivative operator including the boundary coefficients in the half centered scheme. See table 2 in https://web.njit.edu/~jiang/math712/fornberg.pdf
boundary_point_count =div(stencil_length,2)# -1 due to the ghost point
227
-
# Because it's a N x (N+2) operator, the last stencil on the sides are the [b,0,x,x,x,x] stencils, not the [0,x,x,x,x,x] stencils, since we're never solving for the derivative at the boundary point.
boundary_point_count =div(stencil_length,2)# -1 due to the ghost point
230
+
boundary_point_count =div(stencil_length,2) # -1 due to the ghost point
267
231
# Because it's a N x (N+2) operator, the last stencil on the sides are the [b,0,x,x,x,x] stencils, not the [0,x,x,x,x,x] stencils, since we're never solving for the derivative at the boundary point.
0 commit comments