1 /* -----------------------------------------------------------------
2 * Programmer(s): Daniel R. Reynolds @ SMU
3 * -----------------------------------------------------------------
4 * SUNDIALS Copyright Start
5 * Copyright (c) 2002-2020, Lawrence Livermore National Security
6 * and Southern Methodist University.
7 * All rights reserved.
8 *
9 * See the top-level LICENSE and NOTICE files for details.
10 *
11 * SPDX-License-Identifier: BSD-3-Clause
12 * SUNDIALS Copyright End
13 * -----------------------------------------------------------------
14 * Header file for the deprecated direct linear solver interface in
15 * CVODES; these routines now just wrap the updated CVODE generic
16 * linear solver interface in cvodes_ls.h.
17 * -----------------------------------------------------------------*/
18
19 #include <cvodes/cvodes_ls.h>
20 #include <cvodes/cvodes_direct.h>
21
22 #ifdef __cplusplus /* wrapper to enable C++ usage */
23 extern "C" {
24 #endif
25
26 /*=================================================================
27 Exported Functions (wrappers for equivalent routines in cvodes_ls.h)
28 =================================================================*/
29
CVDlsSetLinearSolver(void * cvode_mem,SUNLinearSolver LS,SUNMatrix A)30 int CVDlsSetLinearSolver(void *cvode_mem, SUNLinearSolver LS,
31 SUNMatrix A)
32 { return(CVodeSetLinearSolver(cvode_mem, LS, A)); }
33
CVDlsSetJacFn(void * cvode_mem,CVDlsJacFn jac)34 int CVDlsSetJacFn(void *cvode_mem, CVDlsJacFn jac)
35 { return(CVodeSetJacFn(cvode_mem, jac)); }
36
CVDlsGetWorkSpace(void * cvode_mem,long int * lenrwLS,long int * leniwLS)37 int CVDlsGetWorkSpace(void *cvode_mem, long int *lenrwLS,
38 long int *leniwLS)
39 { return(CVodeGetLinWorkSpace(cvode_mem, lenrwLS, leniwLS)); }
40
CVDlsGetNumJacEvals(void * cvode_mem,long int * njevals)41 int CVDlsGetNumJacEvals(void *cvode_mem, long int *njevals)
42 { return(CVodeGetNumJacEvals(cvode_mem, njevals)); }
43
CVDlsGetNumRhsEvals(void * cvode_mem,long int * nfevalsLS)44 int CVDlsGetNumRhsEvals(void *cvode_mem, long int *nfevalsLS)
45 { return(CVodeGetNumLinRhsEvals(cvode_mem, nfevalsLS)); }
46
CVDlsGetLastFlag(void * cvode_mem,long int * flag)47 int CVDlsGetLastFlag(void *cvode_mem, long int *flag)
48 { return(CVodeGetLastLinFlag(cvode_mem, flag)); }
49
CVDlsGetReturnFlagName(long int flag)50 char *CVDlsGetReturnFlagName(long int flag)
51 { return(CVodeGetLinReturnFlagName(flag)); }
52
CVDlsSetLinearSolverB(void * cvode_mem,int which,SUNLinearSolver LS,SUNMatrix A)53 int CVDlsSetLinearSolverB(void *cvode_mem, int which,
54 SUNLinearSolver LS, SUNMatrix A)
55 { return(CVodeSetLinearSolverB(cvode_mem, which, LS, A)); }
56
CVDlsSetJacFnB(void * cvode_mem,int which,CVDlsJacFnB jacB)57 int CVDlsSetJacFnB(void *cvode_mem, int which, CVDlsJacFnB jacB)
58 { return(CVodeSetJacFnB(cvode_mem, which, jacB)); }
59
CVDlsSetJacFnBS(void * cvode_mem,int which,CVDlsJacFnBS jacBS)60 int CVDlsSetJacFnBS(void *cvode_mem, int which, CVDlsJacFnBS jacBS)
61 { return(CVodeSetJacFnBS(cvode_mem, which, jacBS)); }
62
63 #ifdef __cplusplus
64 }
65 #endif
66