cvode_diag.h

Go to the documentation of this file.
00001 /*
00002  * -----------------------------------------------------------------
00003  * $Revision: 1.3 $
00004  * $Date: 2006/11/29 00:05:06 $
00005  * ----------------------------------------------------------------- 
00006  * Programmer(s): Scott D. Cohen, Alan C. Hindmarsh and
00007  *                Radu Serban @ LLNL
00008  * -----------------------------------------------------------------
00009  * Copyright (c) 2002, The Regents of the University of California.
00010  * Produced at the Lawrence Livermore National Laboratory.
00011  * All rights reserved.
00012  * For details, see the LICENSE file.
00013  * -----------------------------------------------------------------
00014  * This is the header file for the CVODE diagonal linear solver, CVDIAG.
00015  * -----------------------------------------------------------------
00016  */
00017 
00018 #ifndef _CVDIAG_H
00019 #define _CVDIAG_H
00020 
00021 #ifdef __cplusplus  /* wrapper to enable C++ usage */
00022 extern "C" {
00023 #endif
00024 
00025 #include <sundials/sundials_nvector.h>
00026 
00027 /*
00028  * -----------------------------------------------------------------
00029  * Function : CVDiag
00030  * -----------------------------------------------------------------
00031  * A call to the CVDiag function links the main integrator with
00032  * the CVDIAG linear solver.
00033  *
00034  * cvode_mem is the pointer to the integrator memory returned by
00035  *           CVodeCreate.
00036  *
00037  * The return value of CVDiag is one of:
00038  *    CVDIAG_SUCCESS   if successful
00039  *    CVDIAG_MEM_NULL  if the cvode memory was NULL
00040  *    CVDIAG_MEM_FAIL  if there was a memory allocation failure
00041  *    CVDIAG_ILL_INPUT if a required vector operation is missing
00042  * -----------------------------------------------------------------
00043  */
00044 
00045 SUNDIALS_EXPORT int CVDiag(void *cvode_mem);
00046 
00047 /*
00048  * -----------------------------------------------------------------
00049  * Optional outputs from the CVDIAG linear solver
00050  * -----------------------------------------------------------------
00051  *
00052  * CVDiagGetWorkSpace returns the real and integer workspace used
00053  *                    by CVDIAG.
00054  * CVDiagGetNumRhsEvals returns the number of calls to the user
00055  *                      f routine due to finite difference Jacobian
00056  *                      evaluation.
00057  *                      Note: The number of diagonal approximate
00058  *                      Jacobians formed is equal to the number of
00059  *                      CVDiagSetup calls. This number is available
00060  *                      through CVodeGetNumLinSolvSetups.
00061  * CVDiagGetLastFlag returns the last error flag set by any of
00062  *                   the CVDIAG interface functions.
00063  *
00064  * The return value of CVDiagGet* is one of:
00065  *    CVDIAG_SUCCESS   if successful
00066  *    CVDIAG_MEM_NULL  if the cvode memory was NULL
00067  *    CVDIAG_LMEM_NULL if the cvdiag memory was NULL
00068  * -----------------------------------------------------------------
00069  */
00070 
00071 SUNDIALS_EXPORT int CVDiagGetWorkSpace(void *cvode_mem, long int *lenrwLS, long int *leniwLS);
00072 SUNDIALS_EXPORT int CVDiagGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS);
00073 SUNDIALS_EXPORT int CVDiagGetLastFlag(void *cvode_mem, int *flag);
00074 
00075 /*
00076  * -----------------------------------------------------------------
00077  * The following function returns the name of the constant 
00078  * associated with a CVDIAG return flag
00079  * -----------------------------------------------------------------
00080  */
00081   
00082 SUNDIALS_EXPORT char *CVDiagGetReturnFlagName(int flag);
00083 
00084 /*
00085  * -----------------------------------------------------------------
00086  * CVDIAG return values
00087  * -----------------------------------------------------------------
00088  */
00089 
00090 #define CVDIAG_SUCCESS          0
00091 #define CVDIAG_MEM_NULL        -1
00092 #define CVDIAG_LMEM_NULL       -2
00093 #define CVDIAG_ILL_INPUT       -3
00094 #define CVDIAG_MEM_FAIL        -4
00095 
00096 /* Additional last_flag values */
00097 
00098 #define CVDIAG_INV_FAIL        -5
00099 #define CVDIAG_RHSFUNC_UNRECVR -6
00100 #define CVDIAG_RHSFUNC_RECVR   -7
00101 
00102 #ifdef __cplusplus
00103 }
00104 #endif
00105 
00106 #endif

Generated on Fri Sep 26 07:44:09 2008 for SimTKcore by  doxygen 1.5.6