00001 /* 00002 * ----------------------------------------------------------------- 00003 * $Revision: 1.2 $ 00004 * $Date: 2006/11/29 00:05:06 $ 00005 * ----------------------------------------------------------------- 00006 * Programmer: Radu Serban @ LLNL 00007 * ----------------------------------------------------------------- 00008 * Copyright (c) 2006, The Regents of the University of California. 00009 * Produced at the Lawrence Livermore National Laboratory. 00010 * All rights reserved. 00011 * For details, see the LICENSE file. 00012 * ----------------------------------------------------------------- 00013 * This is the header file for the CPODES scaled preconditioned GMRES 00014 * linear solver, CPSPGMR. 00015 * ----------------------------------------------------------------- 00016 */ 00017 00018 #ifndef _CPSPGMR_H 00019 #define _CPSPGMR_H 00020 00021 #ifdef __cplusplus /* wrapper to enable C++ usage */ 00022 extern "C" { 00023 #endif 00024 00025 #include <cpodes/cpodes_spils.h> 00026 #include <sundials/sundials_spgmr.h> 00027 00028 /* 00029 * ----------------------------------------------------------------- 00030 * Function : CPSpgmr 00031 * ----------------------------------------------------------------- 00032 * A call to the CPSpgmr function links the main CPODES integrator 00033 * with the CPSPGMR linear solver. 00034 * 00035 * cpode_mem is the pointer to the integrator memory returned by 00036 * CPodeCreate. 00037 * 00038 * pretype is the type of user preconditioning to be done. 00039 * This must be one of the four enumeration constants 00040 * PREC_NONE, PREC_LEFT, PREC_RIGHT, or PREC_BOTH defined 00041 * in sundials_iterative.h. 00042 * These correspond to no preconditioning, 00043 * left preconditioning only, right preconditioning 00044 * only, and both left and right preconditioning, 00045 * respectively. 00046 * 00047 * maxl is the maximum Krylov dimension. This is an 00048 * optional input to the CPSPGMR solver. Pass 0 to 00049 * use the default value CPSPGMR_MAXL=5. 00050 * 00051 * The return value of CPSpgmr is one of: 00052 * CPSPILS_SUCCESS if successful 00053 * CPSPILS_MEM_NULL if the CPODES memory was NULL 00054 * CPSPILS_MEM_FAIL if there was a memory allocation failure 00055 * CPSPILS_ILL_INPUT if a required vector operation is missing 00056 * The above constants are defined in cpodes_spils.h 00057 * 00058 * ----------------------------------------------------------------- 00059 */ 00060 00061 SUNDIALS_EXPORT int CPSpgmr(void *cpode_mem, int pretype, int maxl); 00062 00063 00064 #ifdef __cplusplus 00065 } 00066 #endif 00067 00068 #endif