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 00014 * Bi-CGSTAB linear solver, CPSPBCG. 00015 * ----------------------------------------------------------------- 00016 */ 00017 00018 #ifndef _CPSPBCG_H 00019 #define _CPSPBCG_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_spbcgs.h> 00027 00028 /* 00029 * ----------------------------------------------------------------- 00030 * Function : CPSpbcg 00031 * ----------------------------------------------------------------- 00032 * A call to the CPSpbcg function links the main CPODES integrator 00033 * with the CPSPBCG 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 iterative.h. These correspond to no preconditioning, 00042 * left preconditioning only, right preconditioning 00043 * only, and both left and right preconditioning, 00044 * respectively. 00045 * 00046 * maxl is the maximum Krylov dimension. This is an 00047 * optional input to the CPSPBCG solver. Pass 0 to 00048 * use the default value CPSPBCG_MAXL=5. 00049 * 00050 * The return value of CPSpbcg is one of: 00051 * CPSPILS_SUCCESS if successful 00052 * CPSPILS_MEM_NULL if the CPODES memory was NULL 00053 * CPSPILS_MEM_FAIL if there was a memory allocation failure 00054 * CPSPILS_ILL_INPUT if a required vector operation is missing 00055 * The above constants are defined in cpodes_spils.h 00056 * 00057 * ----------------------------------------------------------------- 00058 */ 00059 00060 SUNDIALS_EXPORT int CPSpbcg(void *cpode_mem, int pretype, int maxl); 00061 00062 00063 #ifdef __cplusplus 00064 } 00065 #endif 00066 00067 #endif