00001 /* 00002 * ----------------------------------------------------------------- 00003 * $Revision: 1.3 $ 00004 * $Date: 2006/11/29 00:05:05 $ 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 dense linear solver, CPDENSE. 00014 * ----------------------------------------------------------------- 00015 */ 00016 00017 #ifndef _CPDENSE_H 00018 #define _CPDENSE_H 00019 00020 #ifdef __cplusplus /* wrapper to enable C++ usage */ 00021 extern "C" { 00022 #endif 00023 00024 #include <cpodes/cpodes_direct.h> 00025 #include <sundials/sundials_dense.h> 00026 00027 /* 00028 * ================================================================= 00029 * E X P O R T E D F U N C T I O N S 00030 * ================================================================= 00031 */ 00032 00033 /* 00034 * ----------------------------------------------------------------- 00035 * Function : CPDense 00036 * ----------------------------------------------------------------- 00037 * A call to the CPDense function links the main integrator with 00038 * the CPDENSE linear solver. 00039 * 00040 * cpode_mem is the pointer to the integrator memory returned by 00041 * CPodeCreate. 00042 * 00043 * N is the size of the ODE system. 00044 * 00045 * The return value of CPDense is one of: 00046 * CPDIRECT_SUCCESS if successful 00047 * CPDIRECT_MEM_NULL if the CPODES memory was NULL 00048 * CPDIRECT_MEM_FAIL if there was a memory allocation failure 00049 * CPDIRECT_ILL_INPUT if a required vector operation is missing 00050 * ----------------------------------------------------------------- 00051 */ 00052 00053 SUNDIALS_EXPORT int CPDense(void *cpode_mem, int N); 00054 00055 /* 00056 * ----------------------------------------------------------------- 00057 * Function : CPDenseProj 00058 * ----------------------------------------------------------------- 00059 * A call to the CPDenseProj function links the main integrator with 00060 * the CPDENSE linear solver. 00061 * 00062 * cpode_mem the pointer to the integrator memory returned by 00063 * CPodeCreate. 00064 * Nc the number of constraints 00065 * Ny the number of states (size of the ODE system). 00066 * fact_type the type of factorization used for the constraint 00067 * Jcobian G. Legal values are CPDIRECT_LU and CPDIRECT_LQ. 00068 * 00069 * The return value of CPDense is one of: 00070 * CPDIRECT_SUCCESS if successful 00071 * CPDIRECT_MEM_NULL if the CPODES memory was NULL 00072 * CPDIRECT_MEM_FAIL if there was a memory allocation failure 00073 * CPDIRECT_ILL_INPUT if a required vector operation is missing 00074 * ----------------------------------------------------------------- 00075 */ 00076 00077 SUNDIALS_EXPORT int CPDenseProj(void *cpode_mem, int Nc, int Ny, int fact_type); 00078 00079 #ifdef __cplusplus 00080 } 00081 #endif 00082 00083 #endif