Function handles
- [c,a,f,b]=p.fuha.G(p,u): compute coefficients c, a, b and f in G in the full (sfem=0) syntax (sample acfold_G).
- [cj,aj,bj]=p.fuha.Gjac(p,u): coefficients for calculating Gu in the (sfem=0) syntax (sample acfold_Gjac).
- r=p.fuha.sG(p,u), Gu=p.fuha.sGjac(p,u): residual G(u) and jacobian Gu(u) in the sfem=+-1 setting using the preassembled matrices p.mat.M, p.mat.K, p.mat.Kadv (sample acfold_sG), (sample acfold_sG).
- bc=p.fuha.bc(p,u), bcj=p.fuha.bcjac(p,u): boundary conditions, and their jacobian
- p.fuha.headfu(p): called at start of cont, e.g. for headline output function, default @stanheadfu (doc)
- cstop=ufu(p,brdat,ds): user function called after each continuation step for printout, stopping if lam<>p.sw.lammin,p.sw.lammax, etc. Default @stanufu (doc)
- out=p.fuha.outfu(p,u): generate branch output in addition to bradat.m, default value @stanbra (doc)
- x=p.fuha.lss(A,u,p): linear systems solver for x=Au, A = D(G;q) with q auxiliary functions, default @lss, i.e. x=A\u (doc)
- x=p.fuha.blss(A,u,p): analogue of lss for bordered (or 'extended') linear system, default
@blss (doc)
- p.fuha.savefu(p,varargin): function to save solution data, default @stansavefu (doc)
- p=p.fuha.postmmod(p): function called after mesh-modification, default @stanpostmeshmod (doc)
- q=p.fuha.qf(p,u): auxiliary equations. Set number of axuiliary equations in p.nc.nq (sample acfold_qf -- here used via spcontini). More samples in demo acfront, schnaktravel.
- qder=p.fuha.qfder(p,u): Jacobian of auxiliary equations (sample acfold_qfder). See also demos acfront, schnaktravel.
- Gvvph=p.fuha.spjac(p,u): Additional Jacobian for fold/branch point continuation (sample acfold_spjac).
Numerical parameters
- p.nc.tol=1e-8: tolerance for corrector
- p.nc.dsmin=0.0001, p.nc.dsmax=5: minimum and maximum
allowed arclength stepsize in adaptive stepsize control
- p.nc.lammin=-1e6; p.nc.lammax=1e6: bifurcation diagram bounds
- p.nc.nsteps=10: # continuation steps (multi-steps for pmcont)
- p.nc.del=1e-8: perturbation size for finite differences
- p.nc.lamdtol=0.5: tolerance of parametrization (natural/arclength) switch (in case p.sw.para=1)
- p.nc.errbound=0: if >0 and errchecksw>0, then this bound determines call to mesh refinement
- p.nc.dlammax=1: maximum allowed difference in lambda for continuation step
- p.nc.neig=[20 ..]: # eigenvalues of jacobian (G_u) computed via eigs, vector
for Hopf.
- p.nc.neigdet=0: # eigenvalues for eigs of bordered jacobian (A), 0 for LU-method
- p.nc.eigref=[0 ..]: shifts for eigenvalues computed with eigs, vector for Hopf.
- p.nc.bisecmax=10: maximum # of bisections during special point locations
- p.nc.dsminbis=1e-9: dsmin for bifurcation- and fold-localization via bisection
Mesh-adaption
- p.nc.amod=0: adapt mesh each amod-th step (0 for never)
- p.nc.bddistx=0.1, p.nc.bddisty=0.1: boundary distances for triangles not refined in mesh-refinement in case of periodic boundaries
- p.nc.ngen=5: max number of refinements during adaption
"Numerics" switches
- p.sw.bifcheck=1: 0 for none, 1 for bifdetec via LU of A (extended matrix), 2 for bifdetec via # negative eigenvalues
- p.sw.bifloc=2: 0 for tangent, 1 for secant, 2 for quadratic
- p.sw.foldcheck=0: 0: no fold detection, 1: fold detection on.
- p.sw.spcont=0: 0=normal continuation, 2/1=fold/branch point (zero eigenvalue) continuation
- p.sw.spcalc=1: 1/0 to calculate/not calculate stability EVals
- p.sw.spjac=1: 1/0 to use fuha.spjac or not during fold/branch point continuation
- p.sw.sfem=0: -1: OOPDE, 0: full assembly via c,a,b,f, 1: semilinear problem.
- p.sw.para=1: parametrization switch, 0: "natural", 1: arclength, 3: "natural" for Hopf, 4: arclength for Hopf
- p.sw.jac=1: Jacobian switch, 1: Gu analytically, else FD
- p.sw.qjac=1: Jac for q. 1: qu analytically, else FD
- p.sw.newt=0: 0=newton, 1=chord
- p.sw.norm='inf': norm for corrector-tolerance
- p.sw.errcheck=0: 0: error-estimate off, 1: put err-est to p.sol.err, but no further action, 2: meshadac if p.sol.err>p.nc.errbound.
- p.sw.inter=1;p.sw.verb=1: interaction/verbosity switch: 0=none, 1=some, 2=much
- p.sw.bprint=[]: # branch components for printout by outfu
- p.sw.bcper=0: type of bc: 0 normal, 1 up=down cylinder, 2 left=right cylinder, 3 torus
Plotting
- p.plot.pstyle=1: solution plot style; 0: only the mesh, 1: mesh-plot of u, 2; contour-plot,
3: surface, with lightning.
- p.plot.pfig=1: figure number of solution plot
- p.plot.brfig=2: same for branch figure
- p.plot.ifig=6: same for info figure
- p.plot.pmod=1: plot every pmod-th step
- p.plot.pcmp=1; p.plot.bpcmp=0: component of sol. resp. branch for plotting
- p.plot.cm='cool': colormap
- p.plot.lpos=[0 0 10]: light-position for pstyle=3
- p.plot.axis='tight': choose, e.g., 'tight', 'equal', 'image'
- p.plot.fs=16: fontsize for sol-plots
- p.plot.labelsw=0: 1/0 for labels/no labels in solplot
- p.plot.spfig=4: figure number for spectral output with spcalc (or specGu)
- p.plot.brafig=3: figure number for standard post-computation plotting of branch
File handling
- p.file.pnamesw=0 : 1 to automatically set prefix of file names to variable name
- p.file.dirchecksw=0 : 1 for user check if directories need to be created
- p.file.dirchecksw=0 : 1 for user check if directories need to be created
or written into if exist; 0 no check
- p.file.smod=5 : save ev. smod-th step, 0 for none
- p.file.mname=[] : name of mesh-file, needed if msave=0
- p.file.msave=1 : if 0 then save meshes separtely
- p.file.mdir='meshes' : directory for saving meshes
- p.file.count=0 : counter for step
- p.file.bcount=1 : counter for branching
- p.file.fcount=1 : counter for fold points
Timing times only for reference, values set in cont/pmcont
- p.time.timesw=1 : 1 for output at end of cont
- p.time.tot=0 : times: total
- p.time.totst=0 : times: total for steps
- p.time.st=0 : times: current step
- p.time.bif=0 : times for: bifcheck
- p.time.spec=0 : times for: spcalc
- p.time.newton=0 : times for: nloop
pmcont specific
- p.pm.resfac=0.2 : resi-improvement for pmcont
- p.pm.mst=10 : # predictors for pmcont
- p.pm.imax=1 : base-max-iterations for pmcont
fsolve specific
- p.fsol.fsol=0 : use fsolve? 0:no, 1:pde, 2:ext, 3: both
- p.fsol.meth=1 : 1=trust-reg., else Levenberg-Marquardt
- p.fsol.disp=3 : 0=off, 1=final, 2=notify, 3=iter
- p.fsol.tol=p.nc.tol^2 :
- p.fsol.imax=5 : maximum # iterations
- p.fsol.opt=optimset('Jacobian','on','PrecondBandWidth',0)
Initializations for startup
- p.sol.deta=0 : determinant of linearization -- change is used to detect bif
- p.sol.err=0 : a posteriori error estimate
- p.sol.meth=' ' : string code for continuation step method 'arc', or 'nat'. See p.parasw.
- p.sol.res=0 : residuum of solution measure in norm of p.sw.norm
- p.sol.iter=0 : number of iterations used for this solution
- p.sol.ineg=-1 : number of negative (i.e. unstable) eigenvalues
- p.sol.muv=[] : eigenvectors
- p.sol.lamd=0 : step length in primary parameter (from tangent vector)
- p.sol.restart=1 : 1: make initial steps, 0: use tangent p.tau
- p.tau=1 : tangent vector, here trivially initialized
- p.branch=[] : branch, here trivially initialized
- p.u=[] : solution, here trivially initialized
- p.sol.xiq=0 : weight of auxiliary eqns for arclength scalar product (needs to exist)
- p.mat.fill=1 : filling operator (nontrivial in case of periodic b.c.)
- p.mat.drop=1 :
- p.mat.M=[]; p.mat.K=[] : empty mass and stiffness matrices
- p.mesh=[] : the FEM mesh
- p.mesh.sympoi=0 : if 1 then make poimesh symmetric
- p.sol.ptype=-99 : initial point type
- p.usrlam=[] : desired lambda-values to locate more closely via bisections (see p.nc.bisecmax, p.nc.dsminbis)
- p.nc.nq=0 : number of auxiliary equations. If >0
use file handle p.fuha.q to routine for auxiliary equations.
Additional data calculated at runtime
- p.nu : number of unknowns for the
FEM-discretization typically initialized in stanmesh.m to
p.nu=p.np*p.nc.neq. Modified also by
spcontini.m, spcontexit.m and for periodic
domain within rec2per
- p.sol.deta : sign of det(A)
- p.sol.err : error estimate
- p.sol.meth : used method (nat or arc)
- p.sol.iter : # of iterations in last Newton loop
- p.sol.ineg : # of negative eigenvalues
- p.sol.muv : vector of eigenvalues of Gu
- p.sol.restart : 1 to restart continuation
- p.sol.ds : current stepsize