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 scaled preconditioned GMRES 00015 * linear solver, CVSPGMR. 00016 * ----------------------------------------------------------------- 00017 */ 00018 00019 #ifndef _CVSPGMR_H 00020 #define _CVSPGMR_H 00021 00022 #ifdef __cplusplus /* wrapper to enable C++ usage */ 00023 extern "C" { 00024 #endif 00025 00026 #include <cvode/cvode_spils.h> 00027 #include <sundials/sundials_spgmr.h> 00028 00029 /* 00030 * ----------------------------------------------------------------- 00031 * Function : CVSpgmr 00032 * ----------------------------------------------------------------- 00033 * A call to the CVSpgmr function links the main CVODE integrator 00034 * with the CVSPGMR linear solver. 00035 * 00036 * cvode_mem is the pointer to the integrator memory returned by 00037 * CVodeCreate. 00038 * 00039 * pretype is the type of user preconditioning to be done. 00040 * This must be one of the four enumeration constants 00041 * PREC_NONE, PREC_LEFT, PREC_RIGHT, or PREC_BOTH defined 00042 * in sundials_iterative.h. 00043 * These correspond to no preconditioning, 00044 * left preconditioning only, right preconditioning 00045 * only, and both left and right preconditioning, 00046 * respectively. 00047 * 00048 * maxl is the maximum Krylov dimension. This is an 00049 * optional input to the CVSPGMR solver. Pass 0 to 00050 * use the default value CVSPGMR_MAXL=5. 00051 * 00052 * The return value of CVSpgmr is one of: 00053 * CVSPILS_SUCCESS if successful 00054 * CVSPILS_MEM_NULL if the cvode memory was NULL 00055 * CVSPILS_MEM_FAIL if there was a memory allocation failure 00056 * CVSPILS_ILL_INPUT if a required vector operation is missing 00057 * The above constants are defined in cvode_spils.h 00058 * 00059 * ----------------------------------------------------------------- 00060 */ 00061 00062 SUNDIALS_EXPORT int CVSpgmr(void *cvode_mem, int pretype, int maxl); 00063 00064 00065 #ifdef __cplusplus 00066 } 00067 #endif 00068 00069 #endif