1 /*-----------------------------------------------------------------
2  * Programmer(s): Daniel R. Reynolds @ SMU
3  *                Radu Serban @ LLNL
4  *-----------------------------------------------------------------
5  * SUNDIALS Copyright Start
6  * Copyright (c) 2002-2021, Lawrence Livermore National Security
7  * and Southern Methodist University.
8  * All rights reserved.
9  *
10  * See the top-level LICENSE and NOTICE files for details.
11  *
12  * SPDX-License-Identifier: BSD-3-Clause
13  * SUNDIALS Copyright End
14  *-----------------------------------------------------------------
15  * Implementation file for the deprecated direct linear solver interface in
16  * KINSOL; these routines now just wrap the updated KINSOL generic
17  * linear solver interface in kinsol_ls.h.
18  *-----------------------------------------------------------------*/
19 
20 #include <kinsol/kinsol_ls.h>
21 #include <kinsol/kinsol_direct.h>
22 
23 #ifdef __cplusplus  /* wrapper to enable C++ usage */
24 extern "C" {
25 #endif
26 
27 /*=================================================================
28   Exported Functions (wrappers for equivalent routines in kinsol_ls.h)
29   =================================================================*/
30 
KINDlsSetLinearSolver(void * kinmem,SUNLinearSolver LS,SUNMatrix A)31 int KINDlsSetLinearSolver(void *kinmem, SUNLinearSolver LS, SUNMatrix A)
32 { return(KINSetLinearSolver(kinmem, LS, A)); }
33 
KINDlsSetJacFn(void * kinmem,KINDlsJacFn jac)34 int KINDlsSetJacFn(void *kinmem, KINDlsJacFn jac)
35 { return(KINSetJacFn(kinmem, jac)); }
36 
KINDlsGetWorkSpace(void * kinmem,long int * lenrw,long int * leniw)37 int KINDlsGetWorkSpace(void *kinmem, long int *lenrw, long int *leniw)
38 { return(KINGetLinWorkSpace(kinmem, lenrw, leniw)); }
39 
KINDlsGetNumJacEvals(void * kinmem,long int * njevals)40 int KINDlsGetNumJacEvals(void *kinmem, long int *njevals)
41 { return(KINGetNumJacEvals(kinmem, njevals)); }
42 
KINDlsGetNumFuncEvals(void * kinmem,long int * nfevals)43 int KINDlsGetNumFuncEvals(void *kinmem, long int *nfevals)
44 { return(KINGetNumLinFuncEvals(kinmem, nfevals)); }
45 
KINDlsGetLastFlag(void * kinmem,long int * flag)46 int KINDlsGetLastFlag(void *kinmem, long int *flag)
47 { return(KINGetLastLinFlag(kinmem, flag)); }
48 
KINDlsGetReturnFlagName(long int flag)49 char *KINDlsGetReturnFlagName(long int flag)
50 { return(KINGetLinReturnFlagName(flag)); }
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56