cvodes_spgmr.h

Go to the documentation of this file.
00001 /*
00002  * -----------------------------------------------------------------
00003  * $Revision: 1.2 $
00004  * $Date: 2006/11/29 00:05:06 $
00005  * ----------------------------------------------------------------- 
00006  * Programmer(s): Radu Serban @ LLNL
00007  * -----------------------------------------------------------------
00008  * Copyright (c) 2005, 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 CVODES scaled preconditioned 
00014  * GMRES linear solver, CVSPGMR.
00015  *
00016  * Part I contains function prototypes for using CVSPGMR on forward 
00017  * problems (IVP integration and/or FSA)
00018  *
00019  * Part II contains function prototypes for using CVSPGMR on adjoint 
00020  * (backward) problems
00021  * -----------------------------------------------------------------
00022  */
00023 
00024 #ifndef _CVSSPGMR_H
00025 #define _CVSSPGMR_H
00026 
00027 #ifdef __cplusplus  /* wrapper to enable C++ usage */
00028 extern "C" {
00029 #endif
00030 
00031 #include <cvodes/cvodes_spils.h>
00032 #include <sundials/sundials_spgmr.h>
00033 
00034 /* 
00035  * -----------------------------------------------------------------
00036  * PART I - forward problems
00037  * -----------------------------------------------------------------
00038  */
00039 
00040 /*
00041  * -----------------------------------------------------------------
00042  * Function : CVSpgmr
00043  * -----------------------------------------------------------------
00044  * A call to the CVSpgmr function links the main CVODE integrator
00045  * with the CVSPGMR linear solver.
00046  *
00047  * cvode_mem is the pointer to the integrator memory returned by
00048  *           CVodeCreate.
00049  *
00050  * pretype   is the type of user preconditioning to be done.
00051  *           This must be one of the four enumeration constants
00052  *           NONE, LEFT, RIGHT, or BOTH defined in iterative.h.
00053  *           These correspond to no preconditioning,
00054  *           left preconditioning only, right preconditioning
00055  *           only, and both left and right preconditioning,
00056  *           respectively.
00057  *
00058  * maxl      is the maximum Krylov dimension. This is an
00059  *           optional input to the CVSPGMR solver. Pass 0 to
00060  *           use the default value CVSPILS_MAXL=5.
00061  *
00062  * The return value of CVSpgmr is one of:
00063  *    CVSPILS_SUCCESS   if successful
00064  *    CVSPILS_MEM_NULL  if the cvode memory was NULL
00065  *    CVSPILS_MEM_FAIL  if there was a memory allocation failure
00066  *    CVSPILS_ILL_INPUT if a required vector operation is missing
00067  * The above constants are defined in cvodes_spils.h
00068  * -----------------------------------------------------------------
00069  */
00070 
00071 SUNDIALS_EXPORT int CVSpgmr(void *cvode_mem, int pretype, int maxl);
00072 
00073 /* 
00074  * -----------------------------------------------------------------
00075  * PART II - backward problems
00076  * -----------------------------------------------------------------
00077  */
00078 
00079 SUNDIALS_EXPORT int CVSpgmrB(void *cvadj_mem, int pretypeB, int maxlB);
00080   
00081 
00082 
00083 #ifdef __cplusplus
00084 }
00085 #endif
00086 
00087 #endif

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