com.imsl.math
Interface FeynmanKac.ForcingTerm
- Enclosing class:
- FeynmanKac
public static interface FeynmanKac.ForcingTerm
Public interface for non-zero forcing term in the Feynman-Kac equation.
Method Summary |
void |
force(int interval,
double[] y,
double time,
double width,
double[] xlocal,
double[] qw,
double[][] u,
double[] phi,
double[][] dphi)
Computes approximations to the forcing term
and its derivative . |
force
void force(int interval,
double[] y,
double time,
double width,
double[] xlocal,
double[] qw,
double[][] u,
double[] phi,
double[][] dphi)
- Computes approximations to the forcing term
and its derivative
.
- Parameters:
interval
- an int
, the index related to the integration
interval [xGrid[interval-1], xGrid[interval]]
.y
- an input double
array of length 3*xGrid.length
containing the coefficients of the Hermite quintic spline
representing the solution of the Feynman-Kac equation at time
point time
. For each
![x in [x_i,x_{i+1}], , h_i=x_{i+1}-x_i, z_i=(x-x_i)/h_i,,i=1,ldots, text{xGrid.length}-1](eqn_1155.png)
the approximate solution is locally defined by

The values
are stored as successive triplets in y
.time
- a double
, the time point.width
- a double
, the width of the integration interval,
width=xGrid[interval]-xGrid[interval-1]
.xlocal
- an input double
array containing the Gauss-Legendre points
translated and normalized to the interval
[xGrid[interval-1], xGrid[interval]]
.qw
- an input double
array containing the Gauss-Legendre weights.u
- an input double
array of dimension 12 by xlocal.length
containing the basis function values that define
at the Gauss-Legendre
points xlocal
. Setting
![u_{k,i}:=text{u[k][i]} quad mbox{and} quad x_i:=text{xlocal[i]} ,,](eqn_1159.png)
vector
is defined as

phi
- an output double
array of length 6 containing Gauss-Legendre
approximations for the local contributions
![phi_t := int_{text{xgrid[interval-1]}}^{text{xgrid[interval]}}phi(f,x,t)
tilde{beta}(x) dx,](eqn_1162.png)
where t=time
and
Denoting by degree
the number of Gauss-Legendre points (xlocal.length
) and setting
, vector phi
contains elements
![text{phi[i]} = text{width}*sum_{j=0}^{text{degree-1}}text{qw}[j],tilde{beta}_i(x_j),phi(f,x_j,t)](eqn_1165.png)
for i=0,...,5
.dphi
- an output double
array of dimension 6 by 6
containing a
Gauss-Legendre approximation for the Jacobian of the local contributions
at time point t=time
,
![frac{partial phi_t}{partial y}=int_{text{xgrid[interval-1]}}^{text{xgrid[interval]}}
frac{partial phi (f,x,t)}{partial f} ,tilde{beta}(x),tilde{beta}^T(x)dx,.](eqn_1167.png)
The approximation to this symmetric matrix is stored row-wise, i.e.
![text{dphi[i][j]} = text{width} * sum_{k=0}^{text{degree-1}}text{qw}[k],tilde{beta}_i(x_k),tilde{beta}_j(x_k)
left. frac{partial{phi}}{partial f}right|_{x=text{xlocal}[k],,t=text{time}}](eqn_1168.png)
for i,j=0,...,5
.
Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.