---------------------------------------------------
Main goal: make covering codes chart oriented
from Harry:
# Bug in covering_create, line 164: switch order of factors in
data.s*data.h to allow for generalization to arbitrary projection
conditions for higher-dimensional manifolds.
> not changed, the definition of the projection is through pr_cnd.TS
# Bug in CurveSegment, line 128: change to s = chart.TS\u2019*base_chart.TS*s0
> no, is corect as is
# I am planning to write one chapter about adaptation and will use the
spectral approach to periodic orbit continuation as an example toolbox.
I believe we agreed to insert an additional state between flush and
predict called adapt that calls all toolboxes' adapt slot functions.
This function would need to recreate the tangent vector after all zero
problems and variable values had been updated. There would also be an
atlas algorithm function with default set to no adaptation but that
could be changed to adapt every few charts for example.
> added point to list below
# Do we need to call coco_set before coco.
> Yes, do not assign to coco directly. You may assign a whole structure
with coco_set though.
# Is beta always increasing in homotopy (cf. lorentzdemo, step 2).
> Should be for full quadratic condition, but may not be for the
linearised condition due to non-monotonous convergence when eigenvalues
are not bounded away from -1. ==> use damped FP iteration in update of M*.
>> We may not need the homotopy, damped Newton will do in one correction step
for full quadratic equation. Try with updates during Newton for linear
condition.
bugs:
# copy tangent information in add_parameters
# introduce initialisation sequence that allows correct use of tangents
in check_first_chart as well as correct evaluation of test functions
at first chart
# rename set_MX to set_status
# check bd_col, arrays are not merged even though they seem to fit,
like in bd_col(bd, {'x' 'p'}) [fix committed to coco]
# during event handling (singular events): after chart_at compute
chart.p only if not present, because p might be interpolated as well.
# rename cseg.MXFlag to cseg.Status
# function bd_idx that returns list of indices of special points
# remove cseg in flush, pass cseg to predict only if present in opts
# modify FSM to allow for loop over several curve segments (if atlas holds
several curve segments and wants to have event handling handle every
segment separate)
> No, is not really necessary and would complicate FSM too much.
# add_parameters should take fid, not prefix as argument
# split CurveSegment in base class for event handling plus derived classes
for interpolation
# fix state_init: chart should be a copy of curr_chart after construction
of curve segment, correct passing of 'EP' and ep_flag
# chart_at should return h instead of using hscale
# update ignore_at somewhere (in flush)
# check add_BP and add_SP: multiple event with no event handler,
evidx must contain complete evgroup, therefore, should it not be
chart.pt_type = ev.point_type{events.evidx(1)};
# check the computation of h_scale -> move call to cut_cseg to add_BP.
Do the functions [BP|MX|SP]_locate become identical and can be merged?
# function for computation of s and t related to a projection condition
in CurveSegment (takes base_chart.x and pr_cnd.TS as arguments and
returns pr_cnd.s and base_chart.t; pr_cnd.x must lie on [projection
of u onto pr_cnd.TS] + h*pr_cnd.s; pr_cnd.x and pr_cnd.h are then
chosen by predictor); compute_tangent must use pr_cnd for computing
chart.t as well
> no, use tangent function to compute t, CurveSegment will contain a
function for checking the correctness of a projection condition
# check CurveSegment:119:131; compare with printout of pr. cond.
# add_SP returns idx (used by add_BP and passed to cut_seg)
# split cseg into atlas and cseg
# make pr_cond a property of cseg, allow construction of 0d- as well
as 1d- curve segments
# change check_first_point to provide function that returns a vector of
flags instead of removing directions explicitly
# check uniqueness of fid in add_func
# prefix may now be a cell aray of two strings for somewhat more
flexibility for generating function identifyers
> No, this is pretty useless
# allow to extract info of efunc using get_func_data, this will be
necessary in add_parameters to copy tangent information
# clean up syntax of get_func_data, only return elements explicitly
requested by a string argument; check 'cdata' option!
# remove all additional return arguments from add_func, access to
function data should be explicit through get_func_data
# allow
init->correct->add->check_first->flush->predict->...
as well as
init->add->check_first->flush->correct->predict->...
# change homotopy interval to [-1,1] in init_var_sol, make interval, beta0
and other options settable; use hom_opts structure for more flexibility,
not just hom_cont
# include determinant and condition computation in lsol
# rename all signal/slot related functions: coco_cb_data.m, coco_cb_exist.m
# handle boundary points with tangent direction tangent to boundary
# use pr_cnd correctly during event location
# cseg in output from member functions?
# Remove update call from init_atlas (look at Harry\u2019s code!)
# Require predict to assign cseg.base_chart and cseg.curr_chart?
# Default implementations instead of abstract classes in CurveSegment
for non-minimal functions.
# Call to Newton (combined evaluation) FDF!
# use fdf in newton
# compute initial tangent correctly
# correct inheritance of boundary points (ptlist{end}) and special
points (ptlist{1})
# check that xfunc_update makes sense (using TS of chart etc.), not
all options seem possible with the current prediction setting; handling
of s is not correct, maybe predict should return a structure with data
for xfunc
# initialise options of opts.cont correctly in cseg constructors
# check empty domain with minimal code; I removed this code from
covering_create:54
% check for empty domain (bug: should this be in covering class?)
if pint(2)<=pint(1) || abs(pint(2)-pint(1))<=opts.corr.TOL
cont.ItMX = 0;
end
FSM:
# during event handling evaluate only test functions that are needed
# in subdivision: choose x such that event does actually occur inside the
computational domain
# change call to predictor to
[opts curr_chart] = opts.cseg.predict(opts);
# change update signal to
opts = coco_emit(opts, 'FSM.update', 'update', curr_chart, base_chart);
# clean inheritance + initialisation strategy of chart data using curr_chart
and the signal FSM.init_chart_data; handle ignore_at etc. with a
default strategy in FSM + allow modification from within atlas codes;
this should, for example, allow to store the value of the determinant
of the extended system and the parameter component of the tangent vector
as test functions for a branch- and a geometric fold point
# pass base_chart to FSM.update signal
# correct event_init (and other states) to work with ptlists with more than
two points, for example, coming from cover_1d_lsq, add chart.p for all
charts missing p (even if event handling is off, because this is part
of the output)
# reduce number of evaluations of test functions to necessary minimum,
compute chart.p only if not present and use chart.e as cache
# pass interpolated continuation tangent to monitor functions during event
handling (not to embedded monitor functions!)
# change locating of group events, locate "leading event" only (??) and use
Gauss-Newton method that can deal with singular matrices (??), other method:
keep curent strategy, but apply TOL to interpolation accuracy => test with
cont.TOL possible!
efunc:
# add support for combined evaluation of F and DFDU
# introduce new argument cdata (chart data) in call to any efunc-function;
in efunc_F and efunc_DFDX allow different ways of calling a function
(data, data chart_data), [no: allow empty function definition (just add
toolbox and chart data)]
# remove the xidx-return argument and introduce new function set_func_data
instead; introduce "efunc.close" signal; check with example test functions
and the projection condition if two signals might be necessary (hope not!)
covering:
# rename covering_cover to CurveSegment and all other classes to Atlas*
# introduce property TOL
# rename signal "covering_update" to "FSM_update" (this is an FSM signal)
# linear solver must be constructed outside non-linear solver, which
should get the linear solver as an argument.
# try to find a way how a non-linear solver can store data in a chart
(for example: Broyden's method should be able to store JInv), one
possibility is to have all parts of the correction operate on the
chart, so it gets build up step by step; this way, also the linear
solver can store data (for example, the determinant):
introduce curr_chart in CurveSegment
# point_at function should return [x p t], where p and t are optional, to
allow interpolation of parameters and tangent space if available/useful
(for example, in cover_1d_lsq)
atlas_1d_min:
# new cover_1d_min_ev with BP and FP (tangent test)
coco:
# restrict direct access of any opts.* to core
# in coco_add_parameters: allow parameters to be added to different lists
(active, inactive, internal)
# use signals within coco_set to update class variables during run-time
# introduce "all" properties that every toolbox can use as global default
# coco_set and coco_get: move all settings to opts.settings after changing
all accesses to coco_get
# coco_set and coco_get function: everything goes to opts.settings; merge
only opts.settings and copy everything else; do not use coco_set/coco_get
for anything else than setting/reading options from settings