/usr/share/octave/site/m/sundialsTB/cvodes/function_types/CVPrecSetupFnB.m is in octave-sundials 2.5.0-3+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | %CVPrecSetupFnB - type for user provided preconditioner setup function for backward problems.
%
% The user-supplied preconditioner setup function PSETFUN and
% the user-supplied preconditioner solve function PSOLFUN
% together must define left and right preconditoner matrices
% P1 and P2 (either of which may be trivial), such that the
% product P1*P2 is an approximation to the Newton matrix
% M = I - gamma*J. Here J is the system Jacobian J = df/dy,
% and gamma is a scalar proportional to the integration step
% size h. The solution of systems P z = r, with P = P1 or P2,
% is to be carried out by the PrecSolve function, and PSETFUN
% is to do any necessary setup operations.
%
% The user-supplied preconditioner setup function PSETFUN
% is to evaluate and preprocess any Jacobian-related data
% needed by the preconditioner solve function PSOLFUN.
% This might include forming a crude approximate Jacobian,
% and performing an LU factorization on the resulting
% approximation to M. This function will not be called in
% advance of every call to PSOLFUN, but instead will be called
% only as often as necessary to achieve convergence within the
% Newton iteration. If the PSOLFUN function needs no
% preparation, the PSETFUN function need not be provided.
%
% For greater efficiency, the PSETFUN function may save
% Jacobian-related data and reuse it, rather than generating it
% from scratch. In this case, it should use the input flag JOK
% to decide whether to recompute the data, and set the output
% flag JCUR accordingly.
%
% Each call to the PSETFUN function is preceded by a call to
% ODEFUN with the same (t,y) arguments. Thus the PSETFUN
% function can use any auxiliary data that is computed and
% saved by the ODEFUN function and made accessible to PSETFUN.
%
%
% The function PSETFUNB must be defined either as
% FUNCTION [JCURB, FLAG] = PSETFUNB(T,Y,YB,FYB,JOK,GAMMAB)
% or as
% FUNCTION [JCURB, FLAG, NEW_DATA] = PSETFUNB(T,Y,YB,FYB,JOK,GAMMAB,DATA)
% depending on whether a user data structure DATA was specified in
% CVodeInit. In either case, it must return the flags JCURB and FLAG.
%
% See also CVPrecSolveFnB, CVodeSetOptions
%
% NOTE: PSETFUNB is specified through the property PrecSetupFn to
% CVodeSetOptions and is used only if the property LinearSolver was
% set to 'GMRES', 'BiCGStab', or 'TFQMR' and if the property PrecType
% is not 'None'.
% Radu Serban <radu@llnl.gov>
% Copyright (c) 2005, The Regents of the University of California.
% $Revision: 1.3 $Date: 2012/03/20 21:08:32 $
|