flat code including adaptive basis selection for one step is placed in the
script blackGd2.py in the directory OTSProjects/python/wavelet2. The full
code, calculating full time interval solution with adaptive basis selection is
placed in the script blackFinal.py.
For logic behind the adaptive basis selection see the section
(
Rebalancing wavelet basis
).
We get numerical solution
value
versus the
value
that comes from analytical solution calculated with substitution
.
The grid length is 87 on the last step. Experimentation shows that we can get
it down to 30 while keeping difference to the same digit. The main tool of
such experimentation is removing more basis functions with smallest
contribution, see section
(
Rebalancing wavelet basis
).
Plot of
.
|
Plot of
.
|
|