Package com.imsl.math
Interface FeynmanKac.Boundaries
- Enclosing class:
- FeynmanKac
public static interface FeynmanKac.Boundaries
Public interface for user supplied boundary coefficients and terminal condition
the PDE must satisfy.
-
Method Summary
Modifier and TypeMethodDescriptionvoidleftBoundaries(double time, double[][] coefficients) Returns the coefficient values of the left boundary conditions.voidrightBoundaries(double time, double[][] coefficients) Returns the coefficient values of the right boundary conditions.doubleterminal(double z) Returns the terminal condition value.
-
Method Details
-
leftBoundaries
void leftBoundaries(double time, double[][] coefficients) Returns the coefficient values of the left boundary conditions. There arenumLeftBoundsconditions specified at the left end, \(x_{\min}\). The left boundary conditions are $$ a_i(x,t)f+b_i(x,t)f_x+c_i(x,t)f_{xx} = d_i(x,t),\, x=x_{\min},\, 1 \le i \le \text{numLeftBounds}. $$Time dependency of the boundary coefficients can be controlled via method
setTimeDependence. Use of this method will usually yield a more efficient algorithm because some finite element matrices do not have to be reassembled for eachtvalue.- Parameters:
time- adouble, the time point at which the boundary coefficients are to be evaluated.coefficients- an outputdoublearray of dimensionnumLeftBoundsby 4 containing the computed boundary coefficient values. The coefficients are stored row-wise according to the matrix scheme $$ ( a_i(x_{\min},t), b_i(x_{\min},t),c_i(x_{\min},t), d_i(x_{\min},t) )_{1 \le i \le \text{numLeftBounds}}\,. $$
-
rightBoundaries
void rightBoundaries(double time, double[][] coefficients) Returns the coefficient values of the right boundary conditions. There arenumRightBoundsconditions specified at the right end, \(x_{\max}\). The right boundary conditions are $$ a_i(x,t)f+b_i(x,t)f_x+c_i(x,t)f_{xx} = d_i(x,t),\, x=x_{\max},\, 1 \le i \le \text{numRightBounds}. $$Time dependency of the boundary coefficients can be controlled via method
setTimeDependence. Use of this method will usually yield a more efficient algorithm because some finite element matrices do not have to be reassembled for eachtvalue.- Parameters:
time- adouble, the time point at which the boundary coefficients are to be evaluated.coefficients- an outputdoublearray of dimensionnumRightBoundsby 4, containing the computed boundary coefficient values. The coefficients are stored row-wise according to the matrix scheme $$ ( a_i(x_{\max},t), b_i(x_{\max},t),c_i(x_{\max},t), d_i(x_{\max},t) )_{1 \le i \le \text{numRightBounds}}\,. $$
-
terminal
double terminal(double z) Returns the terminal condition value.- Parameters:
z- adoublescalar, the point inx-direction, where the terminal condition is evaluated.- Returns:
- a
doublescalar, the value of the terminal condition \(p(x)\) at pointz.
-