| Start page of documentation | Download the code | Documentation: PDF, PS |
| Previous: Correction terms | Next: Solving the resulting system |
At first, jumps are expressed in terms of known quantities, like boundary conditions, and one sided derivatives. Then, for jumps at arbitrary intersection point we can write equations
Note that the one sided derivatives depend on the unknown solution. Our goal is to approximate them using a least squares fit of a quadratic polynomial.
The first step is to select the stencil for least squares interpolation.
We follow the methodology from [3].
It is done by selecting some radius
and then taking all grid points
of
inside circle with radius
. (Line 73 in
DIFFOP/d_matrix.m.) With
we denote the stencil cardinality.
For each stencil point we try to fit a quadratic polynomial:
For a given grid function
, coefficients of the polynomial are
given by
Matrix
is the restriction operator,
restricts the
vector
defined at all grid points to its values only at
the stencil points.
is possible to write explicitely, however,
we have found that this costs enormous computational time and
because of this reason in code the matrix
is directly
computed (matrix W2R in DIFFOP/d_matrix.m).
Note that
Using (8) we obtain in the case of Dirichlet boundary condition
Using (9) we get for Neumann boundary
Thus, the system for jumps can be written as
In code, the matrix
(stored in variable D)
and the right hand side vector
(stored in variable Ft)
consist each of two parts, corresponding to Dirichlet and Neumann
intersection points:
Note: matrix
and vector
depend
on boundary conditions!
| Previous: Correction terms | Next: Solving the resulting system |