@@ -32,10 +32,10 @@ function DEO_negative_drift(pi_profit, params)
3232 dx = params. x[2 ] - params. x[1 ]
3333 # discretize L = ρ - μ D_x - σ^2 / 2 D_xx
3434 # subject to reflecting barriers at 0 and 1
35- L1 = UpwindDifference (1 ,1 ,dx,params. M,0 , 1. )
35+ L1 = UpwindDifference (1 ,1 ,dx,params. M,1. )
3636 L2 = CenteredDifference (2 ,2 ,dx,params. M)
3737 Q = Neumann0BC (dx, 1 )
38- L₁₋bc = - 1. .* Array (UpwindDifference (1 ,1 ,dx,params. M,0 , - 1. ) * Q)[1 ]
38+ L₁₋bc = - 1. .* Array (UpwindDifference (1 ,1 ,dx,params. M,- 1. ) * Q)[1 ]
3939 # Here Array(A::GhostDerivativeOperator) will return a tuple of the linear part
4040 # and the affine part of the operator A, hence we index Array(µ*L1*Q).
4141 # The operators in this example are purely linear, so we don't worry about Array(µ*L1*Q)[2]
@@ -72,7 +72,7 @@ function DEO_positive_drift(pi_profit, params)
7272 dx = params. x[2 ] - params. x[1 ]
7373 # discretize L = ρ - μ D_x - σ^2 / 2 D_xx
7474 # subject to reflecting barriers at 0 and 1
75- L1 = UpwindDifference (1 ,1 ,dx,params. M,0 , 1.0 )
75+ L1 = UpwindDifference (1 ,1 ,dx,params. M,1.0 )
7676 L2 = CenteredDifference (2 ,2 ,dx,params. M)
7777 Q = Neumann0BC (dx, 1 )
7878 # Here Array(A::GhostDerivativeOperator) will return a tuple of the linear part
@@ -114,7 +114,7 @@ function DEO_state_dependent_drift(pi_profit, μ, params)
114114 # discretize L = ρ - μ D_x - σ^2 / 2 D_xx
115115 # subject to reflecting barriers at 0 and 1
116116 drift = μ .(params. x)
117- L1 = UpwindDifference (1 ,1 ,dx,params. M,0 , drift)
117+ L1 = UpwindDifference (1 ,1 ,dx,params. M,drift)
118118 L2 = CenteredDifference (2 ,2 ,dx,params. M)
119119 Q = Neumann0BC (dx, 1 )
120120 # Here Array(A::GhostDerivativeOperator) will return a tuple of the linear part
@@ -166,7 +166,7 @@ end=#
166166function DEO_absorbing_bc (pi_profit, params)
167167 dx = params. x[2 ] - params. x[1 ]
168168
169- L1 = UpwindDifference (1 ,1 ,dx,params. M,0 , params. μ)
169+ L1 = UpwindDifference (1 ,1 ,dx,params. M,params. μ)
170170 L2 = CenteredDifference (2 ,2 ,dx,params. M)
171171 # RobinBC(l::NTuple{3,T}, r::NTuple{3,T}, dx::T, order = 1)
172172 # The variables in l are [αl, βl, γl], and correspond to a BC of the form αl*u(0) + βl*u'(0) = γl
@@ -235,7 +235,7 @@ end=#
235235function DEO_Solve_KFE (params)
236236 dx = params. x[2 ] - params. x[1 ]
237237
238- L1 = UpwindDifference (1 ,1 ,dx,params. M,0 , - params. μ)
238+ L1 = UpwindDifference (1 ,1 ,dx,params. M,- params. μ)
239239 # L2l = UpwindDifference(2,2,dx,params.M,
240240 # vcat(-1.,zeros(params.M-1)))
241241 # L2r = UpwindDifference(2,2,dx,params.M,
0 commit comments