class ContStruct(*args)

GetFEM ContStruct object

This object serves for storing parameters and data used in numerical continuation of solution branches of models (for more details about continuation see the GetFEM user documentation).

General constructor for ContStruct objects

  • S = ContStruct(Model md, string dataname_parameter[,string dataname_init, string dataname_final, string dataname_current], scalar sc_fac[, ...]) The variable dataname_parameter should parametrise the model given by md. If the parameterization is done via a vector datum, dataname_init and dataname_final should store two given values of this datum determining the parameterization, and dataname_current serves for actual values of this datum. sc_fac is a scale factor involved in the weighted norm used in the continuation.

    Additional options:

    • ‘lsolver’, string SOLVER_NAME
      name of the solver to be used for the incorporated linear systems (the default value is ‘auto’, which lets getfem choose itself); possible values are ‘superlu’, ‘mumps’ (if supported), ‘cg/ildlt’, ‘gmres/ilu’ and ‘gmres/ilut’;
    • ‘h_init’, scalar HIN
      initial step size (the default value is 1e-2);
    • ‘h_max’, scalar HMAX
      maximum step size (the default value is 1e-1);
    • ‘h_min’, scalar HMIN
      minimum step size (the default value is 1e-5);
    • ‘h_inc’, scalar HINC
      factor for enlarging the step size (the default value is 1.3);
    • ‘h_dec’, scalar HDEC
      factor for diminishing the step size (the default value is 0.5);
    • ‘max_iter’, int MIT
      maximum number of iterations allowed in the correction (the default value is 10);
    • ‘thr_iter’, int TIT
      threshold number of iterations of the correction for enlarging the step size (the default value is 4);
    • ‘max_res’, scalar RES
      target residual value of a new point on the solution curve (the default value is 1e-6);
    • ‘max_diff’, scalar DIFF
      determines a convergence criterion for two consecutive points (the default value is 1e-6);
    • ‘min_cos’, scalar MCOS
      minimal value of the cosine of the angle between tangents to the solution curve at an old point and a new one (the default value is 0.9);
    • ‘max_res_solve’, scalar RES_SOLVE
      target residual value for the linear systems to be solved (the default value is 1e-8);
    • ‘singularities’, int SING
      activates tools for detection and treatment of singular points (1 for limit points, 2 for bifurcation points and points requiring special branching techniques);
    • ‘non-smooth’
      determines that some special methods for non-smooth problems can be used;
    • ‘delta_max’, scalar DMAX
      maximum size of division for evaluating the test function on the convex combination of two augmented Jacobians that belong to different smooth pieces (the default value is 0.005);
    • ‘delta_min’, scalar DMIN
      minimum size of division for evaluating the test function on the convex combination (the default value is 0.00012);
    • ‘thr_var’, scalar TVAR
      threshold variation for refining the division (the default value is 0.02);
    • ‘nb_dir’, int NDIR
      total number of the linear combinations of one couple of reference vectors when searching for new tangent predictions during location of new one-sided branches (the default value is 40);
    • ‘nb_span’, int NSPAN
      total number of the couples of the reference vectors forming the linear combinations (the default value is 1);
    • ‘noisy’ or ‘very_noisy’
      determines how detailed information has to be displayed during the continuation process (residual values etc.).
Moore_Penrose_continuation(solution, parameter, tangent_sol, tangent_par, h)

Compute one step of the Moore-Penrose continuation: Take the point given by solution and parameter, the tangent given by tangent_sol and tangent_par, and the step size h. Return a new point on the solution curve, the corresponding tangent, a step size for the next step and optionally the current step size. If the returned step size equals zero, the continuation has failed. Optionally, return the type of any detected singular point. NOTE: The new point need not to be saved in the model in the end!


Return the last value of the bifurcation test function and eventually the whole calculated graph when passing between different sub-domains of differentiability.


Output a (unique) string representation of the ContStruct.

This can be used for performing comparisons between two different ContStruct objects. This function is to be completed.

compute_tangent(solution, parameter, tangent_sol, tangent_par)

Compute and return an updated tangent.


Display a short summary for a ContStruct object.

init_Moore_Penrose_continuation(solution, parameter, init_dir)

Initialise the Moore-Penrose continuation: Return a unit tangent to the solution curve at the point given by solution and parameter, and an initial step size for the continuation. Orientation of the computed tangent with respect to the parameter is determined by the sign of init_dir.


Return an initial step size for continuation.


Return the maximum step size for continuation.


Return the minimum step size for continuation.

non_smooth_bifurcation_test(solution1, parameter1, tangent_sol1, tangent_par1, solution2, parameter2, tangent_sol2, tangent_par2)

Test for a non-smooth bifurcation point between the point given by solution1 and parameter1 with the tangent given by tangent_sol1 and tangent_par1 and the point given by solution2 and parameter2 with the tangent given by tangent_sol2 and tangent_par2.


Return a singular point (X, gamma) stored in the ContStruct object and a couple of arrays (T_X, T_gamma) of tangents to all located solution branches that emanate from there.


Return the decrement ratio of the step size for continuation.


Return the increment ratio of the step size for continuation.