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-2020, 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_nonlinearsolver.h"
207
208
209 #include "sunnonlinsol/sunnonlinsol_newton.h"
210
_wrap_FSUNNonlinSol_Newton(N_Vector farg1)211 SWIGEXPORT SUNNonlinearSolver _wrap_FSUNNonlinSol_Newton(N_Vector farg1) {
212 SUNNonlinearSolver fresult ;
213 N_Vector arg1 = (N_Vector) 0 ;
214 SUNNonlinearSolver result;
215
216 arg1 = (N_Vector)(farg1);
217 result = (SUNNonlinearSolver)SUNNonlinSol_Newton(arg1);
218 fresult = result;
219 return fresult;
220 }
221
222
_wrap_FSUNNonlinSol_NewtonSens(int const * farg1,N_Vector farg2)223 SWIGEXPORT SUNNonlinearSolver _wrap_FSUNNonlinSol_NewtonSens(int const *farg1, N_Vector farg2) {
224 SUNNonlinearSolver fresult ;
225 int arg1 ;
226 N_Vector arg2 = (N_Vector) 0 ;
227 SUNNonlinearSolver result;
228
229 arg1 = (int)(*farg1);
230 arg2 = (N_Vector)(farg2);
231 result = (SUNNonlinearSolver)SUNNonlinSol_NewtonSens(arg1,arg2);
232 fresult = result;
233 return fresult;
234 }
235
236
_wrap_FSUNNonlinSolGetType_Newton(SUNNonlinearSolver farg1)237 SWIGEXPORT int _wrap_FSUNNonlinSolGetType_Newton(SUNNonlinearSolver farg1) {
238 int fresult ;
239 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
240 SUNNonlinearSolver_Type result;
241
242 arg1 = (SUNNonlinearSolver)(farg1);
243 result = (SUNNonlinearSolver_Type)SUNNonlinSolGetType_Newton(arg1);
244 fresult = (int)(result);
245 return fresult;
246 }
247
248
_wrap_FSUNNonlinSolInitialize_Newton(SUNNonlinearSolver farg1)249 SWIGEXPORT int _wrap_FSUNNonlinSolInitialize_Newton(SUNNonlinearSolver farg1) {
250 int fresult ;
251 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
252 int result;
253
254 arg1 = (SUNNonlinearSolver)(farg1);
255 result = (int)SUNNonlinSolInitialize_Newton(arg1);
256 fresult = (int)(result);
257 return fresult;
258 }
259
260
_wrap_FSUNNonlinSolSolve_Newton(SUNNonlinearSolver farg1,N_Vector farg2,N_Vector farg3,N_Vector farg4,double const * farg5,int const * farg6,void * farg7)261 SWIGEXPORT int _wrap_FSUNNonlinSolSolve_Newton(SUNNonlinearSolver farg1, N_Vector farg2, N_Vector farg3, N_Vector farg4, double const *farg5, int const *farg6, void *farg7) {
262 int fresult ;
263 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
264 N_Vector arg2 = (N_Vector) 0 ;
265 N_Vector arg3 = (N_Vector) 0 ;
266 N_Vector arg4 = (N_Vector) 0 ;
267 realtype arg5 ;
268 int arg6 ;
269 void *arg7 = (void *) 0 ;
270 int result;
271
272 arg1 = (SUNNonlinearSolver)(farg1);
273 arg2 = (N_Vector)(farg2);
274 arg3 = (N_Vector)(farg3);
275 arg4 = (N_Vector)(farg4);
276 arg5 = (realtype)(*farg5);
277 arg6 = (int)(*farg6);
278 arg7 = (void *)(farg7);
279 result = (int)SUNNonlinSolSolve_Newton(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
280 fresult = (int)(result);
281 return fresult;
282 }
283
284
_wrap_FSUNNonlinSolFree_Newton(SUNNonlinearSolver farg1)285 SWIGEXPORT int _wrap_FSUNNonlinSolFree_Newton(SUNNonlinearSolver farg1) {
286 int fresult ;
287 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
288 int result;
289
290 arg1 = (SUNNonlinearSolver)(farg1);
291 result = (int)SUNNonlinSolFree_Newton(arg1);
292 fresult = (int)(result);
293 return fresult;
294 }
295
296
_wrap_FSUNNonlinSolSetSysFn_Newton(SUNNonlinearSolver farg1,SUNNonlinSolSysFn farg2)297 SWIGEXPORT int _wrap_FSUNNonlinSolSetSysFn_Newton(SUNNonlinearSolver farg1, SUNNonlinSolSysFn farg2) {
298 int fresult ;
299 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
300 SUNNonlinSolSysFn arg2 = (SUNNonlinSolSysFn) 0 ;
301 int result;
302
303 arg1 = (SUNNonlinearSolver)(farg1);
304 arg2 = (SUNNonlinSolSysFn)(farg2);
305 result = (int)SUNNonlinSolSetSysFn_Newton(arg1,arg2);
306 fresult = (int)(result);
307 return fresult;
308 }
309
310
_wrap_FSUNNonlinSolSetLSetupFn_Newton(SUNNonlinearSolver farg1,SUNNonlinSolLSetupFn farg2)311 SWIGEXPORT int _wrap_FSUNNonlinSolSetLSetupFn_Newton(SUNNonlinearSolver farg1, SUNNonlinSolLSetupFn farg2) {
312 int fresult ;
313 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
314 SUNNonlinSolLSetupFn arg2 = (SUNNonlinSolLSetupFn) 0 ;
315 int result;
316
317 arg1 = (SUNNonlinearSolver)(farg1);
318 arg2 = (SUNNonlinSolLSetupFn)(farg2);
319 result = (int)SUNNonlinSolSetLSetupFn_Newton(arg1,arg2);
320 fresult = (int)(result);
321 return fresult;
322 }
323
324
_wrap_FSUNNonlinSolSetLSolveFn_Newton(SUNNonlinearSolver farg1,SUNNonlinSolLSolveFn farg2)325 SWIGEXPORT int _wrap_FSUNNonlinSolSetLSolveFn_Newton(SUNNonlinearSolver farg1, SUNNonlinSolLSolveFn farg2) {
326 int fresult ;
327 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
328 SUNNonlinSolLSolveFn arg2 = (SUNNonlinSolLSolveFn) 0 ;
329 int result;
330
331 arg1 = (SUNNonlinearSolver)(farg1);
332 arg2 = (SUNNonlinSolLSolveFn)(farg2);
333 result = (int)SUNNonlinSolSetLSolveFn_Newton(arg1,arg2);
334 fresult = (int)(result);
335 return fresult;
336 }
337
338
_wrap_FSUNNonlinSolSetConvTestFn_Newton(SUNNonlinearSolver farg1,SUNNonlinSolConvTestFn farg2,void * farg3)339 SWIGEXPORT int _wrap_FSUNNonlinSolSetConvTestFn_Newton(SUNNonlinearSolver farg1, SUNNonlinSolConvTestFn farg2, void *farg3) {
340 int fresult ;
341 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
342 SUNNonlinSolConvTestFn arg2 = (SUNNonlinSolConvTestFn) 0 ;
343 void *arg3 = (void *) 0 ;
344 int result;
345
346 arg1 = (SUNNonlinearSolver)(farg1);
347 arg2 = (SUNNonlinSolConvTestFn)(farg2);
348 arg3 = (void *)(farg3);
349 result = (int)SUNNonlinSolSetConvTestFn_Newton(arg1,arg2,arg3);
350 fresult = (int)(result);
351 return fresult;
352 }
353
354
_wrap_FSUNNonlinSolSetMaxIters_Newton(SUNNonlinearSolver farg1,int const * farg2)355 SWIGEXPORT int _wrap_FSUNNonlinSolSetMaxIters_Newton(SUNNonlinearSolver farg1, int const *farg2) {
356 int fresult ;
357 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
358 int arg2 ;
359 int result;
360
361 arg1 = (SUNNonlinearSolver)(farg1);
362 arg2 = (int)(*farg2);
363 result = (int)SUNNonlinSolSetMaxIters_Newton(arg1,arg2);
364 fresult = (int)(result);
365 return fresult;
366 }
367
368
_wrap_FSUNNonlinSolGetNumIters_Newton(SUNNonlinearSolver farg1,long * farg2)369 SWIGEXPORT int _wrap_FSUNNonlinSolGetNumIters_Newton(SUNNonlinearSolver farg1, long *farg2) {
370 int fresult ;
371 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
372 long *arg2 = (long *) 0 ;
373 int result;
374
375 arg1 = (SUNNonlinearSolver)(farg1);
376 arg2 = (long *)(farg2);
377 result = (int)SUNNonlinSolGetNumIters_Newton(arg1,arg2);
378 fresult = (int)(result);
379 return fresult;
380 }
381
382
_wrap_FSUNNonlinSolGetCurIter_Newton(SUNNonlinearSolver farg1,int * farg2)383 SWIGEXPORT int _wrap_FSUNNonlinSolGetCurIter_Newton(SUNNonlinearSolver farg1, int *farg2) {
384 int fresult ;
385 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
386 int *arg2 = (int *) 0 ;
387 int result;
388
389 arg1 = (SUNNonlinearSolver)(farg1);
390 arg2 = (int *)(farg2);
391 result = (int)SUNNonlinSolGetCurIter_Newton(arg1,arg2);
392 fresult = (int)(result);
393 return fresult;
394 }
395
396
_wrap_FSUNNonlinSolGetNumConvFails_Newton(SUNNonlinearSolver farg1,long * farg2)397 SWIGEXPORT int _wrap_FSUNNonlinSolGetNumConvFails_Newton(SUNNonlinearSolver farg1, long *farg2) {
398 int fresult ;
399 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
400 long *arg2 = (long *) 0 ;
401 int result;
402
403 arg1 = (SUNNonlinearSolver)(farg1);
404 arg2 = (long *)(farg2);
405 result = (int)SUNNonlinSolGetNumConvFails_Newton(arg1,arg2);
406 fresult = (int)(result);
407 return fresult;
408 }
409
410
_wrap_FSUNNonlinSolGetSysFn_Newton(SUNNonlinearSolver farg1,void * farg2)411 SWIGEXPORT int _wrap_FSUNNonlinSolGetSysFn_Newton(SUNNonlinearSolver farg1, void *farg2) {
412 int fresult ;
413 SUNNonlinearSolver arg1 = (SUNNonlinearSolver) 0 ;
414 SUNNonlinSolSysFn *arg2 = (SUNNonlinSolSysFn *) 0 ;
415 int result;
416
417 arg1 = (SUNNonlinearSolver)(farg1);
418 arg2 = (SUNNonlinSolSysFn *)(farg2);
419 result = (int)SUNNonlinSolGetSysFn_Newton(arg1,arg2);
420 fresult = (int)(result);
421 return fresult;
422 }
423
424
425
426