/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.0
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */

/* ---------------------------------------------------------------
 * Programmer(s): Auto-generated by swig.
 * ---------------------------------------------------------------
 * SUNDIALS Copyright Start
 * Copyright (c) 2002-2024, Lawrence Livermore National Security
 * and Southern Methodist University.
 * All rights reserved.
 *
 * See the top-level LICENSE and NOTICE files for details.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 * SUNDIALS Copyright End
 * -------------------------------------------------------------*/


/* ---------------------------------------------------------------
 * Programmer(s): Auto-generated by swig.
 * ---------------------------------------------------------------
 * SUNDIALS Copyright Start
 * Copyright (c) 2002-2024, Lawrence Livermore National Security
 * and Southern Methodist University.
 * All rights reserved.
 *
 * See the top-level LICENSE and NOTICE files for details.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 * SUNDIALS Copyright End
 * -------------------------------------------------------------*/

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* qualifier for exported *const* global data variables*/
#ifndef SWIGEXTERN
# ifdef __cplusplus
#   define SWIGEXTERN extern
# else
#   define SWIGEXTERN
# endif
#endif

/* exporting methods */
#if defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13




#include <assert.h>
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
 { printf("In " DECL ": " MSG); assert(0); RETURNNULL; }


#include <stdio.h>
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
# ifndef snprintf
#  define snprintf _snprintf
# endif
#endif


/* Support for the `contract` feature.
 *
 * Note that RETURNNULL is first because it's inserted via a 'Replaceall' in
 * the fortran.cxx file.
 */
#define SWIG_contract_assert(RETURNNULL, EXPR, MSG) \
 if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); } 


#define SWIGVERSION 0x040000 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 


#include <stdint.h>


#include "sundials/sundials_types.h"

#ifndef SUNDIALS_DOUBLE_PRECISION
#error "The Fortran bindings are only targeted at double-precision"
#endif


#include "sundials/sundials_context.h"
#include "sundials/sundials_errors.h"
#include "sundials/sundials_profiler.h"


#include <stdlib.h>
#ifdef _MSC_VER
# ifndef strtoull
#  define strtoull _strtoui64
# endif
# ifndef strtoll
#  define strtoll _strtoi64
# endif
#endif


typedef struct {
    void* data;
    size_t size;
} SwigArrayWrapper;


SWIGINTERN SwigArrayWrapper SwigArrayWrapper_uninitialized() {
  SwigArrayWrapper result;
  result.data = NULL;
  result.size = 0;
  return result;
}


#include <string.h>


#include "sundials/sundials_profiler.h"
#if SUNDIALS_MPI_ENABLED
#include <mpi.h>
#endif


#include "sundials/sundials_logger.h"
#if SUNDIALS_MPI_ENABLED
#include <mpi.h>
#endif


#include "sundials/sundials_futils.h"


#include "sundials/sundials_nvector.h"


#include "sundials/sundials_matrix.h"


#include "sundials/sundials_iterative.h"
#include "sundials/sundials_linearsolver.h"


#include "sundials/sundials_nonlinearsolver.h"


#include "sundials/sundials_adaptcontroller.h"

SWIGEXPORT void _wrap_FSUNLogErrHandlerFn(int const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, int const *farg5, void *farg6, void *farg7) {
  int arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  SUNErrCode arg5 ;
  void *arg6 = (void *) 0 ;
  SUNContext arg7 = (SUNContext) 0 ;
  
  arg1 = (int)(*farg1);
  arg2 = (char *)(farg2->data);
  arg3 = (char *)(farg3->data);
  arg4 = (char *)(farg4->data);
  arg5 = (SUNErrCode)(*farg5);
  arg6 = (void *)(farg6);
  arg7 = (SUNContext)(farg7);
  SUNLogErrHandlerFn(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7);
}


SWIGEXPORT void _wrap_FSUNAbortErrHandlerFn(int const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, int const *farg5, void *farg6, void *farg7) {
  int arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  SUNErrCode arg5 ;
  void *arg6 = (void *) 0 ;
  SUNContext arg7 = (SUNContext) 0 ;
  
  arg1 = (int)(*farg1);
  arg2 = (char *)(farg2->data);
  arg3 = (char *)(farg3->data);
  arg4 = (char *)(farg4->data);
  arg5 = (SUNErrCode)(*farg5);
  arg6 = (void *)(farg6);
  arg7 = (SUNContext)(farg7);
  SUNAbortErrHandlerFn(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7);
}


SWIGEXPORT SwigArrayWrapper _wrap_FSUNGetErrMsg(int const *farg1) {
  SwigArrayWrapper fresult ;
  SUNErrCode arg1 ;
  char *result = 0 ;
  
  arg1 = (SUNErrCode)(*farg1);
  result = (char *)SUNGetErrMsg(arg1);
  fresult.size = strlen((const char*)(result));
  fresult.data = (char *)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_Create(int const *farg1, void *farg2) {
  int fresult ;
  SUNComm arg1 ;
  SUNContext *arg2 = (SUNContext *) 0 ;
  SUNErrCode result;
  
#if SUNDIALS_MPI_ENABLED
  int flag = 0;
  MPI_Initialized(&flag);
  if(flag) {
    arg1 = MPI_Comm_f2c((MPI_Fint)(*farg1));
  } else {
    arg1 = SUN_COMM_NULL;
  }
#else
  arg1 = *farg1;
#endif
  arg2 = (SUNContext *)(farg2);
  result = (SUNErrCode)SUNContext_Create(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_GetLastError(void *farg1) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNErrCode)SUNContext_GetLastError(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_PeekLastError(void *farg1) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNErrCode)SUNContext_PeekLastError(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_PushErrHandler(void *farg1, SUNErrHandlerFn farg2, void *farg3) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNErrHandlerFn arg2 = (SUNErrHandlerFn) 0 ;
  void *arg3 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  arg2 = (SUNErrHandlerFn)(farg2);
  arg3 = (void *)(farg3);
  result = (SUNErrCode)SUNContext_PushErrHandler(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_PopErrHandler(void *farg1) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNErrCode)SUNContext_PopErrHandler(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_ClearErrHandlers(void *farg1) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNErrCode)SUNContext_ClearErrHandlers(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_GetProfiler(void *farg1, void *farg2) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNProfiler *arg2 = (SUNProfiler *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  arg2 = (SUNProfiler *)(farg2);
  result = (SUNErrCode)SUNContext_GetProfiler(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_SetProfiler(void *farg1, void *farg2) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNProfiler arg2 = (SUNProfiler) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  arg2 = (SUNProfiler)(farg2);
  result = (SUNErrCode)SUNContext_SetProfiler(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_GetLogger(void *farg1, void *farg2) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNLogger *arg2 = (SUNLogger *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  arg2 = (SUNLogger *)(farg2);
  result = (SUNErrCode)SUNContext_GetLogger(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_SetLogger(void *farg1, void *farg2) {
  int fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNLogger arg2 = (SUNLogger) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext)(farg1);
  arg2 = (SUNLogger)(farg2);
  result = (SUNErrCode)SUNContext_SetLogger(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNContext_Free(void *farg1) {
  int fresult ;
  SUNContext *arg1 = (SUNContext *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNContext *)(farg1);
  result = (SUNErrCode)SUNContext_Free(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_Create(int const *farg1, SwigArrayWrapper *farg2, void *farg3) {
  int fresult ;
  SUNComm arg1 ;
  char *arg2 = (char *) 0 ;
  SUNProfiler *arg3 = (SUNProfiler *) 0 ;
  SUNErrCode result;
  
#if SUNDIALS_MPI_ENABLED
  int flag = 0;
  MPI_Initialized(&flag);
  if(flag) {
    arg1 = MPI_Comm_f2c((MPI_Fint)(*farg1));
  } else {
    arg1 = SUN_COMM_NULL;
  }
#else
  arg1 = *farg1;
#endif
  arg2 = (char *)(farg2->data);
  arg3 = (SUNProfiler *)(farg3);
  result = (SUNErrCode)SUNProfiler_Create(arg1,(char const *)arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_Free(void *farg1) {
  int fresult ;
  SUNProfiler *arg1 = (SUNProfiler *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNProfiler *)(farg1);
  result = (SUNErrCode)SUNProfiler_Free(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_Begin(void *farg1, SwigArrayWrapper *farg2) {
  int fresult ;
  SUNProfiler arg1 = (SUNProfiler) 0 ;
  char *arg2 = (char *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNProfiler)(farg1);
  arg2 = (char *)(farg2->data);
  result = (SUNErrCode)SUNProfiler_Begin(arg1,(char const *)arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_End(void *farg1, SwigArrayWrapper *farg2) {
  int fresult ;
  SUNProfiler arg1 = (SUNProfiler) 0 ;
  char *arg2 = (char *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNProfiler)(farg1);
  arg2 = (char *)(farg2->data);
  result = (SUNErrCode)SUNProfiler_End(arg1,(char const *)arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_GetTimerResolution(void *farg1, double *farg2) {
  int fresult ;
  SUNProfiler arg1 = (SUNProfiler) 0 ;
  double *arg2 = (double *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNProfiler)(farg1);
  arg2 = (double *)(farg2);
  result = (SUNErrCode)SUNProfiler_GetTimerResolution(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_GetElapsedTime(void *farg1, SwigArrayWrapper *farg2, double *farg3) {
  int fresult ;
  SUNProfiler arg1 = (SUNProfiler) 0 ;
  char *arg2 = (char *) 0 ;
  double *arg3 = (double *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNProfiler)(farg1);
  arg2 = (char *)(farg2->data);
  arg3 = (double *)(farg3);
  result = (SUNErrCode)SUNProfiler_GetElapsedTime(arg1,(char const *)arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_Print(void *farg1, void *farg2) {
  int fresult ;
  SUNProfiler arg1 = (SUNProfiler) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNProfiler)(farg1);
  arg2 = (FILE *)(farg2);
  result = (SUNErrCode)SUNProfiler_Print(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNProfiler_Reset(void *farg1) {
  int fresult ;
  SUNProfiler arg1 = (SUNProfiler) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNProfiler)(farg1);
  result = (SUNErrCode)SUNProfiler_Reset(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_Create(int const *farg1, int const *farg2, void *farg3) {
  int fresult ;
  SUNComm arg1 ;
  int arg2 ;
  SUNLogger *arg3 = (SUNLogger *) 0 ;
  SUNErrCode result;
  
#if SUNDIALS_MPI_ENABLED
  int flag = 0;
  MPI_Initialized(&flag);
  if(flag) {
    arg1 = MPI_Comm_f2c((MPI_Fint)(*farg1));
  } else {
    arg1 = SUN_COMM_NULL;
  }
#else
  arg1 = *farg1;
#endif
  arg2 = (int)(*farg2);
  arg3 = (SUNLogger *)(farg3);
  result = (SUNErrCode)SUNLogger_Create(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_CreateFromEnv(int const *farg1, void *farg2) {
  int fresult ;
  SUNComm arg1 ;
  SUNLogger *arg2 = (SUNLogger *) 0 ;
  SUNErrCode result;
  
#if SUNDIALS_MPI_ENABLED
  int flag = 0;
  MPI_Initialized(&flag);
  if(flag) {
    arg1 = MPI_Comm_f2c((MPI_Fint)(*farg1));
  } else {
    arg1 = SUN_COMM_NULL;
  }
#else
  arg1 = *farg1;
#endif
  arg2 = (SUNLogger *)(farg2);
  result = (SUNErrCode)SUNLogger_CreateFromEnv(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_SetErrorFilename(void *farg1, SwigArrayWrapper *farg2) {
  int fresult ;
  SUNLogger arg1 = (SUNLogger) 0 ;
  char *arg2 = (char *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger)(farg1);
  arg2 = (char *)(farg2->data);
  result = (SUNErrCode)SUNLogger_SetErrorFilename(arg1,(char const *)arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_SetWarningFilename(void *farg1, SwigArrayWrapper *farg2) {
  int fresult ;
  SUNLogger arg1 = (SUNLogger) 0 ;
  char *arg2 = (char *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger)(farg1);
  arg2 = (char *)(farg2->data);
  result = (SUNErrCode)SUNLogger_SetWarningFilename(arg1,(char const *)arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_SetDebugFilename(void *farg1, SwigArrayWrapper *farg2) {
  int fresult ;
  SUNLogger arg1 = (SUNLogger) 0 ;
  char *arg2 = (char *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger)(farg1);
  arg2 = (char *)(farg2->data);
  result = (SUNErrCode)SUNLogger_SetDebugFilename(arg1,(char const *)arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_SetInfoFilename(void *farg1, SwigArrayWrapper *farg2) {
  int fresult ;
  SUNLogger arg1 = (SUNLogger) 0 ;
  char *arg2 = (char *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger)(farg1);
  arg2 = (char *)(farg2->data);
  result = (SUNErrCode)SUNLogger_SetInfoFilename(arg1,(char const *)arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_QueueMsg(void *farg1, int const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, SwigArrayWrapper *farg5) {
  int fresult ;
  SUNLogger arg1 = (SUNLogger) 0 ;
  SUNLogLevel arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *arg6 = 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger)(farg1);
  arg2 = (SUNLogLevel)(*farg2);
  arg3 = (char *)(farg3->data);
  arg4 = (char *)(farg4->data);
  arg5 = (char *)(farg5->data);
  result = (SUNErrCode)SUNLogger_QueueMsg(arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_Flush(void *farg1, int const *farg2) {
  int fresult ;
  SUNLogger arg1 = (SUNLogger) 0 ;
  SUNLogLevel arg2 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger)(farg1);
  arg2 = (SUNLogLevel)(*farg2);
  result = (SUNErrCode)SUNLogger_Flush(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_GetOutputRank(void *farg1, int *farg2) {
  int fresult ;
  SUNLogger arg1 = (SUNLogger) 0 ;
  int *arg2 = (int *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger)(farg1);
  arg2 = (int *)(farg2);
  result = (SUNErrCode)SUNLogger_GetOutputRank(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLogger_Destroy(void *farg1) {
  int fresult ;
  SUNLogger *arg1 = (SUNLogger *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLogger *)(farg1);
  result = (SUNErrCode)SUNLogger_Destroy(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNDIALSFileOpen(SwigArrayWrapper *farg1, SwigArrayWrapper *farg2, void *farg3) {
  int fresult ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  FILE **arg3 = (FILE **) 0 ;
  SUNErrCode result;
  
  arg1 = (char *)(farg1->data);
  arg2 = (char *)(farg2->data);
  arg3 = (FILE **)(farg3);
  result = (SUNErrCode)SUNDIALSFileOpen((char const *)arg1,(char const *)arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNDIALSFileClose(void *farg1) {
  int fresult ;
  FILE **arg1 = (FILE **) 0 ;
  SUNErrCode result;
  
  arg1 = (FILE **)(farg1);
  result = (SUNErrCode)SUNDIALSFileClose(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT N_Vector _wrap_FN_VNewEmpty(void *farg1) {
  N_Vector fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  N_Vector result;
  
  arg1 = (SUNContext)(farg1);
  result = (N_Vector)N_VNewEmpty(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FN_VFreeEmpty(N_Vector farg1) {
  N_Vector arg1 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  N_VFreeEmpty(arg1);
}


SWIGEXPORT int _wrap_FN_VCopyOps(N_Vector farg1, N_Vector farg2) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (SUNErrCode)N_VCopyOps(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VGetVectorID(N_Vector farg1) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector_ID result;
  
  arg1 = (N_Vector)(farg1);
  result = (N_Vector_ID)N_VGetVectorID(arg1);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT N_Vector _wrap_FN_VClone(N_Vector farg1) {
  N_Vector fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector result;
  
  arg1 = (N_Vector)(farg1);
  result = (N_Vector)N_VClone(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT N_Vector _wrap_FN_VCloneEmpty(N_Vector farg1) {
  N_Vector fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector result;
  
  arg1 = (N_Vector)(farg1);
  result = (N_Vector)N_VCloneEmpty(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FN_VDestroy(N_Vector farg1) {
  N_Vector arg1 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  N_VDestroy(arg1);
}


SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, int64_t *farg2, int64_t *farg3) {
  N_Vector arg1 = (N_Vector) 0 ;
  sunindextype *arg2 = (sunindextype *) 0 ;
  sunindextype *arg3 = (sunindextype *) 0 ;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (sunindextype *)(farg2);
  arg3 = (sunindextype *)(farg3);
  N_VSpace(arg1,arg2,arg3);
}


SWIGEXPORT void _wrap_FN_VSetArrayPointer(double *farg1, N_Vector farg2) {
  sunrealtype *arg1 = (sunrealtype *) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  
  arg1 = (sunrealtype *)(farg1);
  arg2 = (N_Vector)(farg2);
  N_VSetArrayPointer(arg1,arg2);
}


SWIGEXPORT int _wrap_FN_VGetCommunicator(N_Vector farg1) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  SUNComm result;
  
  arg1 = (N_Vector)(farg1);
  result = (SUNComm)N_VGetCommunicator(arg1);
#if SUNDIALS_MPI_ENABLED
  int flag = 0;
  MPI_Initialized(&flag);
  if(flag) {
    fresult = (int)(MPI_Comm_c2f(result));
  } else {
    fresult = 0;
  }
#else
  fresult = result;
#endif
  return fresult;
}


SWIGEXPORT int64_t _wrap_FN_VGetLength(N_Vector farg1) {
  int64_t fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunindextype result;
  
  arg1 = (N_Vector)(farg1);
  result = N_VGetLength(arg1);
  fresult = (sunindextype)(result);
  return fresult;
}


SWIGEXPORT int64_t _wrap_FN_VGetLocalLength(N_Vector farg1) {
  int64_t fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunindextype result;
  
  arg1 = (N_Vector)(farg1);
  result = N_VGetLocalLength(arg1);
  fresult = (sunindextype)(result);
  return fresult;
}


SWIGEXPORT void _wrap_FN_VLinearSum(double const *farg1, N_Vector farg2, double const *farg3, N_Vector farg4, N_Vector farg5) {
  sunrealtype arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype arg3 ;
  N_Vector arg4 = (N_Vector) 0 ;
  N_Vector arg5 = (N_Vector) 0 ;
  
  arg1 = (sunrealtype)(*farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (sunrealtype)(*farg3);
  arg4 = (N_Vector)(farg4);
  arg5 = (N_Vector)(farg5);
  N_VLinearSum(arg1,arg2,arg3,arg4,arg5);
}


SWIGEXPORT void _wrap_FN_VConst(double const *farg1, N_Vector farg2) {
  sunrealtype arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  
  arg1 = (sunrealtype)(*farg1);
  arg2 = (N_Vector)(farg2);
  N_VConst(arg1,arg2);
}


SWIGEXPORT void _wrap_FN_VProd(N_Vector farg1, N_Vector farg2, N_Vector farg3) {
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  N_VProd(arg1,arg2,arg3);
}


SWIGEXPORT void _wrap_FN_VDiv(N_Vector farg1, N_Vector farg2, N_Vector farg3) {
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  N_VDiv(arg1,arg2,arg3);
}


SWIGEXPORT void _wrap_FN_VScale(double const *farg1, N_Vector farg2, N_Vector farg3) {
  sunrealtype arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  
  arg1 = (sunrealtype)(*farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  N_VScale(arg1,arg2,arg3);
}


SWIGEXPORT void _wrap_FN_VAbs(N_Vector farg1, N_Vector farg2) {
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  N_VAbs(arg1,arg2);
}


SWIGEXPORT void _wrap_FN_VInv(N_Vector farg1, N_Vector farg2) {
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  N_VInv(arg1,arg2);
}


SWIGEXPORT void _wrap_FN_VAddConst(N_Vector farg1, double const *farg2, N_Vector farg3) {
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype arg2 ;
  N_Vector arg3 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (sunrealtype)(*farg2);
  arg3 = (N_Vector)(farg3);
  N_VAddConst(arg1,arg2,arg3);
}


SWIGEXPORT double _wrap_FN_VDotProd(N_Vector farg1, N_Vector farg2) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (sunrealtype)N_VDotProd(arg1,arg2);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VMaxNorm(N_Vector farg1) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype)N_VMaxNorm(arg1);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VWrmsNorm(N_Vector farg1, N_Vector farg2) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (sunrealtype)N_VWrmsNorm(arg1,arg2);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VWrmsNormMask(N_Vector farg1, N_Vector farg2, N_Vector farg3) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  result = (sunrealtype)N_VWrmsNormMask(arg1,arg2,arg3);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VMin(N_Vector farg1) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype)N_VMin(arg1);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VWL2Norm(N_Vector farg1, N_Vector farg2) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (sunrealtype)N_VWL2Norm(arg1,arg2);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VL1Norm(N_Vector farg1) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype)N_VL1Norm(arg1);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT void _wrap_FN_VCompare(double const *farg1, N_Vector farg2, N_Vector farg3) {
  sunrealtype arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  
  arg1 = (sunrealtype)(*farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  N_VCompare(arg1,arg2,arg3);
}


SWIGEXPORT int _wrap_FN_VInvTest(N_Vector farg1, N_Vector farg2) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  int result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (int)N_VInvTest(arg1,arg2);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VConstrMask(N_Vector farg1, N_Vector farg2, N_Vector farg3) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  result = (int)N_VConstrMask(arg1,arg2,arg3);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VMinQuotient(N_Vector farg1, N_Vector farg2) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (sunrealtype)N_VMinQuotient(arg1,arg2);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VLinearCombination(int const *farg1, double *farg2, void *farg3, N_Vector farg4) {
  int fresult ;
  int arg1 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  N_Vector arg4 = (N_Vector) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector *)(farg3);
  arg4 = (N_Vector)(farg4);
  result = (SUNErrCode)N_VLinearCombination(arg1,arg2,arg3,arg4);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VScaleAddMulti(int const *farg1, double *farg2, N_Vector farg3, void *farg4, void *farg5) {
  int fresult ;
  int arg1 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  N_Vector *arg4 = (N_Vector *) 0 ;
  N_Vector *arg5 = (N_Vector *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (N_Vector *)(farg4);
  arg5 = (N_Vector *)(farg5);
  result = (SUNErrCode)N_VScaleAddMulti(arg1,arg2,arg3,arg4,arg5);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VDotProdMulti(int const *farg1, N_Vector farg2, void *farg3, double *farg4) {
  int fresult ;
  int arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  sunrealtype *arg4 = (sunrealtype *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector *)(farg3);
  arg4 = (sunrealtype *)(farg4);
  result = (SUNErrCode)N_VDotProdMulti(arg1,arg2,arg3,arg4);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VLinearSumVectorArray(int const *farg1, double const *farg2, void *farg3, double const *farg4, void *farg5, void *farg6) {
  int fresult ;
  int arg1 ;
  sunrealtype arg2 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  sunrealtype arg4 ;
  N_Vector *arg5 = (N_Vector *) 0 ;
  N_Vector *arg6 = (N_Vector *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (sunrealtype)(*farg2);
  arg3 = (N_Vector *)(farg3);
  arg4 = (sunrealtype)(*farg4);
  arg5 = (N_Vector *)(farg5);
  arg6 = (N_Vector *)(farg6);
  result = (SUNErrCode)N_VLinearSumVectorArray(arg1,arg2,arg3,arg4,arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VScaleVectorArray(int const *farg1, double *farg2, void *farg3, void *farg4) {
  int fresult ;
  int arg1 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  N_Vector *arg4 = (N_Vector *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector *)(farg3);
  arg4 = (N_Vector *)(farg4);
  result = (SUNErrCode)N_VScaleVectorArray(arg1,arg2,arg3,arg4);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VConstVectorArray(int const *farg1, double const *farg2, void *farg3) {
  int fresult ;
  int arg1 ;
  sunrealtype arg2 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (sunrealtype)(*farg2);
  arg3 = (N_Vector *)(farg3);
  result = (SUNErrCode)N_VConstVectorArray(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VWrmsNormVectorArray(int const *farg1, void *farg2, void *farg3, double *farg4) {
  int fresult ;
  int arg1 ;
  N_Vector *arg2 = (N_Vector *) 0 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  sunrealtype *arg4 = (sunrealtype *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (N_Vector *)(farg2);
  arg3 = (N_Vector *)(farg3);
  arg4 = (sunrealtype *)(farg4);
  result = (SUNErrCode)N_VWrmsNormVectorArray(arg1,arg2,arg3,arg4);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VWrmsNormMaskVectorArray(int const *farg1, void *farg2, void *farg3, N_Vector farg4, double *farg5) {
  int fresult ;
  int arg1 ;
  N_Vector *arg2 = (N_Vector *) 0 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  N_Vector arg4 = (N_Vector) 0 ;
  sunrealtype *arg5 = (sunrealtype *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (N_Vector *)(farg2);
  arg3 = (N_Vector *)(farg3);
  arg4 = (N_Vector)(farg4);
  arg5 = (sunrealtype *)(farg5);
  result = (SUNErrCode)N_VWrmsNormMaskVectorArray(arg1,arg2,arg3,arg4,arg5);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VDotProdLocal(N_Vector farg1, N_Vector farg2) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (sunrealtype)N_VDotProdLocal(arg1,arg2);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VMaxNormLocal(N_Vector farg1) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype)N_VMaxNormLocal(arg1);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VMinLocal(N_Vector farg1) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype)N_VMinLocal(arg1);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VL1NormLocal(N_Vector farg1) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype)N_VL1NormLocal(arg1);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VWSqrSumLocal(N_Vector farg1, N_Vector farg2) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (sunrealtype)N_VWSqrSumLocal(arg1,arg2);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VWSqrSumMaskLocal(N_Vector farg1, N_Vector farg2, N_Vector farg3) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  result = (sunrealtype)N_VWSqrSumMaskLocal(arg1,arg2,arg3);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VInvTestLocal(N_Vector farg1, N_Vector farg2) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  int result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (int)N_VInvTestLocal(arg1,arg2);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VConstrMaskLocal(N_Vector farg1, N_Vector farg2, N_Vector farg3) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  result = (int)N_VConstrMaskLocal(arg1,arg2,arg3);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FN_VMinQuotientLocal(N_Vector farg1, N_Vector farg2) {
  double fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (N_Vector)(farg2);
  result = (sunrealtype)N_VMinQuotientLocal(arg1,arg2);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VDotProdMultiLocal(int const *farg1, N_Vector farg2, void *farg3, double *farg4) {
  int fresult ;
  int arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector *arg3 = (N_Vector *) 0 ;
  sunrealtype *arg4 = (sunrealtype *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector *)(farg3);
  arg4 = (sunrealtype *)(farg4);
  result = (SUNErrCode)N_VDotProdMultiLocal(arg1,arg2,arg3,arg4);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VDotProdMultiAllReduce(int const *farg1, N_Vector farg2, double *farg3) {
  int fresult ;
  int arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  sunrealtype *arg3 = (sunrealtype *) 0 ;
  SUNErrCode result;
  
  arg1 = (int)(*farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (sunrealtype *)(farg3);
  result = (SUNErrCode)N_VDotProdMultiAllReduce(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VBufSize(N_Vector farg1, int64_t *farg2) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunindextype *arg2 = (sunindextype *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (sunindextype *)(farg2);
  result = (SUNErrCode)N_VBufSize(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VBufPack(N_Vector farg1, void *farg2) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  void *arg2 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (void *)(farg2);
  result = (SUNErrCode)N_VBufPack(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FN_VBufUnpack(N_Vector farg1, void *farg2) {
  int fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  void *arg2 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (void *)(farg2);
  result = (SUNErrCode)N_VBufUnpack(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT void * _wrap_FN_VNewVectorArray(int const *farg1, void *farg2) {
  void * fresult ;
  int arg1 ;
  SUNContext arg2 = (SUNContext) 0 ;
  N_Vector *result = 0 ;
  
  arg1 = (int)(*farg1);
  arg2 = (SUNContext)(farg2);
  result = (N_Vector *)N_VNewVectorArray(arg1,arg2);
  fresult = result;
  return fresult;
}


SWIGEXPORT void * _wrap_FN_VCloneEmptyVectorArray(int const *farg1, N_Vector farg2) {
  void * fresult ;
  int arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector *result = 0 ;
  
  arg1 = (int)(*farg1);
  arg2 = (N_Vector)(farg2);
  result = (N_Vector *)N_VCloneEmptyVectorArray(arg1,arg2);
  fresult = result;
  return fresult;
}


SWIGEXPORT void * _wrap_FN_VCloneVectorArray(int const *farg1, N_Vector farg2) {
  void * fresult ;
  int arg1 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector *result = 0 ;
  
  arg1 = (int)(*farg1);
  arg2 = (N_Vector)(farg2);
  result = (N_Vector *)N_VCloneVectorArray(arg1,arg2);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FN_VDestroyVectorArray(void *farg1, int const *farg2) {
  N_Vector *arg1 = (N_Vector *) 0 ;
  int arg2 ;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (int)(*farg2);
  N_VDestroyVectorArray(arg1,arg2);
}


SWIGEXPORT N_Vector _wrap_FN_VGetVecAtIndexVectorArray(void *farg1, int const *farg2) {
  N_Vector fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  int arg2 ;
  N_Vector result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (int)(*farg2);
  result = (N_Vector)N_VGetVecAtIndexVectorArray(arg1,arg2);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FN_VSetVecAtIndexVectorArray(void *farg1, int const *farg2, N_Vector farg3) {
  N_Vector *arg1 = (N_Vector *) 0 ;
  int arg2 ;
  N_Vector arg3 = (N_Vector) 0 ;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (int)(*farg2);
  arg3 = (N_Vector)(farg3);
  N_VSetVecAtIndexVectorArray(arg1,arg2,arg3);
}


SWIGEXPORT void _wrap_FN_VPrint(N_Vector farg1) {
  N_Vector arg1 = (N_Vector) 0 ;
  
  arg1 = (N_Vector)(farg1);
  N_VPrint(arg1);
}


SWIGEXPORT void _wrap_FN_VPrintFile(N_Vector farg1, void *farg2) {
  N_Vector arg1 = (N_Vector) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  
  arg1 = (N_Vector)(farg1);
  arg2 = (FILE *)(farg2);
  N_VPrintFile(arg1,arg2);
}



SWIGEXPORT double * _wrap_FN_VGetArrayPointer(N_Vector farg1) {
  double * fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype *result = 0 ;
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype *)N_VGetArrayPointer(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT double * _wrap_FN_VGetDeviceArrayPointer(N_Vector farg1) {
  double * fresult ;
  N_Vector arg1 = (N_Vector) 0 ;
  sunrealtype *result = 0 ;
  arg1 = (N_Vector)(farg1);
  result = (sunrealtype *)N_VGetDeviceArrayPointer(arg1);
  fresult = result;
  return fresult;
}

SWIGEXPORT SUNMatrix _wrap_FSUNMatNewEmpty(void *farg1) {
  SUNMatrix fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNMatrix result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNMatrix)SUNMatNewEmpty(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FSUNMatFreeEmpty(SUNMatrix farg1) {
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  
  arg1 = (SUNMatrix)(farg1);
  SUNMatFreeEmpty(arg1);
}


SWIGEXPORT int _wrap_FSUNMatCopyOps(SUNMatrix farg1, SUNMatrix farg2) {
  int fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  SUNMatrix arg2 = (SUNMatrix) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNMatrix)(farg1);
  arg2 = (SUNMatrix)(farg2);
  result = (SUNErrCode)SUNMatCopyOps(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNMatGetID(SUNMatrix farg1) {
  int fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  SUNMatrix_ID result;
  
  arg1 = (SUNMatrix)(farg1);
  result = (SUNMatrix_ID)SUNMatGetID(arg1);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT SUNMatrix _wrap_FSUNMatClone(SUNMatrix farg1) {
  SUNMatrix fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  SUNMatrix result;
  
  arg1 = (SUNMatrix)(farg1);
  result = (SUNMatrix)SUNMatClone(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FSUNMatDestroy(SUNMatrix farg1) {
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  
  arg1 = (SUNMatrix)(farg1);
  SUNMatDestroy(arg1);
}


SWIGEXPORT int _wrap_FSUNMatZero(SUNMatrix farg1) {
  int fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNMatrix)(farg1);
  result = (SUNErrCode)SUNMatZero(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNMatCopy(SUNMatrix farg1, SUNMatrix farg2) {
  int fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  SUNMatrix arg2 = (SUNMatrix) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNMatrix)(farg1);
  arg2 = (SUNMatrix)(farg2);
  result = (SUNErrCode)SUNMatCopy(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNMatScaleAdd(double const *farg1, SUNMatrix farg2, SUNMatrix farg3) {
  int fresult ;
  sunrealtype arg1 ;
  SUNMatrix arg2 = (SUNMatrix) 0 ;
  SUNMatrix arg3 = (SUNMatrix) 0 ;
  SUNErrCode result;
  
  arg1 = (sunrealtype)(*farg1);
  arg2 = (SUNMatrix)(farg2);
  arg3 = (SUNMatrix)(farg3);
  result = (SUNErrCode)SUNMatScaleAdd(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNMatScaleAddI(double const *farg1, SUNMatrix farg2) {
  int fresult ;
  sunrealtype arg1 ;
  SUNMatrix arg2 = (SUNMatrix) 0 ;
  SUNErrCode result;
  
  arg1 = (sunrealtype)(*farg1);
  arg2 = (SUNMatrix)(farg2);
  result = (SUNErrCode)SUNMatScaleAddI(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNMatMatvecSetup(SUNMatrix farg1) {
  int fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNMatrix)(farg1);
  result = (SUNErrCode)SUNMatMatvecSetup(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNMatMatvec(SUNMatrix farg1, N_Vector farg2, N_Vector farg3) {
  int fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNMatrix)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  result = (SUNErrCode)SUNMatMatvec(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNMatSpace(SUNMatrix farg1, long *farg2, long *farg3) {
  int fresult ;
  SUNMatrix arg1 = (SUNMatrix) 0 ;
  long *arg2 = (long *) 0 ;
  long *arg3 = (long *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNMatrix)(farg1);
  arg2 = (long *)(farg2);
  arg3 = (long *)(farg3);
  result = (SUNErrCode)SUNMatSpace(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNModifiedGS(void *farg1, void *farg2, int const *farg3, int const *farg4, double *farg5) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype **arg2 = (sunrealtype **) 0 ;
  int arg3 ;
  int arg4 ;
  sunrealtype *arg5 = (sunrealtype *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype **)(farg2);
  arg3 = (int)(*farg3);
  arg4 = (int)(*farg4);
  arg5 = (sunrealtype *)(farg5);
  result = (SUNErrCode)SUNModifiedGS(arg1,arg2,arg3,arg4,arg5);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNClassicalGS(void *farg1, void *farg2, int const *farg3, int const *farg4, double *farg5, double *farg6, void *farg7) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype **arg2 = (sunrealtype **) 0 ;
  int arg3 ;
  int arg4 ;
  sunrealtype *arg5 = (sunrealtype *) 0 ;
  sunrealtype *arg6 = (sunrealtype *) 0 ;
  N_Vector *arg7 = (N_Vector *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype **)(farg2);
  arg3 = (int)(*farg3);
  arg4 = (int)(*farg4);
  arg5 = (sunrealtype *)(farg5);
  arg6 = (sunrealtype *)(farg6);
  arg7 = (N_Vector *)(farg7);
  result = (SUNErrCode)SUNClassicalGS(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRfact(int const *farg1, void *farg2, double *farg3, int const *farg4) {
  int fresult ;
  int arg1 ;
  sunrealtype **arg2 = (sunrealtype **) 0 ;
  sunrealtype *arg3 = (sunrealtype *) 0 ;
  int arg4 ;
  int result;
  
  arg1 = (int)(*farg1);
  arg2 = (sunrealtype **)(farg2);
  arg3 = (sunrealtype *)(farg3);
  arg4 = (int)(*farg4);
  result = (int)SUNQRfact(arg1,arg2,arg3,arg4);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRsol(int const *farg1, void *farg2, double *farg3, double *farg4) {
  int fresult ;
  int arg1 ;
  sunrealtype **arg2 = (sunrealtype **) 0 ;
  sunrealtype *arg3 = (sunrealtype *) 0 ;
  sunrealtype *arg4 = (sunrealtype *) 0 ;
  int result;
  
  arg1 = (int)(*farg1);
  arg2 = (sunrealtype **)(farg2);
  arg3 = (sunrealtype *)(farg3);
  arg4 = (sunrealtype *)(farg4);
  result = (int)SUNQRsol(arg1,arg2,arg3,arg4);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRAdd_MGS(void *farg1, double *farg2, N_Vector farg3, int const *farg4, int const *farg5, void *farg6) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (int)(*farg4);
  arg5 = (int)(*farg5);
  arg6 = (void *)(farg6);
  result = (SUNErrCode)SUNQRAdd_MGS(arg1,arg2,arg3,arg4,arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRAdd_ICWY(void *farg1, double *farg2, N_Vector farg3, int const *farg4, int const *farg5, void *farg6) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (int)(*farg4);
  arg5 = (int)(*farg5);
  arg6 = (void *)(farg6);
  result = (SUNErrCode)SUNQRAdd_ICWY(arg1,arg2,arg3,arg4,arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRAdd_ICWY_SB(void *farg1, double *farg2, N_Vector farg3, int const *farg4, int const *farg5, void *farg6) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (int)(*farg4);
  arg5 = (int)(*farg5);
  arg6 = (void *)(farg6);
  result = (SUNErrCode)SUNQRAdd_ICWY_SB(arg1,arg2,arg3,arg4,arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRAdd_CGS2(void *farg1, double *farg2, N_Vector farg3, int const *farg4, int const *farg5, void *farg6) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (int)(*farg4);
  arg5 = (int)(*farg5);
  arg6 = (void *)(farg6);
  result = (SUNErrCode)SUNQRAdd_CGS2(arg1,arg2,arg3,arg4,arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRAdd_DCGS2(void *farg1, double *farg2, N_Vector farg3, int const *farg4, int const *farg5, void *farg6) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (int)(*farg4);
  arg5 = (int)(*farg5);
  arg6 = (void *)(farg6);
  result = (SUNErrCode)SUNQRAdd_DCGS2(arg1,arg2,arg3,arg4,arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNQRAdd_DCGS2_SB(void *farg1, double *farg2, N_Vector farg3, int const *farg4, int const *farg5, void *farg6) {
  int fresult ;
  N_Vector *arg1 = (N_Vector *) 0 ;
  sunrealtype *arg2 = (sunrealtype *) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (N_Vector *)(farg1);
  arg2 = (sunrealtype *)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (int)(*farg4);
  arg5 = (int)(*farg5);
  arg6 = (void *)(farg6);
  result = (SUNErrCode)SUNQRAdd_DCGS2_SB(arg1,arg2,arg3,arg4,arg5,arg6);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT SUNLinearSolver _wrap_FSUNLinSolNewEmpty(void *farg1) {
  SUNLinearSolver fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNLinearSolver result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNLinearSolver)SUNLinSolNewEmpty(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FSUNLinSolFreeEmpty(SUNLinearSolver farg1) {
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  
  arg1 = (SUNLinearSolver)(farg1);
  SUNLinSolFreeEmpty(arg1);
}


SWIGEXPORT int _wrap_FSUNLinSolGetType(SUNLinearSolver farg1) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  SUNLinearSolver_Type result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = (SUNLinearSolver_Type)SUNLinSolGetType(arg1);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolGetID(SUNLinearSolver farg1) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  SUNLinearSolver_ID result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = (SUNLinearSolver_ID)SUNLinSolGetID(arg1);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolSetATimes(SUNLinearSolver farg1, void *farg2, SUNATimesFn farg3) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  void *arg2 = (void *) 0 ;
  SUNATimesFn arg3 = (SUNATimesFn) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLinearSolver)(farg1);
  arg2 = (void *)(farg2);
  arg3 = (SUNATimesFn)(farg3);
  result = (SUNErrCode)SUNLinSolSetATimes(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolSetPreconditioner(SUNLinearSolver farg1, void *farg2, SUNPSetupFn farg3, SUNPSolveFn farg4) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  void *arg2 = (void *) 0 ;
  SUNPSetupFn arg3 = (SUNPSetupFn) 0 ;
  SUNPSolveFn arg4 = (SUNPSolveFn) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLinearSolver)(farg1);
  arg2 = (void *)(farg2);
  arg3 = (SUNPSetupFn)(farg3);
  arg4 = (SUNPSolveFn)(farg4);
  result = (SUNErrCode)SUNLinSolSetPreconditioner(arg1,arg2,arg3,arg4);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolSetScalingVectors(SUNLinearSolver farg1, N_Vector farg2, N_Vector farg3) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLinearSolver)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  result = (SUNErrCode)SUNLinSolSetScalingVectors(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolSetZeroGuess(SUNLinearSolver farg1, int const *farg2) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  int arg2 ;
  SUNErrCode result;
  
  arg1 = (SUNLinearSolver)(farg1);
  arg2 = (int)(*farg2);
  result = (SUNErrCode)SUNLinSolSetZeroGuess(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolInitialize(SUNLinearSolver farg1) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = (SUNErrCode)SUNLinSolInitialize(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolSetup(SUNLinearSolver farg1, SUNMatrix farg2) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  SUNMatrix arg2 = (SUNMatrix) 0 ;
  int result;
  
  arg1 = (SUNLinearSolver)(farg1);
  arg2 = (SUNMatrix)(farg2);
  result = (int)SUNLinSolSetup(arg1,arg2);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolSolve(SUNLinearSolver farg1, SUNMatrix farg2, N_Vector farg3, N_Vector farg4, double const *farg5) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  SUNMatrix arg2 = (SUNMatrix) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  N_Vector arg4 = (N_Vector) 0 ;
  sunrealtype arg5 ;
  int result;
  
  arg1 = (SUNLinearSolver)(farg1);
  arg2 = (SUNMatrix)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (N_Vector)(farg4);
  arg5 = (sunrealtype)(*farg5);
  result = (int)SUNLinSolSolve(arg1,arg2,arg3,arg4,arg5);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolNumIters(SUNLinearSolver farg1) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  int result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = (int)SUNLinSolNumIters(arg1);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT double _wrap_FSUNLinSolResNorm(SUNLinearSolver farg1) {
  double fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  sunrealtype result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = (sunrealtype)SUNLinSolResNorm(arg1);
  fresult = (sunrealtype)(result);
  return fresult;
}


SWIGEXPORT N_Vector _wrap_FSUNLinSolResid(SUNLinearSolver farg1) {
  N_Vector fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  N_Vector result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = (N_Vector)SUNLinSolResid(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT int64_t _wrap_FSUNLinSolLastFlag(SUNLinearSolver farg1) {
  int64_t fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  sunindextype result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = SUNLinSolLastFlag(arg1);
  fresult = (sunindextype)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolSpace(SUNLinearSolver farg1, long *farg2, long *farg3) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  long *arg2 = (long *) 0 ;
  long *arg3 = (long *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLinearSolver)(farg1);
  arg2 = (long *)(farg2);
  arg3 = (long *)(farg3);
  result = (SUNErrCode)SUNLinSolSpace(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNLinSolFree(SUNLinearSolver farg1) {
  int fresult ;
  SUNLinearSolver arg1 = (SUNLinearSolver) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNLinearSolver)(farg1);
  result = (SUNErrCode)SUNLinSolFree(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT SUNNonlinearSolver _wrap_FSUNNonlinSolNewEmpty(void *farg1) {
  SUNNonlinearSolver fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNNonlinearSolver result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNNonlinearSolver)SUNNonlinSolNewEmpty(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FSUNNonlinSolFreeEmpty(SUNNonlinearSolver farg1) {
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  SUNNonlinSolFreeEmpty(arg1);
}


SWIGEXPORT int _wrap_FSUNNonlinSolGetType(SUNNonlinearSolver farg1) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  SUNNonlinearSolver_Type result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  result = (SUNNonlinearSolver_Type)SUNNonlinSolGetType(arg1);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolInitialize(SUNNonlinearSolver farg1) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  result = (SUNErrCode)SUNNonlinSolInitialize(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolSetup(SUNNonlinearSolver farg1, N_Vector farg2, void *farg3) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  void *arg3 = (void *) 0 ;
  int result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (void *)(farg3);
  result = (int)SUNNonlinSolSetup(arg1,arg2,arg3);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolSolve(SUNNonlinearSolver farg1, N_Vector farg2, N_Vector farg3, N_Vector farg4, double const *farg5, int const *farg6, void *farg7) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  N_Vector arg2 = (N_Vector) 0 ;
  N_Vector arg3 = (N_Vector) 0 ;
  N_Vector arg4 = (N_Vector) 0 ;
  sunrealtype arg5 ;
  int arg6 ;
  void *arg7 = (void *) 0 ;
  int result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (N_Vector)(farg2);
  arg3 = (N_Vector)(farg3);
  arg4 = (N_Vector)(farg4);
  arg5 = (sunrealtype)(*farg5);
  arg6 = (int)(*farg6);
  arg7 = (void *)(farg7);
  result = (int)SUNNonlinSolSolve(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolFree(SUNNonlinearSolver farg1) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  result = (SUNErrCode)SUNNonlinSolFree(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolSetSysFn(SUNNonlinearSolver farg1, SUNNonlinSolSysFn farg2) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  SUNNonlinSolSysFn arg2 = (SUNNonlinSolSysFn) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (SUNNonlinSolSysFn)(farg2);
  result = (SUNErrCode)SUNNonlinSolSetSysFn(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolSetLSetupFn(SUNNonlinearSolver farg1, SUNNonlinSolLSetupFn farg2) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  SUNNonlinSolLSetupFn arg2 = (SUNNonlinSolLSetupFn) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (SUNNonlinSolLSetupFn)(farg2);
  result = (SUNErrCode)SUNNonlinSolSetLSetupFn(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolSetLSolveFn(SUNNonlinearSolver farg1, SUNNonlinSolLSolveFn farg2) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  SUNNonlinSolLSolveFn arg2 = (SUNNonlinSolLSolveFn) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (SUNNonlinSolLSolveFn)(farg2);
  result = (SUNErrCode)SUNNonlinSolSetLSolveFn(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolSetConvTestFn(SUNNonlinearSolver farg1, SUNNonlinSolConvTestFn farg2, void *farg3) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  SUNNonlinSolConvTestFn arg2 = (SUNNonlinSolConvTestFn) 0 ;
  void *arg3 = (void *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (SUNNonlinSolConvTestFn)(farg2);
  arg3 = (void *)(farg3);
  result = (SUNErrCode)SUNNonlinSolSetConvTestFn(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolSetMaxIters(SUNNonlinearSolver farg1, int const *farg2) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  int arg2 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (int)(*farg2);
  result = (SUNErrCode)SUNNonlinSolSetMaxIters(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolGetNumIters(SUNNonlinearSolver farg1, long *farg2) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  long *arg2 = (long *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (long *)(farg2);
  result = (SUNErrCode)SUNNonlinSolGetNumIters(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolGetCurIter(SUNNonlinearSolver farg1, int *farg2) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  int *arg2 = (int *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (int *)(farg2);
  result = (SUNErrCode)SUNNonlinSolGetCurIter(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNNonlinSolGetNumConvFails(SUNNonlinearSolver farg1, long *farg2) {
  int fresult ;
  SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
  long *arg2 = (long *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNNonlinearSolver)(farg1);
  arg2 = (long *)(farg2);
  result = (SUNErrCode)SUNNonlinSolGetNumConvFails(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT SUNAdaptController _wrap_FSUNAdaptController_NewEmpty(void *farg1) {
  SUNAdaptController fresult ;
  SUNContext arg1 = (SUNContext) 0 ;
  SUNAdaptController result;
  
  arg1 = (SUNContext)(farg1);
  result = (SUNAdaptController)SUNAdaptController_NewEmpty(arg1);
  fresult = result;
  return fresult;
}


SWIGEXPORT void _wrap_FSUNAdaptController_DestroyEmpty(SUNAdaptController farg1) {
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  
  arg1 = (SUNAdaptController)(farg1);
  SUNAdaptController_DestroyEmpty(arg1);
}


SWIGEXPORT int _wrap_FSUNAdaptController_GetType(SUNAdaptController farg1) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  SUNAdaptController_Type result;
  
  arg1 = (SUNAdaptController)(farg1);
  result = (SUNAdaptController_Type)SUNAdaptController_GetType(arg1);
  fresult = (int)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_Destroy(SUNAdaptController farg1) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  result = (SUNErrCode)SUNAdaptController_Destroy(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_EstimateStep(SUNAdaptController farg1, double const *farg2, int const *farg3, double const *farg4, double *farg5) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  sunrealtype arg2 ;
  int arg3 ;
  sunrealtype arg4 ;
  sunrealtype *arg5 = (sunrealtype *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  arg2 = (sunrealtype)(*farg2);
  arg3 = (int)(*farg3);
  arg4 = (sunrealtype)(*farg4);
  arg5 = (sunrealtype *)(farg5);
  result = (SUNErrCode)SUNAdaptController_EstimateStep(arg1,arg2,arg3,arg4,arg5);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_Reset(SUNAdaptController farg1) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  result = (SUNErrCode)SUNAdaptController_Reset(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_SetDefaults(SUNAdaptController farg1) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  result = (SUNErrCode)SUNAdaptController_SetDefaults(arg1);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_Write(SUNAdaptController farg1, void *farg2) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  arg2 = (FILE *)(farg2);
  result = (SUNErrCode)SUNAdaptController_Write(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_SetErrorBias(SUNAdaptController farg1, double const *farg2) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  sunrealtype arg2 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  arg2 = (sunrealtype)(*farg2);
  result = (SUNErrCode)SUNAdaptController_SetErrorBias(arg1,arg2);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_UpdateH(SUNAdaptController farg1, double const *farg2, double const *farg3) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  sunrealtype arg2 ;
  sunrealtype arg3 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  arg2 = (sunrealtype)(*farg2);
  arg3 = (sunrealtype)(*farg3);
  result = (SUNErrCode)SUNAdaptController_UpdateH(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}


SWIGEXPORT int _wrap_FSUNAdaptController_Space(SUNAdaptController farg1, long *farg2, long *farg3) {
  int fresult ;
  SUNAdaptController arg1 = (SUNAdaptController) 0 ;
  long *arg2 = (long *) 0 ;
  long *arg3 = (long *) 0 ;
  SUNErrCode result;
  
  arg1 = (SUNAdaptController)(farg1);
  arg2 = (long *)(farg2);
  arg3 = (long *)(farg3);
  result = (SUNErrCode)SUNAdaptController_Space(arg1,arg2,arg3);
  fresult = (SUNErrCode)(result);
  return fresult;
}



