Navigation

Operators and Keywords

Function List:

C++ API

DASPK-opts.cc File Reference

#include <iomanip>
#include <iostream>
#include "DASPK-opts.h"
#include "defun-dld.h"
#include "pr-output.h"
#include "oct-obj.h"
#include "utils.h"
#include "pager.h"

Include dependency graph for DASPK-opts.cc:

This graph shows which files directly or indirectly include this file:


Classes

struct  DASPK_options_struct

Defines

#define MAX_TOKENS   6
#define NUM_OPTIONS   13

Functions

 DEFUN_DLD (daspk_options, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} daspk_options (@var{opt}, @var{val})\n\ When called with two arguments, this function\n\ allows you set options parameters for the function @code{daspk}.\n\ Given one argument, @code{daspk_options} returns the value of the\n\ corresponding option. If no arguments are supplied, the names of all\n\ the available options and their current values are displayed.\n\ \n\ Options include\n\ \n\ @table @code\n\ @item \"absolute tolerance\"\n\ Absolute tolerance. May be either vector or scalar. If a vector, it\n\ must match the dimension of the state vector, and the relative\n\ tolerance must also be a vector of the same length.\n\ @item \"relative tolerance\"\n\ Relative tolerance. May be either vector or scalar. If a vector, it\n\ must match the dimension of the state vector, and the absolute\n\ tolerance must also be a vector of the same length.\n\ \n\ The local error test applied at each integration step is\n\ \n\ @example\n\ @group\n\ abs (local error in x(i))\n\ <= rtol(i) * abs (Y(i)) + atol(i)\n\ @end group\n\ @end example\n\ @item \"compute consistent initial condition\"\n\ Denoting the differential variables in the state vector by @samp{Y_d}\n\ and the algebraic variables by @samp{Y_a}, @code{ddaspk} can solve\n\ one of two initialization problems:\n\ \n\ @enumerate\n\ @item Given Y_d, calculate Y_a and Y'_d\n\ @item Given Y', calculate Y.\n\ @end enumerate\n\ \n\ In either case, initial values for the given components are input, and\n\ initial guesses for the unknown components must also be provided as\n\ input. Set this option to 1 to solve the first problem, or 2 to solve\n\ the second (the default is 0, so you must provide a set of\n\ initial conditions that are consistent).\n\ \n\ If this option is set to a nonzero value, you must also set the\n\ @code{\"algebraic variables\"} option to declare which variables in the\n\ problem are algebraic.\n\ @item \"use initial condition heuristics\"\n\ Set to a nonzero value to use the initial condition heuristics options\n\ described below.\n\ @item \"initial condition heuristics\"\n\ A vector of the following parameters that can be used to control the\n\ initial condition calculation.\n\ \n\ @table @code\n\ @item MXNIT\n\ Maximum number of Newton iterations (default is 5).\n\ @item MXNJ\n\ Maximum number of Jacobian evaluations (default is 6).\n\ @item MXNH\n\ Maximum number of values of the artificial stepsize parameter to be\n\ tried if the @code{\"compute consistent initial condition\"} option has\n\ been set to 1 (default is 5).\n\ \n\ Note that the maximum total number of Newton iterations allowed is\n\ @code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial\n\ condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is\n\ set to 2.\n\ @item LSOFF\n\ Set to a nonzero value to disable the linesearch algorithm (default is\n\ 0).\n\ @item STPTOL\n\ Minimum scaled step in linesearch algorithm (default is eps^(2/3)).\n\ @item EPINIT\n\ Swing factor in the Newton iteration convergence test. The test is\n\ applied to the residual vector, premultiplied by the approximate\n\ Jacobian. For convergence, the weighted RMS norm of this vector\n\ (scaled by the error weights) must be less than @code{EPINIT*EPCON},\n\ where @code{EPCON} = 0.33 is the analogous test constant used in the\n\ time steps. The default is @code{EPINIT} = 0.01.\n\ @end table\n\ @item \"print initial condition info\"\n\ Set this option to a nonzero value to display detailed information\n\ about the initial condition calculation (default is 0).\n\ @item \"exclude algebraic variables from error test\"\n\ Set to a nonzero value to exclude algebraic variables from the error\n\ test. You must also set the @code{\"algebraic variables\"} option to\n\ declare which variables in the problem are algebraic (default is 0).\n\ @item \"algebraic variables\"\n\ A vector of the same length as the state vector. A nonzero element\n\ indicates that the corresponding element of the state vector is an\n\ algebraic variable (i.e., its derivative does not appear explicitly\n\ in the equation set.\n\ \n\ This option is required by the\n\ @code{compute consistent initial condition\"} and\n\ @code{\"exclude algebraic variables from error test\"} options.\n\ @item \"enforce inequality constraints\"\n\ Set to one of the following values to enforce the inequality\n\ constraints specified by the @code{\"inequality constraint types\"}\n\ option (default is 0).\n\ \n\ @enumerate\n\ @item To have constraint checking only in the initial condition calculation.\n\ @item To enforce constraint checking during the integration.\n\ @item To enforce both options 1 and 2.\n\ @end enumerate\n\ @item \"inequality constraint types\"\n\ A vector of the same length as the state specifying the type of\n\ inequality constraint. Each element of the vector corresponds to an\n\ element of the state and should be assigned one of the following\n\ codes \n\ \n\ @table @asis\n\ @item -2\n\ Less than zero.\n\ @item -1\n\ Less than or equal to zero.\n\ @item 0\n\ Not constrained.\n\ @item 1\n\ Greater than or equal to zero.\n\ @item 2\n\ Greater than zero.\n\ @end table\n\ \n\ This option only has an effect if the\n\ @code{\"enforce inequality constraints\"} option is nonzero.\n\ @item \"initial step size\"\n\ Differential-algebraic problems may occasionally suffer from severe\n\ scaling difficulties on the first step. If you know a great deal\n\ about the scaling of your problem, you can help to alleviate this\n\ problem by specifying an initial stepsize (default is computed\n\ automatically).\n\ @item \"maximum order\"\n\ Restrict the maximum order of the solution method. This option must\n\ be between 1 and 5, inclusive (default is 5).\n\ @item \"maximum step size\"\n\ Setting the maximum stepsize will avoid passing over very large\n\ regions (default is not specified).\n\ @end table\n\ @end deftypefn")

Define Documentation

#define MAX_TOKENS   6

#define NUM_OPTIONS   13


Function Documentation

DEFUN_DLD ( daspk_options  ,
args   
)