1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.0
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11 /* ---------------------------------------------------------------
12 * Programmer(s): Auto-generated by swig.
13 * ---------------------------------------------------------------
14 * SUNDIALS Copyright Start
15 * Copyright (c) 2002-2021, Lawrence Livermore National Security
16 * and Southern Methodist University.
17 * All rights reserved.
18 *
19 * See the top-level LICENSE and NOTICE files for details.
20 *
21 * SPDX-License-Identifier: BSD-3-Clause
22 * SUNDIALS Copyright End
23 * -------------------------------------------------------------*/
24
25 /* -----------------------------------------------------------------------------
26 * This section contains generic SWIG labels for method/variable
27 * declarations/attributes, and other compiler dependent labels.
28 * ----------------------------------------------------------------------------- */
29
30 /* template workaround for compilers that cannot correctly implement the C++ standard */
31 #ifndef SWIGTEMPLATEDISAMBIGUATOR
32 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
33 # define SWIGTEMPLATEDISAMBIGUATOR template
34 # elif defined(__HP_aCC)
35 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
36 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
37 # define SWIGTEMPLATEDISAMBIGUATOR template
38 # else
39 # define SWIGTEMPLATEDISAMBIGUATOR
40 # endif
41 #endif
42
43 /* inline attribute */
44 #ifndef SWIGINLINE
45 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
46 # define SWIGINLINE inline
47 # else
48 # define SWIGINLINE
49 # endif
50 #endif
51
52 /* attribute recognised by some compilers to avoid 'unused' warnings */
53 #ifndef SWIGUNUSED
54 # if defined(__GNUC__)
55 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
56 # define SWIGUNUSED __attribute__ ((__unused__))
57 # else
58 # define SWIGUNUSED
59 # endif
60 # elif defined(__ICC)
61 # define SWIGUNUSED __attribute__ ((__unused__))
62 # else
63 # define SWIGUNUSED
64 # endif
65 #endif
66
67 #ifndef SWIG_MSC_UNSUPPRESS_4505
68 # if defined(_MSC_VER)
69 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
70 # endif
71 #endif
72
73 #ifndef SWIGUNUSEDPARM
74 # ifdef __cplusplus
75 # define SWIGUNUSEDPARM(p)
76 # else
77 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
78 # endif
79 #endif
80
81 /* internal SWIG method */
82 #ifndef SWIGINTERN
83 # define SWIGINTERN static SWIGUNUSED
84 #endif
85
86 /* internal inline SWIG method */
87 #ifndef SWIGINTERNINLINE
88 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
89 #endif
90
91 /* qualifier for exported *const* global data variables*/
92 #ifndef SWIGEXTERN
93 # ifdef __cplusplus
94 # define SWIGEXTERN extern
95 # else
96 # define SWIGEXTERN
97 # endif
98 #endif
99
100 /* exporting methods */
101 #if defined(__GNUC__)
102 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
103 # ifndef GCC_HASCLASSVISIBILITY
104 # define GCC_HASCLASSVISIBILITY
105 # endif
106 # endif
107 #endif
108
109 #ifndef SWIGEXPORT
110 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
111 # if defined(STATIC_LINKED)
112 # define SWIGEXPORT
113 # else
114 # define SWIGEXPORT __declspec(dllexport)
115 # endif
116 # else
117 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
118 # define SWIGEXPORT __attribute__ ((visibility("default")))
119 # else
120 # define SWIGEXPORT
121 # endif
122 # endif
123 #endif
124
125 /* calling conventions for Windows */
126 #ifndef SWIGSTDCALL
127 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
128 # define SWIGSTDCALL __stdcall
129 # else
130 # define SWIGSTDCALL
131 # endif
132 #endif
133
134 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
135 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
136 # define _CRT_SECURE_NO_DEPRECATE
137 #endif
138
139 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
140 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
141 # define _SCL_SECURE_NO_DEPRECATE
142 #endif
143
144 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
145 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
146 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
147 #endif
148
149 /* Intel's compiler complains if a variable which was never initialised is
150 * cast to void, which is a common idiom which we use to indicate that we
151 * are aware a variable isn't used. So we just silence that warning.
152 * See: https://github.com/swig/swig/issues/192 for more discussion.
153 */
154 #ifdef __INTEL_COMPILER
155 # pragma warning disable 592
156 #endif
157
158 /* Errors in SWIG */
159 #define SWIG_UnknownError -1
160 #define SWIG_IOError -2
161 #define SWIG_RuntimeError -3
162 #define SWIG_IndexError -4
163 #define SWIG_TypeError -5
164 #define SWIG_DivisionByZero -6
165 #define SWIG_OverflowError -7
166 #define SWIG_SyntaxError -8
167 #define SWIG_ValueError -9
168 #define SWIG_SystemError -10
169 #define SWIG_AttributeError -11
170 #define SWIG_MemoryError -12
171 #define SWIG_NullReferenceError -13
172
173
174
175
176 #include <assert.h>
177 #define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
178 { printf("In " DECL ": " MSG); assert(0); RETURNNULL; }
179
180
181 #include <stdio.h>
182 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
183 # ifndef snprintf
184 # define snprintf _snprintf
185 # endif
186 #endif
187
188
189 /* Support for the `contract` feature.
190 *
191 * Note that RETURNNULL is first because it's inserted via a 'Replaceall' in
192 * the fortran.cxx file.
193 */
194 #define SWIG_contract_assert(RETURNNULL, EXPR, MSG) \
195 if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); }
196
197
198 #define SWIGVERSION 0x040000
199 #define SWIG_VERSION SWIGVERSION
200
201
202 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
203 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
204
205
206 #include "sundials/sundials_matrix.h"
207
208
209 #include "sunmatrix/sunmatrix_dense.h"
210
_wrap_FSUNDenseMatrix(int64_t const * farg1,int64_t const * farg2)211 SWIGEXPORT SUNMatrix _wrap_FSUNDenseMatrix(int64_t const *farg1, int64_t const *farg2) {
212 SUNMatrix fresult ;
213 sunindextype arg1 ;
214 sunindextype arg2 ;
215 SUNMatrix result;
216
217 arg1 = (sunindextype)(*farg1);
218 arg2 = (sunindextype)(*farg2);
219 result = (SUNMatrix)SUNDenseMatrix(arg1,arg2);
220 fresult = result;
221 return fresult;
222 }
223
224
_wrap_FSUNDenseMatrix_Print(SUNMatrix farg1,void * farg2)225 SWIGEXPORT void _wrap_FSUNDenseMatrix_Print(SUNMatrix farg1, void *farg2) {
226 SUNMatrix arg1 = (SUNMatrix) 0 ;
227 FILE *arg2 = (FILE *) 0 ;
228
229 arg1 = (SUNMatrix)(farg1);
230 arg2 = (FILE *)(farg2);
231 SUNDenseMatrix_Print(arg1,arg2);
232 }
233
234
_wrap_FSUNDenseMatrix_Rows(SUNMatrix farg1)235 SWIGEXPORT int64_t _wrap_FSUNDenseMatrix_Rows(SUNMatrix farg1) {
236 int64_t fresult ;
237 SUNMatrix arg1 = (SUNMatrix) 0 ;
238 sunindextype result;
239
240 arg1 = (SUNMatrix)(farg1);
241 result = SUNDenseMatrix_Rows(arg1);
242 fresult = (sunindextype)(result);
243 return fresult;
244 }
245
246
_wrap_FSUNDenseMatrix_Columns(SUNMatrix farg1)247 SWIGEXPORT int64_t _wrap_FSUNDenseMatrix_Columns(SUNMatrix farg1) {
248 int64_t fresult ;
249 SUNMatrix arg1 = (SUNMatrix) 0 ;
250 sunindextype result;
251
252 arg1 = (SUNMatrix)(farg1);
253 result = SUNDenseMatrix_Columns(arg1);
254 fresult = (sunindextype)(result);
255 return fresult;
256 }
257
258
_wrap_FSUNDenseMatrix_LData(SUNMatrix farg1)259 SWIGEXPORT int64_t _wrap_FSUNDenseMatrix_LData(SUNMatrix farg1) {
260 int64_t fresult ;
261 SUNMatrix arg1 = (SUNMatrix) 0 ;
262 sunindextype result;
263
264 arg1 = (SUNMatrix)(farg1);
265 result = SUNDenseMatrix_LData(arg1);
266 fresult = (sunindextype)(result);
267 return fresult;
268 }
269
270
_wrap_FSUNDenseMatrix_Data(SUNMatrix farg1)271 SWIGEXPORT double * _wrap_FSUNDenseMatrix_Data(SUNMatrix farg1) {
272 double * fresult ;
273 SUNMatrix arg1 = (SUNMatrix) 0 ;
274 realtype *result = 0 ;
275
276 arg1 = (SUNMatrix)(farg1);
277 result = (realtype *)SUNDenseMatrix_Data(arg1);
278 fresult = result;
279 return fresult;
280 }
281
282
_wrap_FSUNDenseMatrix_Cols(SUNMatrix farg1)283 SWIGEXPORT void * _wrap_FSUNDenseMatrix_Cols(SUNMatrix farg1) {
284 void * fresult ;
285 SUNMatrix arg1 = (SUNMatrix) 0 ;
286 realtype **result = 0 ;
287
288 arg1 = (SUNMatrix)(farg1);
289 result = (realtype **)SUNDenseMatrix_Cols(arg1);
290 fresult = result;
291 return fresult;
292 }
293
294
_wrap_FSUNDenseMatrix_Column(SUNMatrix farg1,int64_t const * farg2)295 SWIGEXPORT double * _wrap_FSUNDenseMatrix_Column(SUNMatrix farg1, int64_t const *farg2) {
296 double * fresult ;
297 SUNMatrix arg1 = (SUNMatrix) 0 ;
298 sunindextype arg2 ;
299 realtype *result = 0 ;
300
301 arg1 = (SUNMatrix)(farg1);
302 arg2 = (sunindextype)(*farg2);
303 result = (realtype *)SUNDenseMatrix_Column(arg1,arg2);
304 fresult = result;
305 return fresult;
306 }
307
308
_wrap_FSUNMatGetID_Dense(SUNMatrix farg1)309 SWIGEXPORT int _wrap_FSUNMatGetID_Dense(SUNMatrix farg1) {
310 int fresult ;
311 SUNMatrix arg1 = (SUNMatrix) 0 ;
312 SUNMatrix_ID result;
313
314 arg1 = (SUNMatrix)(farg1);
315 result = (SUNMatrix_ID)SUNMatGetID_Dense(arg1);
316 fresult = (int)(result);
317 return fresult;
318 }
319
320
_wrap_FSUNMatClone_Dense(SUNMatrix farg1)321 SWIGEXPORT SUNMatrix _wrap_FSUNMatClone_Dense(SUNMatrix farg1) {
322 SUNMatrix fresult ;
323 SUNMatrix arg1 = (SUNMatrix) 0 ;
324 SUNMatrix result;
325
326 arg1 = (SUNMatrix)(farg1);
327 result = (SUNMatrix)SUNMatClone_Dense(arg1);
328 fresult = result;
329 return fresult;
330 }
331
332
_wrap_FSUNMatDestroy_Dense(SUNMatrix farg1)333 SWIGEXPORT void _wrap_FSUNMatDestroy_Dense(SUNMatrix farg1) {
334 SUNMatrix arg1 = (SUNMatrix) 0 ;
335
336 arg1 = (SUNMatrix)(farg1);
337 SUNMatDestroy_Dense(arg1);
338 }
339
340
_wrap_FSUNMatZero_Dense(SUNMatrix farg1)341 SWIGEXPORT int _wrap_FSUNMatZero_Dense(SUNMatrix farg1) {
342 int fresult ;
343 SUNMatrix arg1 = (SUNMatrix) 0 ;
344 int result;
345
346 arg1 = (SUNMatrix)(farg1);
347 result = (int)SUNMatZero_Dense(arg1);
348 fresult = (int)(result);
349 return fresult;
350 }
351
352
_wrap_FSUNMatCopy_Dense(SUNMatrix farg1,SUNMatrix farg2)353 SWIGEXPORT int _wrap_FSUNMatCopy_Dense(SUNMatrix farg1, SUNMatrix farg2) {
354 int fresult ;
355 SUNMatrix arg1 = (SUNMatrix) 0 ;
356 SUNMatrix arg2 = (SUNMatrix) 0 ;
357 int result;
358
359 arg1 = (SUNMatrix)(farg1);
360 arg2 = (SUNMatrix)(farg2);
361 result = (int)SUNMatCopy_Dense(arg1,arg2);
362 fresult = (int)(result);
363 return fresult;
364 }
365
366
_wrap_FSUNMatScaleAdd_Dense(double const * farg1,SUNMatrix farg2,SUNMatrix farg3)367 SWIGEXPORT int _wrap_FSUNMatScaleAdd_Dense(double const *farg1, SUNMatrix farg2, SUNMatrix farg3) {
368 int fresult ;
369 realtype arg1 ;
370 SUNMatrix arg2 = (SUNMatrix) 0 ;
371 SUNMatrix arg3 = (SUNMatrix) 0 ;
372 int result;
373
374 arg1 = (realtype)(*farg1);
375 arg2 = (SUNMatrix)(farg2);
376 arg3 = (SUNMatrix)(farg3);
377 result = (int)SUNMatScaleAdd_Dense(arg1,arg2,arg3);
378 fresult = (int)(result);
379 return fresult;
380 }
381
382
_wrap_FSUNMatScaleAddI_Dense(double const * farg1,SUNMatrix farg2)383 SWIGEXPORT int _wrap_FSUNMatScaleAddI_Dense(double const *farg1, SUNMatrix farg2) {
384 int fresult ;
385 realtype arg1 ;
386 SUNMatrix arg2 = (SUNMatrix) 0 ;
387 int result;
388
389 arg1 = (realtype)(*farg1);
390 arg2 = (SUNMatrix)(farg2);
391 result = (int)SUNMatScaleAddI_Dense(arg1,arg2);
392 fresult = (int)(result);
393 return fresult;
394 }
395
396
_wrap_FSUNMatMatvec_Dense(SUNMatrix farg1,N_Vector farg2,N_Vector farg3)397 SWIGEXPORT int _wrap_FSUNMatMatvec_Dense(SUNMatrix farg1, N_Vector farg2, N_Vector farg3) {
398 int fresult ;
399 SUNMatrix arg1 = (SUNMatrix) 0 ;
400 N_Vector arg2 = (N_Vector) 0 ;
401 N_Vector arg3 = (N_Vector) 0 ;
402 int result;
403
404 arg1 = (SUNMatrix)(farg1);
405 arg2 = (N_Vector)(farg2);
406 arg3 = (N_Vector)(farg3);
407 result = (int)SUNMatMatvec_Dense(arg1,arg2,arg3);
408 fresult = (int)(result);
409 return fresult;
410 }
411
412
_wrap_FSUNMatSpace_Dense(SUNMatrix farg1,long * farg2,long * farg3)413 SWIGEXPORT int _wrap_FSUNMatSpace_Dense(SUNMatrix farg1, long *farg2, long *farg3) {
414 int fresult ;
415 SUNMatrix arg1 = (SUNMatrix) 0 ;
416 long *arg2 = (long *) 0 ;
417 long *arg3 = (long *) 0 ;
418 int result;
419
420 arg1 = (SUNMatrix)(farg1);
421 arg2 = (long *)(farg2);
422 arg3 = (long *)(farg3);
423 result = (int)SUNMatSpace_Dense(arg1,arg2,arg3);
424 fresult = (int)(result);
425 return fresult;
426 }
427
428
429
430