/usr/include/cvodes/cvodes_diag.h is in libsundials-serial-dev 2.5.0-3+b3.
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | /*
* -----------------------------------------------------------------
* $Revision: 1.6 $
* $Date: 2010/12/01 22:13:10 $
* -----------------------------------------------------------------
* Programmer(s): Radu Serban @ LLNL
* -----------------------------------------------------------------
* Copyright (c) 2005, The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
* All rights reserved.
* For details, see the LICENSE file.
* -----------------------------------------------------------------
* This is the header file for the diagonal linear solver CVSDIAG.
*
*
* Part I contains type definitions and function prototypes for using
* CVDIAG on forward problems (IVP integration and/or FSA)
*
* Part II contains type definitions and function prototypes for using
* CVDIAG on adjoint (backward) problems
* -----------------------------------------------------------------
*/
#ifndef _CVSDIAG_H
#define _CVSDIAG_H
#ifdef __cplusplus /* wrapper to enable C++ usage */
extern "C" {
#endif
#include <sundials/sundials_nvector.h>
/*
* -----------------------------------------------------------------
* CVDIAG return values
* -----------------------------------------------------------------
*/
#define CVDIAG_SUCCESS 0
#define CVDIAG_MEM_NULL -1
#define CVDIAG_LMEM_NULL -2
#define CVDIAG_ILL_INPUT -3
#define CVDIAG_MEM_FAIL -4
/* Additional last_flag values */
#define CVDIAG_INV_FAIL -5
#define CVDIAG_RHSFUNC_UNRECVR -6
#define CVDIAG_RHSFUNC_RECVR -7
/* Return values for adjoint module */
#define CVDIAG_NO_ADJ -101
/*
* -----------------------------------------------------------------
* PART I - forward problems
* -----------------------------------------------------------------
*/
/*
* -----------------------------------------------------------------
* Function : CVDiag
* -----------------------------------------------------------------
* A call to the CVDiag function links the main integrator with
* the CVDIAG linear solver.
*
* cvode_mem is the pointer to the integrator memory returned by
* CVodeCreate.
*
* The return value of CVDiag is one of:
* CVDIAG_SUCCESS if successful
* CVDIAG_MEM_NULL if the cvode memory was NULL
* CVDIAG_MEM_FAIL if there was a memory allocation failure
* CVDIAG_ILL_INPUT if a required vector operation is missing
* -----------------------------------------------------------------
*/
SUNDIALS_EXPORT int CVDiag(void *cvode_mem);
/*
* -----------------------------------------------------------------
* Optional outputs from the CVDIAG linear solver
* -----------------------------------------------------------------
*
* CVDiagGetWorkSpace returns the real and integer workspace used
* by CVDIAG.
* CVDiagGetNumRhsEvals returns the number of calls to the user
* f routine due to finite difference Jacobian
* evaluation.
* Note: The number of diagonal approximate
* Jacobians formed is equal to the number of
* CVDiagSetup calls. This number is available
* through CVodeGetNumLinSolvSetups.
* CVDiagGetLastFlag returns the last error flag set by any of
* the CVDIAG interface functions.
*
* The return value of CVDiagGet* is one of:
* CVDIAG_SUCCESS if successful
* CVDIAG_MEM_NULL if the cvode memory was NULL
* CVDIAG_LMEM_NULL if the cvdiag memory was NULL
* -----------------------------------------------------------------
*/
SUNDIALS_EXPORT int CVDiagGetWorkSpace(void *cvode_mem, long int *lenrwLS, long int *leniwLS);
SUNDIALS_EXPORT int CVDiagGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS);
SUNDIALS_EXPORT int CVDiagGetLastFlag(void *cvode_mem, long int *flag);
/*
* -----------------------------------------------------------------
* The following function returns the name of the constant
* associated with a CVDIAG return flag
* -----------------------------------------------------------------
*/
SUNDIALS_EXPORT char *CVDiagGetReturnFlagName(long int flag);
/*
* -----------------------------------------------------------------
* PART II - backward problems
* -----------------------------------------------------------------
*/
/*
* -----------------------------------------------------------------
* Function: CVDiagB
* -----------------------------------------------------------------
* CVDiagB links the main CVODE integrator with the CVDIAG
* linear solver for the backward integration.
* -----------------------------------------------------------------
*/
SUNDIALS_EXPORT int CVDiagB(void *cvode_mem, int which);
#ifdef __cplusplus
}
#endif
#endif
|