1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.31
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 #define SWIGPYTHON
12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13 /* -----------------------------------------------------------------------------
14 * This section contains generic SWIG labels for method/variable
15 * declarations/attributes, and other compiler dependent labels.
16 * ----------------------------------------------------------------------------- */
17
18 /* template workaround for compilers that cannot correctly implement the C++ standard */
19 #ifndef SWIGTEMPLATEDISAMBIGUATOR
20 # if defined(__SUNPRO_CC)
21 # if (__SUNPRO_CC <= 0x560)
22 # define SWIGTEMPLATEDISAMBIGUATOR template
23 # else
24 # define SWIGTEMPLATEDISAMBIGUATOR
25 # endif
26 # else
27 # define SWIGTEMPLATEDISAMBIGUATOR
28 # endif
29 #endif
30
31 /* inline attribute */
32 #ifndef SWIGINLINE
33 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34 # define SWIGINLINE inline
35 # else
36 # define SWIGINLINE
37 # endif
38 #endif
39
40 /* attribute recognised by some compilers to avoid 'unused' warnings */
41 #ifndef SWIGUNUSED
42 # if defined(__GNUC__)
43 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44 # define SWIGUNUSED __attribute__ ((__unused__))
45 # else
46 # define SWIGUNUSED
47 # endif
48 # elif defined(__ICC)
49 # define SWIGUNUSED __attribute__ ((__unused__))
50 # else
51 # define SWIGUNUSED
52 # endif
53 #endif
54
55 #ifndef SWIGUNUSEDPARM
56 # ifdef __cplusplus
57 # define SWIGUNUSEDPARM(p)
58 # else
59 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
60 # endif
61 #endif
62
63 /* internal SWIG method */
64 #ifndef SWIGINTERN
65 # define SWIGINTERN static SWIGUNUSED
66 #endif
67
68 /* internal inline SWIG method */
69 #ifndef SWIGINTERNINLINE
70 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
71 #endif
72
73 /* exporting methods */
74 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
75 # ifndef GCC_HASCLASSVISIBILITY
76 # define GCC_HASCLASSVISIBILITY
77 # endif
78 #endif
79
80 #ifndef SWIGEXPORT
81 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
82 # if defined(STATIC_LINKED)
83 # define SWIGEXPORT
84 # else
85 # define SWIGEXPORT __declspec(dllexport)
86 # endif
87 # else
88 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
89 # define SWIGEXPORT __attribute__ ((visibility("default")))
90 # else
91 # define SWIGEXPORT
92 # endif
93 # endif
94 #endif
95
96 /* calling conventions for Windows */
97 #ifndef SWIGSTDCALL
98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99 # define SWIGSTDCALL __stdcall
100 # else
101 # define SWIGSTDCALL
102 # endif
103 #endif
104
105 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
106 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
107 # define _CRT_SECURE_NO_DEPRECATE
108 #endif
109
110
111 /* Python.h has to appear first */
112 #include <Python.h>
113
114 /* -----------------------------------------------------------------------------
115 * swigrun.swg
116 *
117 * This file contains generic CAPI SWIG runtime support for pointer
118 * type checking.
119 * ----------------------------------------------------------------------------- */
120
121 /* This should only be incremented when either the layout of swig_type_info changes,
122 or for whatever reason, the runtime changes incompatibly */
123 #define SWIG_RUNTIME_VERSION "3"
124
125 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
126 #ifdef SWIG_TYPE_TABLE
127 # define SWIG_QUOTE_STRING(x) #x
128 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
129 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
130 #else
131 # define SWIG_TYPE_TABLE_NAME
132 #endif
133
134 /*
135 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
136 creating a static or dynamic library from the swig runtime code.
137 In 99.9% of the cases, swig just needs to declare them as 'static'.
138
139 But only do this if is strictly necessary, ie, if you have problems
140 with your compiler or so.
141 */
142
143 #ifndef SWIGRUNTIME
144 # define SWIGRUNTIME SWIGINTERN
145 #endif
146
147 #ifndef SWIGRUNTIMEINLINE
148 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
149 #endif
150
151 /* Generic buffer size */
152 #ifndef SWIG_BUFFER_SIZE
153 # define SWIG_BUFFER_SIZE 1024
154 #endif
155
156 /* Flags for pointer conversions */
157 #define SWIG_POINTER_DISOWN 0x1
158
159 /* Flags for new pointer objects */
160 #define SWIG_POINTER_OWN 0x1
161
162
163 /*
164 Flags/methods for returning states.
165
166 The swig conversion methods, as ConvertPtr, return and integer
167 that tells if the conversion was successful or not. And if not,
168 an error code can be returned (see swigerrors.swg for the codes).
169
170 Use the following macros/flags to set or process the returning
171 states.
172
173 In old swig versions, you usually write code as:
174
175 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
176 // success code
177 } else {
178 //fail code
179 }
180
181 Now you can be more explicit as:
182
183 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
184 if (SWIG_IsOK(res)) {
185 // success code
186 } else {
187 // fail code
188 }
189
190 that seems to be the same, but now you can also do
191
192 Type *ptr;
193 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
194 if (SWIG_IsOK(res)) {
195 // success code
196 if (SWIG_IsNewObj(res) {
197 ...
198 delete *ptr;
199 } else {
200 ...
201 }
202 } else {
203 // fail code
204 }
205
206 I.e., now SWIG_ConvertPtr can return new objects and you can
207 identify the case and take care of the deallocation. Of course that
208 requires also to SWIG_ConvertPtr to return new result values, as
209
210 int SWIG_ConvertPtr(obj, ptr,...) {
211 if (<obj is ok>) {
212 if (<need new object>) {
213 *ptr = <ptr to new allocated object>;
214 return SWIG_NEWOBJ;
215 } else {
216 *ptr = <ptr to old object>;
217 return SWIG_OLDOBJ;
218 }
219 } else {
220 return SWIG_BADOBJ;
221 }
222 }
223
224 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
225 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
226 swig errors code.
227
228 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
229 allows to return the 'cast rank', for example, if you have this
230
231 int food(double)
232 int fooi(int);
233
234 and you call
235
236 food(1) // cast rank '1' (1 -> 1.0)
237 fooi(1) // cast rank '0'
238
239 just use the SWIG_AddCast()/SWIG_CheckState()
240
241
242 */
243 #define SWIG_OK (0)
244 #define SWIG_ERROR (-1)
245 #define SWIG_IsOK(r) (r >= 0)
246 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
247
248 /* The CastRankLimit says how many bits are used for the cast rank */
249 #define SWIG_CASTRANKLIMIT (1 << 8)
250 /* The NewMask denotes the object was created (using new/malloc) */
251 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
252 /* The TmpMask is for in/out typemaps that use temporal objects */
253 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
254 /* Simple returning values */
255 #define SWIG_BADOBJ (SWIG_ERROR)
256 #define SWIG_OLDOBJ (SWIG_OK)
257 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
258 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
259 /* Check, add and del mask methods */
260 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
261 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
262 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
263 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
264 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
265 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
266
267
268 /* Cast-Rank Mode */
269 #if defined(SWIG_CASTRANK_MODE)
270 # ifndef SWIG_TypeRank
271 # define SWIG_TypeRank unsigned long
272 # endif
273 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
274 # define SWIG_MAXCASTRANK (2)
275 # endif
276 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
277 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)278 SWIGINTERNINLINE int SWIG_AddCast(int r) {
279 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
280 }
SWIG_CheckState(int r)281 SWIGINTERNINLINE int SWIG_CheckState(int r) {
282 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
283 }
284 #else /* no cast-rank mode */
285 # define SWIG_AddCast
286 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
287 #endif
288
289
290
291
292 #include <string.h>
293
294 #ifdef __cplusplus
295 extern "C" {
296 #endif
297
298 typedef void *(*swig_converter_func)(void *);
299 typedef struct swig_type_info *(*swig_dycast_func)(void **);
300
301 /* Structure to store inforomation on one type */
302 typedef struct swig_type_info {
303 const char *name; /* mangled name of this type */
304 const char *str; /* human readable name of this type */
305 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
306 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
307 void *clientdata; /* language specific type data */
308 int owndata; /* flag if the structure owns the clientdata */
309 } swig_type_info;
310
311 /* Structure to store a type and conversion function used for casting */
312 typedef struct swig_cast_info {
313 swig_type_info *type; /* pointer to type that is equivalent to this type */
314 swig_converter_func converter; /* function to cast the void pointers */
315 struct swig_cast_info *next; /* pointer to next cast in linked list */
316 struct swig_cast_info *prev; /* pointer to the previous cast */
317 } swig_cast_info;
318
319 /* Structure used to store module information
320 * Each module generates one structure like this, and the runtime collects
321 * all of these structures and stores them in a circularly linked list.*/
322 typedef struct swig_module_info {
323 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
324 size_t size; /* Number of types in this module */
325 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
326 swig_type_info **type_initial; /* Array of initially generated type structures */
327 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
328 void *clientdata; /* Language specific module data */
329 } swig_module_info;
330
331 /*
332 Compare two type names skipping the space characters, therefore
333 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
334
335 Return 0 when the two name types are equivalent, as in
336 strncmp, but skipping ' '.
337 */
338 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)339 SWIG_TypeNameComp(const char *f1, const char *l1,
340 const char *f2, const char *l2) {
341 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
342 while ((*f1 == ' ') && (f1 != l1)) ++f1;
343 while ((*f2 == ' ') && (f2 != l2)) ++f2;
344 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
345 }
346 return (l1 - f1) - (l2 - f2);
347 }
348
349 /*
350 Check type equivalence in a name list like <name1>|<name2>|...
351 Return 0 if not equal, 1 if equal
352 */
353 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)354 SWIG_TypeEquiv(const char *nb, const char *tb) {
355 int equiv = 0;
356 const char* te = tb + strlen(tb);
357 const char* ne = nb;
358 while (!equiv && *ne) {
359 for (nb = ne; *ne; ++ne) {
360 if (*ne == '|') break;
361 }
362 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
363 if (*ne) ++ne;
364 }
365 return equiv;
366 }
367
368 /*
369 Check type equivalence in a name list like <name1>|<name2>|...
370 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
371 */
372 SWIGRUNTIME int
SWIG_TypeCompare(const char * nb,const char * tb)373 SWIG_TypeCompare(const char *nb, const char *tb) {
374 int equiv = 0;
375 const char* te = tb + strlen(tb);
376 const char* ne = nb;
377 while (!equiv && *ne) {
378 for (nb = ne; *ne; ++ne) {
379 if (*ne == '|') break;
380 }
381 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
382 if (*ne) ++ne;
383 }
384 return equiv;
385 }
386
387
388 /* think of this as a c++ template<> or a scheme macro */
389 #define SWIG_TypeCheck_Template(comparison, ty) \
390 if (ty) { \
391 swig_cast_info *iter = ty->cast; \
392 while (iter) { \
393 if (comparison) { \
394 if (iter == ty->cast) return iter; \
395 /* Move iter to the top of the linked list */ \
396 iter->prev->next = iter->next; \
397 if (iter->next) \
398 iter->next->prev = iter->prev; \
399 iter->next = ty->cast; \
400 iter->prev = 0; \
401 if (ty->cast) ty->cast->prev = iter; \
402 ty->cast = iter; \
403 return iter; \
404 } \
405 iter = iter->next; \
406 } \
407 } \
408 return 0
409
410 /*
411 Check the typename
412 */
413 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)414 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
415 SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
416 }
417
418 /* Same as previous function, except strcmp is replaced with a pointer comparison */
419 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * into)420 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
421 SWIG_TypeCheck_Template(iter->type == from, into);
422 }
423
424 /*
425 Cast a pointer up an inheritance hierarchy
426 */
427 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr)428 SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
429 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
430 }
431
432 /*
433 Dynamic pointer casting. Down an inheritance hierarchy
434 */
435 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)436 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
437 swig_type_info *lastty = ty;
438 if (!ty || !ty->dcast) return ty;
439 while (ty && (ty->dcast)) {
440 ty = (*ty->dcast)(ptr);
441 if (ty) lastty = ty;
442 }
443 return lastty;
444 }
445
446 /*
447 Return the name associated with this type
448 */
449 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)450 SWIG_TypeName(const swig_type_info *ty) {
451 return ty->name;
452 }
453
454 /*
455 Return the pretty name associated with this type,
456 that is an unmangled type name in a form presentable to the user.
457 */
458 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)459 SWIG_TypePrettyName(const swig_type_info *type) {
460 /* The "str" field contains the equivalent pretty names of the
461 type, separated by vertical-bar characters. We choose
462 to print the last name, as it is often (?) the most
463 specific. */
464 if (!type) return NULL;
465 if (type->str != NULL) {
466 const char *last_name = type->str;
467 const char *s;
468 for (s = type->str; *s; s++)
469 if (*s == '|') last_name = s+1;
470 return last_name;
471 }
472 else
473 return type->name;
474 }
475
476 /*
477 Set the clientdata field for a type
478 */
479 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)480 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
481 swig_cast_info *cast = ti->cast;
482 /* if (ti->clientdata == clientdata) return; */
483 ti->clientdata = clientdata;
484
485 while (cast) {
486 if (!cast->converter) {
487 swig_type_info *tc = cast->type;
488 if (!tc->clientdata) {
489 SWIG_TypeClientData(tc, clientdata);
490 }
491 }
492 cast = cast->next;
493 }
494 }
495 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)496 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
497 SWIG_TypeClientData(ti, clientdata);
498 ti->owndata = 1;
499 }
500
501 /*
502 Search for a swig_type_info structure only by mangled name
503 Search is a O(log #types)
504
505 We start searching at module start, and finish searching when start == end.
506 Note: if start == end at the beginning of the function, we go all the way around
507 the circular list.
508 */
509 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)510 SWIG_MangledTypeQueryModule(swig_module_info *start,
511 swig_module_info *end,
512 const char *name) {
513 swig_module_info *iter = start;
514 do {
515 if (iter->size) {
516 register size_t l = 0;
517 register size_t r = iter->size - 1;
518 do {
519 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
520 register size_t i = (l + r) >> 1;
521 const char *iname = iter->types[i]->name;
522 if (iname) {
523 register int compare = strcmp(name, iname);
524 if (compare == 0) {
525 return iter->types[i];
526 } else if (compare < 0) {
527 if (i) {
528 r = i - 1;
529 } else {
530 break;
531 }
532 } else if (compare > 0) {
533 l = i + 1;
534 }
535 } else {
536 break; /* should never happen */
537 }
538 } while (l <= r);
539 }
540 iter = iter->next;
541 } while (iter != end);
542 return 0;
543 }
544
545 /*
546 Search for a swig_type_info structure for either a mangled name or a human readable name.
547 It first searches the mangled names of the types, which is a O(log #types)
548 If a type is not found it then searches the human readable names, which is O(#types).
549
550 We start searching at module start, and finish searching when start == end.
551 Note: if start == end at the beginning of the function, we go all the way around
552 the circular list.
553 */
554 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)555 SWIG_TypeQueryModule(swig_module_info *start,
556 swig_module_info *end,
557 const char *name) {
558 /* STEP 1: Search the name field using binary search */
559 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
560 if (ret) {
561 return ret;
562 } else {
563 /* STEP 2: If the type hasn't been found, do a complete search
564 of the str field (the human readable name) */
565 swig_module_info *iter = start;
566 do {
567 register size_t i = 0;
568 for (; i < iter->size; ++i) {
569 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
570 return iter->types[i];
571 }
572 iter = iter->next;
573 } while (iter != end);
574 }
575
576 /* neither found a match */
577 return 0;
578 }
579
580 /*
581 Pack binary data into a string
582 */
583 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)584 SWIG_PackData(char *c, void *ptr, size_t sz) {
585 static const char hex[17] = "0123456789abcdef";
586 register const unsigned char *u = (unsigned char *) ptr;
587 register const unsigned char *eu = u + sz;
588 for (; u != eu; ++u) {
589 register unsigned char uu = *u;
590 *(c++) = hex[(uu & 0xf0) >> 4];
591 *(c++) = hex[uu & 0xf];
592 }
593 return c;
594 }
595
596 /*
597 Unpack binary data from a string
598 */
599 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)600 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
601 register unsigned char *u = (unsigned char *) ptr;
602 register const unsigned char *eu = u + sz;
603 for (; u != eu; ++u) {
604 register char d = *(c++);
605 register unsigned char uu;
606 if ((d >= '0') && (d <= '9'))
607 uu = ((d - '0') << 4);
608 else if ((d >= 'a') && (d <= 'f'))
609 uu = ((d - ('a'-10)) << 4);
610 else
611 return (char *) 0;
612 d = *(c++);
613 if ((d >= '0') && (d <= '9'))
614 uu |= (d - '0');
615 else if ((d >= 'a') && (d <= 'f'))
616 uu |= (d - ('a'-10));
617 else
618 return (char *) 0;
619 *u = uu;
620 }
621 return c;
622 }
623
624 /*
625 Pack 'void *' into a string buffer.
626 */
627 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)628 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
629 char *r = buff;
630 if ((2*sizeof(void *) + 2) > bsz) return 0;
631 *(r++) = '_';
632 r = SWIG_PackData(r,&ptr,sizeof(void *));
633 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
634 strcpy(r,name);
635 return buff;
636 }
637
638 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)639 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
640 if (*c != '_') {
641 if (strcmp(c,"NULL") == 0) {
642 *ptr = (void *) 0;
643 return name;
644 } else {
645 return 0;
646 }
647 }
648 return SWIG_UnpackData(++c,ptr,sizeof(void *));
649 }
650
651 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)652 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
653 char *r = buff;
654 size_t lname = (name ? strlen(name) : 0);
655 if ((2*sz + 2 + lname) > bsz) return 0;
656 *(r++) = '_';
657 r = SWIG_PackData(r,ptr,sz);
658 if (lname) {
659 strncpy(r,name,lname+1);
660 } else {
661 *r = 0;
662 }
663 return buff;
664 }
665
666 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)667 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
668 if (*c != '_') {
669 if (strcmp(c,"NULL") == 0) {
670 memset(ptr,0,sz);
671 return name;
672 } else {
673 return 0;
674 }
675 }
676 return SWIG_UnpackData(++c,ptr,sz);
677 }
678
679 #ifdef __cplusplus
680 }
681 #endif
682
683 /* Errors in SWIG */
684 #define SWIG_UnknownError -1
685 #define SWIG_IOError -2
686 #define SWIG_RuntimeError -3
687 #define SWIG_IndexError -4
688 #define SWIG_TypeError -5
689 #define SWIG_DivisionByZero -6
690 #define SWIG_OverflowError -7
691 #define SWIG_SyntaxError -8
692 #define SWIG_ValueError -9
693 #define SWIG_SystemError -10
694 #define SWIG_AttributeError -11
695 #define SWIG_MemoryError -12
696 #define SWIG_NullReferenceError -13
697
698
699
700
701 /* Add PyOS_snprintf for old Pythons */
702 #if PY_VERSION_HEX < 0x02020000
703 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
704 # define PyOS_snprintf _snprintf
705 # else
706 # define PyOS_snprintf snprintf
707 # endif
708 #endif
709
710 /* A crude PyString_FromFormat implementation for old Pythons */
711 #if PY_VERSION_HEX < 0x02020000
712
713 #ifndef SWIG_PYBUFFER_SIZE
714 # define SWIG_PYBUFFER_SIZE 1024
715 #endif
716
717 static PyObject *
PyString_FromFormat(const char * fmt,...)718 PyString_FromFormat(const char *fmt, ...) {
719 va_list ap;
720 char buf[SWIG_PYBUFFER_SIZE * 2];
721 int res;
722 va_start(ap, fmt);
723 res = vsnprintf(buf, sizeof(buf), fmt, ap);
724 va_end(ap);
725 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
726 }
727 #endif
728
729 /* Add PyObject_Del for old Pythons */
730 #if PY_VERSION_HEX < 0x01060000
731 # define PyObject_Del(op) PyMem_DEL((op))
732 #endif
733 #ifndef PyObject_DEL
734 # define PyObject_DEL PyObject_Del
735 #endif
736
737 /* A crude PyExc_StopIteration exception for old Pythons */
738 #if PY_VERSION_HEX < 0x02020000
739 # ifndef PyExc_StopIteration
740 # define PyExc_StopIteration PyExc_RuntimeError
741 # endif
742 # ifndef PyObject_GenericGetAttr
743 # define PyObject_GenericGetAttr 0
744 # endif
745 #endif
746 /* Py_NotImplemented is defined in 2.1 and up. */
747 #if PY_VERSION_HEX < 0x02010000
748 # ifndef Py_NotImplemented
749 # define Py_NotImplemented PyExc_RuntimeError
750 # endif
751 #endif
752
753
754 /* A crude PyString_AsStringAndSize implementation for old Pythons */
755 #if PY_VERSION_HEX < 0x02010000
756 # ifndef PyString_AsStringAndSize
757 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
758 # endif
759 #endif
760
761 /* PySequence_Size for old Pythons */
762 #if PY_VERSION_HEX < 0x02000000
763 # ifndef PySequence_Size
764 # define PySequence_Size PySequence_Length
765 # endif
766 #endif
767
768
769 /* PyBool_FromLong for old Pythons */
770 #if PY_VERSION_HEX < 0x02030000
771 static
PyBool_FromLong(long ok)772 PyObject *PyBool_FromLong(long ok)
773 {
774 PyObject *result = ok ? Py_True : Py_False;
775 Py_INCREF(result);
776 return result;
777 }
778 #endif
779
780 /* Py_ssize_t for old Pythons */
781 /* This code is as recommended by: */
782 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
783 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
784 typedef int Py_ssize_t;
785 # define PY_SSIZE_T_MAX INT_MAX
786 # define PY_SSIZE_T_MIN INT_MIN
787 #endif
788
789 /* -----------------------------------------------------------------------------
790 * error manipulation
791 * ----------------------------------------------------------------------------- */
792
793 SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code)794 SWIG_Python_ErrorType(int code) {
795 PyObject* type = 0;
796 switch(code) {
797 case SWIG_MemoryError:
798 type = PyExc_MemoryError;
799 break;
800 case SWIG_IOError:
801 type = PyExc_IOError;
802 break;
803 case SWIG_RuntimeError:
804 type = PyExc_RuntimeError;
805 break;
806 case SWIG_IndexError:
807 type = PyExc_IndexError;
808 break;
809 case SWIG_TypeError:
810 type = PyExc_TypeError;
811 break;
812 case SWIG_DivisionByZero:
813 type = PyExc_ZeroDivisionError;
814 break;
815 case SWIG_OverflowError:
816 type = PyExc_OverflowError;
817 break;
818 case SWIG_SyntaxError:
819 type = PyExc_SyntaxError;
820 break;
821 case SWIG_ValueError:
822 type = PyExc_ValueError;
823 break;
824 case SWIG_SystemError:
825 type = PyExc_SystemError;
826 break;
827 case SWIG_AttributeError:
828 type = PyExc_AttributeError;
829 break;
830 default:
831 type = PyExc_RuntimeError;
832 }
833 return type;
834 }
835
836
837 SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char * mesg)838 SWIG_Python_AddErrorMsg(const char* mesg)
839 {
840 PyObject *type = 0;
841 PyObject *value = 0;
842 PyObject *traceback = 0;
843
844 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
845 if (value) {
846 PyObject *old_str = PyObject_Str(value);
847 PyErr_Clear();
848 Py_XINCREF(type);
849 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
850 Py_DECREF(old_str);
851 Py_DECREF(value);
852 } else {
853 PyErr_Format(PyExc_RuntimeError, mesg);
854 }
855 }
856
857
858
859 #if defined(SWIG_PYTHON_NO_THREADS)
860 # if defined(SWIG_PYTHON_THREADS)
861 # undef SWIG_PYTHON_THREADS
862 # endif
863 #endif
864 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
865 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
866 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
867 # define SWIG_PYTHON_USE_GIL
868 # endif
869 # endif
870 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
871 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
872 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
873 # endif
874 # ifdef __cplusplus /* C++ code */
875 class SWIG_Python_Thread_Block {
876 bool status;
877 PyGILState_STATE state;
878 public:
end()879 void end() { if (status) { PyGILState_Release(state); status = false;} }
SWIG_Python_Thread_Block()880 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
~SWIG_Python_Thread_Block()881 ~SWIG_Python_Thread_Block() { end(); }
882 };
883 class SWIG_Python_Thread_Allow {
884 bool status;
885 PyThreadState *save;
886 public:
end()887 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
SWIG_Python_Thread_Allow()888 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
~SWIG_Python_Thread_Allow()889 ~SWIG_Python_Thread_Allow() { end(); }
890 };
891 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
892 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
893 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
894 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
895 # else /* C code */
896 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
897 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
898 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
899 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
900 # endif
901 # else /* Old thread way, not implemented, user must provide it */
902 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
903 # define SWIG_PYTHON_INITIALIZE_THREADS
904 # endif
905 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
906 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
907 # endif
908 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
909 # define SWIG_PYTHON_THREAD_END_BLOCK
910 # endif
911 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
912 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
913 # endif
914 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
915 # define SWIG_PYTHON_THREAD_END_ALLOW
916 # endif
917 # endif
918 #else /* No thread support */
919 # define SWIG_PYTHON_INITIALIZE_THREADS
920 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
921 # define SWIG_PYTHON_THREAD_END_BLOCK
922 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
923 # define SWIG_PYTHON_THREAD_END_ALLOW
924 #endif
925
926 /* -----------------------------------------------------------------------------
927 * Python API portion that goes into the runtime
928 * ----------------------------------------------------------------------------- */
929
930 #ifdef __cplusplus
931 extern "C" {
932 #if 0
933 } /* cc-mode */
934 #endif
935 #endif
936
937 /* -----------------------------------------------------------------------------
938 * Constant declarations
939 * ----------------------------------------------------------------------------- */
940
941 /* Constant Types */
942 #define SWIG_PY_POINTER 4
943 #define SWIG_PY_BINARY 5
944
945 /* Constant information structure */
946 typedef struct swig_const_info {
947 int type;
948 char *name;
949 long lvalue;
950 double dvalue;
951 void *pvalue;
952 swig_type_info **ptype;
953 } swig_const_info;
954
955 #ifdef __cplusplus
956 #if 0
957 { /* cc-mode */
958 #endif
959 }
960 #endif
961
962
963 /* -----------------------------------------------------------------------------
964 * See the LICENSE file for information on copyright, usage and redistribution
965 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
966 *
967 * pyrun.swg
968 *
969 * This file contains the runtime support for Python modules
970 * and includes code for managing global variables and pointer
971 * type checking.
972 *
973 * ----------------------------------------------------------------------------- */
974
975 /* Common SWIG API */
976
977 /* for raw pointers */
978 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
979 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
980 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
981 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
982 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
983 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
984 #define swig_owntype int
985
986 /* for raw packed data */
987 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
988 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
989
990 /* for class or struct pointers */
991 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
992 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
993
994 /* for C or C++ function pointers */
995 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
996 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
997
998 /* for C++ member pointers, ie, member methods */
999 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1000 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1001
1002
1003 /* Runtime API */
1004
1005 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1006 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1007 #define SWIG_NewClientData(obj) PySwigClientData_New(obj)
1008
1009 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1010 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1011 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1012 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1013 #define SWIG_fail goto fail
1014
1015
1016 /* Runtime API implementation */
1017
1018 /* Error manipulation */
1019
1020 SWIGINTERN void
SWIG_Python_SetErrorObj(PyObject * errtype,PyObject * obj)1021 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1022 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1023 PyErr_SetObject(errtype, obj);
1024 Py_DECREF(obj);
1025 SWIG_PYTHON_THREAD_END_BLOCK;
1026 }
1027
1028 SWIGINTERN void
SWIG_Python_SetErrorMsg(PyObject * errtype,const char * msg)1029 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1030 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1031 PyErr_SetString(errtype, (char *) msg);
1032 SWIG_PYTHON_THREAD_END_BLOCK;
1033 }
1034
1035 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1036
1037 /* Set a constant value */
1038
1039 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,const char * name,PyObject * obj)1040 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1041 PyDict_SetItemString(d, (char*) name, obj);
1042 Py_DECREF(obj);
1043 }
1044
1045 /* Append a value to the result obj */
1046
1047 SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject * result,PyObject * obj)1048 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1049 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1050 if (!result) {
1051 result = obj;
1052 } else if (result == Py_None) {
1053 Py_DECREF(result);
1054 result = obj;
1055 } else {
1056 if (!PyList_Check(result)) {
1057 PyObject *o2 = result;
1058 result = PyList_New(1);
1059 PyList_SetItem(result, 0, o2);
1060 }
1061 PyList_Append(result,obj);
1062 Py_DECREF(obj);
1063 }
1064 return result;
1065 #else
1066 PyObject* o2;
1067 PyObject* o3;
1068 if (!result) {
1069 result = obj;
1070 } else if (result == Py_None) {
1071 Py_DECREF(result);
1072 result = obj;
1073 } else {
1074 if (!PyTuple_Check(result)) {
1075 o2 = result;
1076 result = PyTuple_New(1);
1077 PyTuple_SET_ITEM(result, 0, o2);
1078 }
1079 o3 = PyTuple_New(1);
1080 PyTuple_SET_ITEM(o3, 0, obj);
1081 o2 = result;
1082 result = PySequence_Concat(o2, o3);
1083 Py_DECREF(o2);
1084 Py_DECREF(o3);
1085 }
1086 return result;
1087 #endif
1088 }
1089
1090 /* Unpack the argument tuple */
1091
1092 SWIGINTERN int
SWIG_Python_UnpackTuple(PyObject * args,const char * name,int min,int max,PyObject ** objs)1093 SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
1094 {
1095 if (!args) {
1096 if (!min && !max) {
1097 return 1;
1098 } else {
1099 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1100 name, (min == max ? "" : "at least "), min);
1101 return 0;
1102 }
1103 }
1104 if (!PyTuple_Check(args)) {
1105 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1106 return 0;
1107 } else {
1108 register int l = PyTuple_GET_SIZE(args);
1109 if (l < min) {
1110 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1111 name, (min == max ? "" : "at least "), min, l);
1112 return 0;
1113 } else if (l > max) {
1114 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1115 name, (min == max ? "" : "at most "), max, l);
1116 return 0;
1117 } else {
1118 register int i;
1119 for (i = 0; i < l; ++i) {
1120 objs[i] = PyTuple_GET_ITEM(args, i);
1121 }
1122 for (; l < max; ++l) {
1123 objs[l] = 0;
1124 }
1125 return i + 1;
1126 }
1127 }
1128 }
1129
1130 /* A functor is a function object with one single object argument */
1131 #if PY_VERSION_HEX >= 0x02020000
1132 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1133 #else
1134 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1135 #endif
1136
1137 /*
1138 Helper for static pointer initialization for both C and C++ code, for example
1139 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1140 */
1141 #ifdef __cplusplus
1142 #define SWIG_STATIC_POINTER(var) var
1143 #else
1144 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1145 #endif
1146
1147 /* -----------------------------------------------------------------------------
1148 * Pointer declarations
1149 * ----------------------------------------------------------------------------- */
1150
1151 /* Flags for new pointer objects */
1152 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1153 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1154
1155 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1156
1157 #ifdef __cplusplus
1158 extern "C" {
1159 #if 0
1160 } /* cc-mode */
1161 #endif
1162 #endif
1163
1164 /* How to access Py_None */
1165 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1166 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1167 # ifndef SWIG_PYTHON_BUILD_NONE
1168 # define SWIG_PYTHON_BUILD_NONE
1169 # endif
1170 # endif
1171 #endif
1172
1173 #ifdef SWIG_PYTHON_BUILD_NONE
1174 # ifdef Py_None
1175 # undef Py_None
1176 # define Py_None SWIG_Py_None()
1177 # endif
1178 SWIGRUNTIMEINLINE PyObject *
_SWIG_Py_None(void)1179 _SWIG_Py_None(void)
1180 {
1181 PyObject *none = Py_BuildValue((char*)"");
1182 Py_DECREF(none);
1183 return none;
1184 }
1185 SWIGRUNTIME PyObject *
SWIG_Py_None(void)1186 SWIG_Py_None(void)
1187 {
1188 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1189 return none;
1190 }
1191 #endif
1192
1193 /* The python void return value */
1194
1195 SWIGRUNTIMEINLINE PyObject *
SWIG_Py_Void(void)1196 SWIG_Py_Void(void)
1197 {
1198 PyObject *none = Py_None;
1199 Py_INCREF(none);
1200 return none;
1201 }
1202
1203 /* PySwigClientData */
1204
1205 typedef struct {
1206 PyObject *klass;
1207 PyObject *newraw;
1208 PyObject *newargs;
1209 PyObject *destroy;
1210 int delargs;
1211 int implicitconv;
1212 } PySwigClientData;
1213
1214 SWIGRUNTIMEINLINE int
SWIG_Python_CheckImplicit(swig_type_info * ty)1215 SWIG_Python_CheckImplicit(swig_type_info *ty)
1216 {
1217 PySwigClientData *data = (PySwigClientData *)ty->clientdata;
1218 return data ? data->implicitconv : 0;
1219 }
1220
1221 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info * desc)1222 SWIG_Python_ExceptionType(swig_type_info *desc) {
1223 PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
1224 PyObject *klass = data ? data->klass : 0;
1225 return (klass ? klass : PyExc_RuntimeError);
1226 }
1227
1228
1229 SWIGRUNTIME PySwigClientData *
PySwigClientData_New(PyObject * obj)1230 PySwigClientData_New(PyObject* obj)
1231 {
1232 if (!obj) {
1233 return 0;
1234 } else {
1235 PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
1236 /* the klass element */
1237 data->klass = obj;
1238 Py_INCREF(data->klass);
1239 /* the newraw method and newargs arguments used to create a new raw instance */
1240 if (PyClass_Check(obj)) {
1241 data->newraw = 0;
1242 data->newargs = obj;
1243 Py_INCREF(obj);
1244 } else {
1245 #if (PY_VERSION_HEX < 0x02020000)
1246 data->newraw = 0;
1247 #else
1248 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1249 #endif
1250 if (data->newraw) {
1251 Py_INCREF(data->newraw);
1252 data->newargs = PyTuple_New(1);
1253 PyTuple_SetItem(data->newargs, 0, obj);
1254 } else {
1255 data->newargs = obj;
1256 }
1257 Py_INCREF(data->newargs);
1258 }
1259 /* the destroy method, aka as the C++ delete method */
1260 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1261 if (PyErr_Occurred()) {
1262 PyErr_Clear();
1263 data->destroy = 0;
1264 }
1265 if (data->destroy) {
1266 int flags;
1267 Py_INCREF(data->destroy);
1268 flags = PyCFunction_GET_FLAGS(data->destroy);
1269 #ifdef METH_O
1270 data->delargs = !(flags & (METH_O));
1271 #else
1272 data->delargs = 0;
1273 #endif
1274 } else {
1275 data->delargs = 0;
1276 }
1277 data->implicitconv = 0;
1278 return data;
1279 }
1280 }
1281
1282 SWIGRUNTIME void
PySwigClientData_Del(PySwigClientData * data)1283 PySwigClientData_Del(PySwigClientData* data)
1284 {
1285 Py_XDECREF(data->newraw);
1286 Py_XDECREF(data->newargs);
1287 Py_XDECREF(data->destroy);
1288 }
1289
1290 /* =============== PySwigObject =====================*/
1291
1292 typedef struct {
1293 PyObject_HEAD
1294 void *ptr;
1295 swig_type_info *ty;
1296 int own;
1297 PyObject *next;
1298 } PySwigObject;
1299
1300 SWIGRUNTIME PyObject *
PySwigObject_long(PySwigObject * v)1301 PySwigObject_long(PySwigObject *v)
1302 {
1303 return PyLong_FromVoidPtr(v->ptr);
1304 }
1305
1306 SWIGRUNTIME PyObject *
PySwigObject_format(const char * fmt,PySwigObject * v)1307 PySwigObject_format(const char* fmt, PySwigObject *v)
1308 {
1309 PyObject *res = NULL;
1310 PyObject *args = PyTuple_New(1);
1311 if (args) {
1312 if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
1313 PyObject *ofmt = PyString_FromString(fmt);
1314 if (ofmt) {
1315 res = PyString_Format(ofmt,args);
1316 Py_DECREF(ofmt);
1317 }
1318 Py_DECREF(args);
1319 }
1320 }
1321 return res;
1322 }
1323
1324 SWIGRUNTIME PyObject *
PySwigObject_oct(PySwigObject * v)1325 PySwigObject_oct(PySwigObject *v)
1326 {
1327 return PySwigObject_format("%o",v);
1328 }
1329
1330 SWIGRUNTIME PyObject *
PySwigObject_hex(PySwigObject * v)1331 PySwigObject_hex(PySwigObject *v)
1332 {
1333 return PySwigObject_format("%x",v);
1334 }
1335
1336 SWIGRUNTIME PyObject *
1337 #ifdef METH_NOARGS
PySwigObject_repr(PySwigObject * v)1338 PySwigObject_repr(PySwigObject *v)
1339 #else
1340 PySwigObject_repr(PySwigObject *v, PyObject *args)
1341 #endif
1342 {
1343 const char *name = SWIG_TypePrettyName(v->ty);
1344 PyObject *hex = PySwigObject_hex(v);
1345 PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
1346 Py_DECREF(hex);
1347 if (v->next) {
1348 #ifdef METH_NOARGS
1349 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
1350 #else
1351 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
1352 #endif
1353 PyString_ConcatAndDel(&repr,nrep);
1354 }
1355 return repr;
1356 }
1357
1358 SWIGRUNTIME int
PySwigObject_print(PySwigObject * v,FILE * fp,int SWIGUNUSEDPARM (flags))1359 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1360 {
1361 #ifdef METH_NOARGS
1362 PyObject *repr = PySwigObject_repr(v);
1363 #else
1364 PyObject *repr = PySwigObject_repr(v, NULL);
1365 #endif
1366 if (repr) {
1367 fputs(PyString_AsString(repr), fp);
1368 Py_DECREF(repr);
1369 return 0;
1370 } else {
1371 return 1;
1372 }
1373 }
1374
1375 SWIGRUNTIME PyObject *
PySwigObject_str(PySwigObject * v)1376 PySwigObject_str(PySwigObject *v)
1377 {
1378 char result[SWIG_BUFFER_SIZE];
1379 return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1380 PyString_FromString(result) : 0;
1381 }
1382
1383 SWIGRUNTIME int
PySwigObject_compare(PySwigObject * v,PySwigObject * w)1384 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
1385 {
1386 void *i = v->ptr;
1387 void *j = w->ptr;
1388 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1389 }
1390
1391 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1392
1393 SWIGRUNTIME PyTypeObject*
PySwigObject_type(void)1394 PySwigObject_type(void) {
1395 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1396 return type;
1397 }
1398
1399 SWIGRUNTIMEINLINE int
PySwigObject_Check(PyObject * op)1400 PySwigObject_Check(PyObject *op) {
1401 return ((op)->ob_type == PySwigObject_type())
1402 || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
1403 }
1404
1405 SWIGRUNTIME PyObject *
1406 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
1407
1408 SWIGRUNTIME void
PySwigObject_dealloc(PyObject * v)1409 PySwigObject_dealloc(PyObject *v)
1410 {
1411 PySwigObject *sobj = (PySwigObject *) v;
1412 PyObject *next = sobj->next;
1413 if (sobj->own) {
1414 swig_type_info *ty = sobj->ty;
1415 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1416 PyObject *destroy = data ? data->destroy : 0;
1417 if (destroy) {
1418 /* destroy is always a VARARGS method */
1419 PyObject *res;
1420 if (data->delargs) {
1421 /* we need to create a temporal object to carry the destroy operation */
1422 PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
1423 res = SWIG_Python_CallFunctor(destroy, tmp);
1424 Py_DECREF(tmp);
1425 } else {
1426 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1427 PyObject *mself = PyCFunction_GET_SELF(destroy);
1428 res = ((*meth)(mself, v));
1429 }
1430 Py_XDECREF(res);
1431 } else {
1432 const char *name = SWIG_TypePrettyName(ty);
1433 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1434 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
1435 #endif
1436 }
1437 }
1438 Py_XDECREF(next);
1439 PyObject_DEL(v);
1440 }
1441
1442 SWIGRUNTIME PyObject*
PySwigObject_append(PyObject * v,PyObject * next)1443 PySwigObject_append(PyObject* v, PyObject* next)
1444 {
1445 PySwigObject *sobj = (PySwigObject *) v;
1446 #ifndef METH_O
1447 PyObject *tmp = 0;
1448 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1449 next = tmp;
1450 #endif
1451 if (!PySwigObject_Check(next)) {
1452 return NULL;
1453 }
1454 sobj->next = next;
1455 Py_INCREF(next);
1456 return SWIG_Py_Void();
1457 }
1458
1459 SWIGRUNTIME PyObject*
1460 #ifdef METH_NOARGS
PySwigObject_next(PyObject * v)1461 PySwigObject_next(PyObject* v)
1462 #else
1463 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1464 #endif
1465 {
1466 PySwigObject *sobj = (PySwigObject *) v;
1467 if (sobj->next) {
1468 Py_INCREF(sobj->next);
1469 return sobj->next;
1470 } else {
1471 return SWIG_Py_Void();
1472 }
1473 }
1474
1475 SWIGINTERN PyObject*
1476 #ifdef METH_NOARGS
PySwigObject_disown(PyObject * v)1477 PySwigObject_disown(PyObject *v)
1478 #else
1479 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1480 #endif
1481 {
1482 PySwigObject *sobj = (PySwigObject *)v;
1483 sobj->own = 0;
1484 return SWIG_Py_Void();
1485 }
1486
1487 SWIGINTERN PyObject*
1488 #ifdef METH_NOARGS
PySwigObject_acquire(PyObject * v)1489 PySwigObject_acquire(PyObject *v)
1490 #else
1491 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1492 #endif
1493 {
1494 PySwigObject *sobj = (PySwigObject *)v;
1495 sobj->own = SWIG_POINTER_OWN;
1496 return SWIG_Py_Void();
1497 }
1498
1499 SWIGINTERN PyObject*
PySwigObject_own(PyObject * v,PyObject * args)1500 PySwigObject_own(PyObject *v, PyObject *args)
1501 {
1502 PyObject *val = 0;
1503 #if (PY_VERSION_HEX < 0x02020000)
1504 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1505 #else
1506 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1507 #endif
1508 {
1509 return NULL;
1510 }
1511 else
1512 {
1513 PySwigObject *sobj = (PySwigObject *)v;
1514 PyObject *obj = PyBool_FromLong(sobj->own);
1515 if (val) {
1516 #ifdef METH_NOARGS
1517 if (PyObject_IsTrue(val)) {
1518 PySwigObject_acquire(v);
1519 } else {
1520 PySwigObject_disown(v);
1521 }
1522 #else
1523 if (PyObject_IsTrue(val)) {
1524 PySwigObject_acquire(v,args);
1525 } else {
1526 PySwigObject_disown(v,args);
1527 }
1528 #endif
1529 }
1530 return obj;
1531 }
1532 }
1533
1534 #ifdef METH_O
1535 static PyMethodDef
1536 swigobject_methods[] = {
1537 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1538 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
1539 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1540 {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"},
1541 {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1542 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"},
1543 {0, 0, 0, 0}
1544 };
1545 #else
1546 static PyMethodDef
1547 swigobject_methods[] = {
1548 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1549 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1550 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1551 {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1552 {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1553 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"},
1554 {0, 0, 0, 0}
1555 };
1556 #endif
1557
1558 #if PY_VERSION_HEX < 0x02020000
1559 SWIGINTERN PyObject *
PySwigObject_getattr(PySwigObject * sobj,char * name)1560 PySwigObject_getattr(PySwigObject *sobj,char *name)
1561 {
1562 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1563 }
1564 #endif
1565
1566 SWIGRUNTIME PyTypeObject*
_PySwigObject_type(void)1567 _PySwigObject_type(void) {
1568 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1569
1570 static PyNumberMethods PySwigObject_as_number = {
1571 (binaryfunc)0, /*nb_add*/
1572 (binaryfunc)0, /*nb_subtract*/
1573 (binaryfunc)0, /*nb_multiply*/
1574 (binaryfunc)0, /*nb_divide*/
1575 (binaryfunc)0, /*nb_remainder*/
1576 (binaryfunc)0, /*nb_divmod*/
1577 (ternaryfunc)0,/*nb_power*/
1578 (unaryfunc)0, /*nb_negative*/
1579 (unaryfunc)0, /*nb_positive*/
1580 (unaryfunc)0, /*nb_absolute*/
1581 (inquiry)0, /*nb_nonzero*/
1582 0, /*nb_invert*/
1583 0, /*nb_lshift*/
1584 0, /*nb_rshift*/
1585 0, /*nb_and*/
1586 0, /*nb_xor*/
1587 0, /*nb_or*/
1588 (coercion)0, /*nb_coerce*/
1589 (unaryfunc)PySwigObject_long, /*nb_int*/
1590 (unaryfunc)PySwigObject_long, /*nb_long*/
1591 (unaryfunc)0, /*nb_float*/
1592 (unaryfunc)PySwigObject_oct, /*nb_oct*/
1593 (unaryfunc)PySwigObject_hex, /*nb_hex*/
1594 #if PY_VERSION_HEX >= 0x02020000
1595 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1596 #elif PY_VERSION_HEX >= 0x02000000
1597 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1598 #endif
1599 };
1600
1601 static PyTypeObject pyswigobject_type;
1602 static int type_init = 0;
1603 if (!type_init) {
1604 const PyTypeObject tmp
1605 = {
1606 PyObject_HEAD_INIT(NULL)
1607 0, /* ob_size */
1608 (char *)"PySwigObject", /* tp_name */
1609 sizeof(PySwigObject), /* tp_basicsize */
1610 0, /* tp_itemsize */
1611 (destructor)PySwigObject_dealloc, /* tp_dealloc */
1612 (printfunc)PySwigObject_print, /* tp_print */
1613 #if PY_VERSION_HEX < 0x02020000
1614 (getattrfunc)PySwigObject_getattr, /* tp_getattr */
1615 #else
1616 (getattrfunc)0, /* tp_getattr */
1617 #endif
1618 (setattrfunc)0, /* tp_setattr */
1619 (cmpfunc)PySwigObject_compare, /* tp_compare */
1620 (reprfunc)PySwigObject_repr, /* tp_repr */
1621 &PySwigObject_as_number, /* tp_as_number */
1622 0, /* tp_as_sequence */
1623 0, /* tp_as_mapping */
1624 (hashfunc)0, /* tp_hash */
1625 (ternaryfunc)0, /* tp_call */
1626 (reprfunc)PySwigObject_str, /* tp_str */
1627 PyObject_GenericGetAttr, /* tp_getattro */
1628 0, /* tp_setattro */
1629 0, /* tp_as_buffer */
1630 Py_TPFLAGS_DEFAULT, /* tp_flags */
1631 swigobject_doc, /* tp_doc */
1632 0, /* tp_traverse */
1633 0, /* tp_clear */
1634 0, /* tp_richcompare */
1635 0, /* tp_weaklistoffset */
1636 #if PY_VERSION_HEX >= 0x02020000
1637 0, /* tp_iter */
1638 0, /* tp_iternext */
1639 swigobject_methods, /* tp_methods */
1640 0, /* tp_members */
1641 0, /* tp_getset */
1642 0, /* tp_base */
1643 0, /* tp_dict */
1644 0, /* tp_descr_get */
1645 0, /* tp_descr_set */
1646 0, /* tp_dictoffset */
1647 0, /* tp_init */
1648 0, /* tp_alloc */
1649 0, /* tp_new */
1650 0, /* tp_free */
1651 0, /* tp_is_gc */
1652 0, /* tp_bases */
1653 0, /* tp_mro */
1654 0, /* tp_cache */
1655 0, /* tp_subclasses */
1656 0, /* tp_weaklist */
1657 #endif
1658 #if PY_VERSION_HEX >= 0x02030000
1659 0, /* tp_del */
1660 #endif
1661 #ifdef COUNT_ALLOCS
1662 0,0,0,0 /* tp_alloc -> tp_next */
1663 #endif
1664 };
1665 pyswigobject_type = tmp;
1666 pyswigobject_type.ob_type = &PyType_Type;
1667 type_init = 1;
1668 }
1669 return &pyswigobject_type;
1670 }
1671
1672 SWIGRUNTIME PyObject *
PySwigObject_New(void * ptr,swig_type_info * ty,int own)1673 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
1674 {
1675 PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
1676 if (sobj) {
1677 sobj->ptr = ptr;
1678 sobj->ty = ty;
1679 sobj->own = own;
1680 sobj->next = 0;
1681 }
1682 return (PyObject *)sobj;
1683 }
1684
1685 /* -----------------------------------------------------------------------------
1686 * Implements a simple Swig Packed type, and use it instead of string
1687 * ----------------------------------------------------------------------------- */
1688
1689 typedef struct {
1690 PyObject_HEAD
1691 void *pack;
1692 swig_type_info *ty;
1693 size_t size;
1694 } PySwigPacked;
1695
1696 SWIGRUNTIME int
PySwigPacked_print(PySwigPacked * v,FILE * fp,int SWIGUNUSEDPARM (flags))1697 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1698 {
1699 char result[SWIG_BUFFER_SIZE];
1700 fputs("<Swig Packed ", fp);
1701 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1702 fputs("at ", fp);
1703 fputs(result, fp);
1704 }
1705 fputs(v->ty->name,fp);
1706 fputs(">", fp);
1707 return 0;
1708 }
1709
1710 SWIGRUNTIME PyObject *
PySwigPacked_repr(PySwigPacked * v)1711 PySwigPacked_repr(PySwigPacked *v)
1712 {
1713 char result[SWIG_BUFFER_SIZE];
1714 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1715 return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1716 } else {
1717 return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
1718 }
1719 }
1720
1721 SWIGRUNTIME PyObject *
PySwigPacked_str(PySwigPacked * v)1722 PySwigPacked_str(PySwigPacked *v)
1723 {
1724 char result[SWIG_BUFFER_SIZE];
1725 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1726 return PyString_FromFormat("%s%s", result, v->ty->name);
1727 } else {
1728 return PyString_FromString(v->ty->name);
1729 }
1730 }
1731
1732 SWIGRUNTIME int
PySwigPacked_compare(PySwigPacked * v,PySwigPacked * w)1733 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
1734 {
1735 size_t i = v->size;
1736 size_t j = w->size;
1737 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1738 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1739 }
1740
1741 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1742
1743 SWIGRUNTIME PyTypeObject*
PySwigPacked_type(void)1744 PySwigPacked_type(void) {
1745 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1746 return type;
1747 }
1748
1749 SWIGRUNTIMEINLINE int
PySwigPacked_Check(PyObject * op)1750 PySwigPacked_Check(PyObject *op) {
1751 return ((op)->ob_type == _PySwigPacked_type())
1752 || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
1753 }
1754
1755 SWIGRUNTIME void
PySwigPacked_dealloc(PyObject * v)1756 PySwigPacked_dealloc(PyObject *v)
1757 {
1758 if (PySwigPacked_Check(v)) {
1759 PySwigPacked *sobj = (PySwigPacked *) v;
1760 free(sobj->pack);
1761 }
1762 PyObject_DEL(v);
1763 }
1764
1765 SWIGRUNTIME PyTypeObject*
_PySwigPacked_type(void)1766 _PySwigPacked_type(void) {
1767 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1768 static PyTypeObject pyswigpacked_type;
1769 static int type_init = 0;
1770 if (!type_init) {
1771 const PyTypeObject tmp
1772 = {
1773 PyObject_HEAD_INIT(NULL)
1774 0, /* ob_size */
1775 (char *)"PySwigPacked", /* tp_name */
1776 sizeof(PySwigPacked), /* tp_basicsize */
1777 0, /* tp_itemsize */
1778 (destructor)PySwigPacked_dealloc, /* tp_dealloc */
1779 (printfunc)PySwigPacked_print, /* tp_print */
1780 (getattrfunc)0, /* tp_getattr */
1781 (setattrfunc)0, /* tp_setattr */
1782 (cmpfunc)PySwigPacked_compare, /* tp_compare */
1783 (reprfunc)PySwigPacked_repr, /* tp_repr */
1784 0, /* tp_as_number */
1785 0, /* tp_as_sequence */
1786 0, /* tp_as_mapping */
1787 (hashfunc)0, /* tp_hash */
1788 (ternaryfunc)0, /* tp_call */
1789 (reprfunc)PySwigPacked_str, /* tp_str */
1790 PyObject_GenericGetAttr, /* tp_getattro */
1791 0, /* tp_setattro */
1792 0, /* tp_as_buffer */
1793 Py_TPFLAGS_DEFAULT, /* tp_flags */
1794 swigpacked_doc, /* tp_doc */
1795 0, /* tp_traverse */
1796 0, /* tp_clear */
1797 0, /* tp_richcompare */
1798 0, /* tp_weaklistoffset */
1799 #if PY_VERSION_HEX >= 0x02020000
1800 0, /* tp_iter */
1801 0, /* tp_iternext */
1802 0, /* tp_methods */
1803 0, /* tp_members */
1804 0, /* tp_getset */
1805 0, /* tp_base */
1806 0, /* tp_dict */
1807 0, /* tp_descr_get */
1808 0, /* tp_descr_set */
1809 0, /* tp_dictoffset */
1810 0, /* tp_init */
1811 0, /* tp_alloc */
1812 0, /* tp_new */
1813 0, /* tp_free */
1814 0, /* tp_is_gc */
1815 0, /* tp_bases */
1816 0, /* tp_mro */
1817 0, /* tp_cache */
1818 0, /* tp_subclasses */
1819 0, /* tp_weaklist */
1820 #endif
1821 #if PY_VERSION_HEX >= 0x02030000
1822 0, /* tp_del */
1823 #endif
1824 #ifdef COUNT_ALLOCS
1825 0,0,0,0 /* tp_alloc -> tp_next */
1826 #endif
1827 };
1828 pyswigpacked_type = tmp;
1829 pyswigpacked_type.ob_type = &PyType_Type;
1830 type_init = 1;
1831 }
1832 return &pyswigpacked_type;
1833 }
1834
1835 SWIGRUNTIME PyObject *
PySwigPacked_New(void * ptr,size_t size,swig_type_info * ty)1836 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
1837 {
1838 PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
1839 if (sobj) {
1840 void *pack = malloc(size);
1841 if (pack) {
1842 memcpy(pack, ptr, size);
1843 sobj->pack = pack;
1844 sobj->ty = ty;
1845 sobj->size = size;
1846 } else {
1847 PyObject_DEL((PyObject *) sobj);
1848 sobj = 0;
1849 }
1850 }
1851 return (PyObject *) sobj;
1852 }
1853
1854 SWIGRUNTIME swig_type_info *
PySwigPacked_UnpackData(PyObject * obj,void * ptr,size_t size)1855 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1856 {
1857 if (PySwigPacked_Check(obj)) {
1858 PySwigPacked *sobj = (PySwigPacked *)obj;
1859 if (sobj->size != size) return 0;
1860 memcpy(ptr, sobj->pack, size);
1861 return sobj->ty;
1862 } else {
1863 return 0;
1864 }
1865 }
1866
1867 /* -----------------------------------------------------------------------------
1868 * pointers/data manipulation
1869 * ----------------------------------------------------------------------------- */
1870
1871 SWIGRUNTIMEINLINE PyObject *
_SWIG_This(void)1872 _SWIG_This(void)
1873 {
1874 return PyString_FromString("this");
1875 }
1876
1877 SWIGRUNTIME PyObject *
SWIG_This(void)1878 SWIG_This(void)
1879 {
1880 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
1881 return swig_this;
1882 }
1883
1884 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1885
1886 SWIGRUNTIME PySwigObject *
SWIG_Python_GetSwigThis(PyObject * pyobj)1887 SWIG_Python_GetSwigThis(PyObject *pyobj)
1888 {
1889 if (PySwigObject_Check(pyobj)) {
1890 return (PySwigObject *) pyobj;
1891 } else {
1892 PyObject *obj = 0;
1893 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
1894 if (PyInstance_Check(pyobj)) {
1895 obj = _PyInstance_Lookup(pyobj, SWIG_This());
1896 } else {
1897 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
1898 if (dictptr != NULL) {
1899 PyObject *dict = *dictptr;
1900 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
1901 } else {
1902 #ifdef PyWeakref_CheckProxy
1903 if (PyWeakref_CheckProxy(pyobj)) {
1904 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
1905 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
1906 }
1907 #endif
1908 obj = PyObject_GetAttr(pyobj,SWIG_This());
1909 if (obj) {
1910 Py_DECREF(obj);
1911 } else {
1912 if (PyErr_Occurred()) PyErr_Clear();
1913 return 0;
1914 }
1915 }
1916 }
1917 #else
1918 obj = PyObject_GetAttr(pyobj,SWIG_This());
1919 if (obj) {
1920 Py_DECREF(obj);
1921 } else {
1922 if (PyErr_Occurred()) PyErr_Clear();
1923 return 0;
1924 }
1925 #endif
1926 if (obj && !PySwigObject_Check(obj)) {
1927 /* a PyObject is called 'this', try to get the 'real this'
1928 PySwigObject from it */
1929 return SWIG_Python_GetSwigThis(obj);
1930 }
1931 return (PySwigObject *)obj;
1932 }
1933 }
1934
1935 /* Acquire a pointer value */
1936
1937 SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject * obj,int own)1938 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
1939 if (own) {
1940 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1941 if (sobj) {
1942 int oldown = sobj->own;
1943 sobj->own = own;
1944 return oldown;
1945 }
1946 }
1947 return 0;
1948 }
1949
1950 /* Convert a pointer value */
1951
1952 SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject * obj,void ** ptr,swig_type_info * ty,int flags,int * own)1953 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
1954 if (!obj) return SWIG_ERROR;
1955 if (obj == Py_None) {
1956 if (ptr) *ptr = 0;
1957 return SWIG_OK;
1958 } else {
1959 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1960 while (sobj) {
1961 void *vptr = sobj->ptr;
1962 if (ty) {
1963 swig_type_info *to = sobj->ty;
1964 if (to == ty) {
1965 /* no type cast needed */
1966 if (ptr) *ptr = vptr;
1967 break;
1968 } else {
1969 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
1970 if (!tc) {
1971 sobj = (PySwigObject *)sobj->next;
1972 } else {
1973 if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
1974 break;
1975 }
1976 }
1977 } else {
1978 if (ptr) *ptr = vptr;
1979 break;
1980 }
1981 }
1982 if (sobj) {
1983 if (own) *own = sobj->own;
1984 if (flags & SWIG_POINTER_DISOWN) {
1985 sobj->own = 0;
1986 }
1987 return SWIG_OK;
1988 } else {
1989 int res = SWIG_ERROR;
1990 if (flags & SWIG_POINTER_IMPLICIT_CONV) {
1991 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1992 if (data && !data->implicitconv) {
1993 PyObject *klass = data->klass;
1994 if (klass) {
1995 PyObject *impconv;
1996 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
1997 impconv = SWIG_Python_CallFunctor(klass, obj);
1998 data->implicitconv = 0;
1999 if (PyErr_Occurred()) {
2000 PyErr_Clear();
2001 impconv = 0;
2002 }
2003 if (impconv) {
2004 PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
2005 if (iobj) {
2006 void *vptr;
2007 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2008 if (SWIG_IsOK(res)) {
2009 if (ptr) {
2010 *ptr = vptr;
2011 /* transfer the ownership to 'ptr' */
2012 iobj->own = 0;
2013 res = SWIG_AddCast(res);
2014 res = SWIG_AddNewMask(res);
2015 } else {
2016 res = SWIG_AddCast(res);
2017 }
2018 }
2019 }
2020 Py_DECREF(impconv);
2021 }
2022 }
2023 }
2024 }
2025 return res;
2026 }
2027 }
2028 }
2029
2030 /* Convert a function ptr value */
2031
2032 SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject * obj,void ** ptr,swig_type_info * ty)2033 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2034 if (!PyCFunction_Check(obj)) {
2035 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2036 } else {
2037 void *vptr = 0;
2038
2039 /* here we get the method pointer for callbacks */
2040 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2041 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2042 if (desc) {
2043 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2044 if (!desc) return SWIG_ERROR;
2045 }
2046 if (ty) {
2047 swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2048 if (!tc) return SWIG_ERROR;
2049 *ptr = SWIG_TypeCast(tc,vptr);
2050 } else {
2051 *ptr = vptr;
2052 }
2053 return SWIG_OK;
2054 }
2055 }
2056
2057 /* Convert a packed value value */
2058
2059 SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject * obj,void * ptr,size_t sz,swig_type_info * ty)2060 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2061 swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
2062 if (!to) return SWIG_ERROR;
2063 if (ty) {
2064 if (to != ty) {
2065 /* check type cast? */
2066 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2067 if (!tc) return SWIG_ERROR;
2068 }
2069 }
2070 return SWIG_OK;
2071 }
2072
2073 /* -----------------------------------------------------------------------------
2074 * Create a new pointer object
2075 * ----------------------------------------------------------------------------- */
2076
2077 /*
2078 Create a new instance object, whitout calling __init__, and set the
2079 'this' attribute.
2080 */
2081
2082 SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(PySwigClientData * data,PyObject * swig_this)2083 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
2084 {
2085 #if (PY_VERSION_HEX >= 0x02020000)
2086 PyObject *inst = 0;
2087 PyObject *newraw = data->newraw;
2088 if (newraw) {
2089 inst = PyObject_Call(newraw, data->newargs, NULL);
2090 if (inst) {
2091 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2092 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2093 if (dictptr != NULL) {
2094 PyObject *dict = *dictptr;
2095 if (dict == NULL) {
2096 dict = PyDict_New();
2097 *dictptr = dict;
2098 PyDict_SetItem(dict, SWIG_This(), swig_this);
2099 }
2100 }
2101 #else
2102 PyObject *key = SWIG_This();
2103 PyObject_SetAttr(inst, key, swig_this);
2104 #endif
2105 }
2106 } else {
2107 PyObject *dict = PyDict_New();
2108 PyDict_SetItem(dict, SWIG_This(), swig_this);
2109 inst = PyInstance_NewRaw(data->newargs, dict);
2110 Py_DECREF(dict);
2111 }
2112 return inst;
2113 #else
2114 #if (PY_VERSION_HEX >= 0x02010000)
2115 PyObject *inst;
2116 PyObject *dict = PyDict_New();
2117 PyDict_SetItem(dict, SWIG_This(), swig_this);
2118 inst = PyInstance_NewRaw(data->newargs, dict);
2119 Py_DECREF(dict);
2120 return (PyObject *) inst;
2121 #else
2122 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2123 if (inst == NULL) {
2124 return NULL;
2125 }
2126 inst->in_class = (PyClassObject *)data->newargs;
2127 Py_INCREF(inst->in_class);
2128 inst->in_dict = PyDict_New();
2129 if (inst->in_dict == NULL) {
2130 Py_DECREF(inst);
2131 return NULL;
2132 }
2133 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2134 inst->in_weakreflist = NULL;
2135 #endif
2136 #ifdef Py_TPFLAGS_GC
2137 PyObject_GC_Init(inst);
2138 #endif
2139 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2140 return (PyObject *) inst;
2141 #endif
2142 #endif
2143 }
2144
2145 SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject * inst,PyObject * swig_this)2146 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2147 {
2148 PyObject *dict;
2149 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2150 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2151 if (dictptr != NULL) {
2152 dict = *dictptr;
2153 if (dict == NULL) {
2154 dict = PyDict_New();
2155 *dictptr = dict;
2156 }
2157 PyDict_SetItem(dict, SWIG_This(), swig_this);
2158 return;
2159 }
2160 #endif
2161 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2162 PyDict_SetItem(dict, SWIG_This(), swig_this);
2163 Py_DECREF(dict);
2164 }
2165
2166
2167 SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject * args)2168 SWIG_Python_InitShadowInstance(PyObject *args) {
2169 PyObject *obj[2];
2170 if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2171 return NULL;
2172 } else {
2173 PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2174 if (sthis) {
2175 PySwigObject_append((PyObject*) sthis, obj[1]);
2176 } else {
2177 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2178 }
2179 return SWIG_Py_Void();
2180 }
2181 }
2182
2183 /* Create a new pointer object */
2184
2185 SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(void * ptr,swig_type_info * type,int flags)2186 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2187 if (!ptr) {
2188 return SWIG_Py_Void();
2189 } else {
2190 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2191 PyObject *robj = PySwigObject_New(ptr, type, own);
2192 PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
2193 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2194 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2195 if (inst) {
2196 Py_DECREF(robj);
2197 robj = inst;
2198 }
2199 }
2200 return robj;
2201 }
2202 }
2203
2204 /* Create a new packed object */
2205
2206 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void * ptr,size_t sz,swig_type_info * type)2207 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2208 return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2209 }
2210
2211 /* -----------------------------------------------------------------------------*
2212 * Get type list
2213 * -----------------------------------------------------------------------------*/
2214
2215 #ifdef SWIG_LINK_RUNTIME
2216 void *SWIG_ReturnGlobalTypeList(void *);
2217 #endif
2218
2219 SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void)2220 SWIG_Python_GetModule(void) {
2221 static void *type_pointer = (void *)0;
2222 /* first check if module already created */
2223 if (!type_pointer) {
2224 #ifdef SWIG_LINK_RUNTIME
2225 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2226 #else
2227 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2228 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2229 if (PyErr_Occurred()) {
2230 PyErr_Clear();
2231 type_pointer = (void *)0;
2232 }
2233 #endif
2234 }
2235 return (swig_module_info *) type_pointer;
2236 }
2237
2238 #if PY_MAJOR_VERSION < 2
2239 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2240 is copied out of Python/modsupport.c in python version 2.3.4 */
2241 SWIGINTERN int
PyModule_AddObject(PyObject * m,char * name,PyObject * o)2242 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2243 {
2244 PyObject *dict;
2245 if (!PyModule_Check(m)) {
2246 PyErr_SetString(PyExc_TypeError,
2247 "PyModule_AddObject() needs module as first arg");
2248 return SWIG_ERROR;
2249 }
2250 if (!o) {
2251 PyErr_SetString(PyExc_TypeError,
2252 "PyModule_AddObject() needs non-NULL value");
2253 return SWIG_ERROR;
2254 }
2255
2256 dict = PyModule_GetDict(m);
2257 if (dict == NULL) {
2258 /* Internal error -- modules must have a dict! */
2259 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2260 PyModule_GetName(m));
2261 return SWIG_ERROR;
2262 }
2263 if (PyDict_SetItemString(dict, name, o))
2264 return SWIG_ERROR;
2265 Py_DECREF(o);
2266 return SWIG_OK;
2267 }
2268 #endif
2269
2270 SWIGRUNTIME void
SWIG_Python_DestroyModule(void * vptr)2271 SWIG_Python_DestroyModule(void *vptr)
2272 {
2273 swig_module_info *swig_module = (swig_module_info *) vptr;
2274 swig_type_info **types = swig_module->types;
2275 size_t i;
2276 for (i =0; i < swig_module->size; ++i) {
2277 swig_type_info *ty = types[i];
2278 if (ty->owndata) {
2279 PySwigClientData *data = (PySwigClientData *) ty->clientdata;
2280 if (data) PySwigClientData_Del(data);
2281 }
2282 }
2283 Py_DECREF(SWIG_This());
2284 }
2285
2286 SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info * swig_module)2287 SWIG_Python_SetModule(swig_module_info *swig_module) {
2288 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2289
2290 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2291 swig_empty_runtime_method_table);
2292 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2293 if (pointer && module) {
2294 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2295 } else {
2296 Py_XDECREF(pointer);
2297 }
2298 }
2299
2300 /* The python cached type query */
2301 SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void)2302 SWIG_Python_TypeCache(void) {
2303 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2304 return cache;
2305 }
2306
2307 SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char * type)2308 SWIG_Python_TypeQuery(const char *type)
2309 {
2310 PyObject *cache = SWIG_Python_TypeCache();
2311 PyObject *key = PyString_FromString(type);
2312 PyObject *obj = PyDict_GetItem(cache, key);
2313 swig_type_info *descriptor;
2314 if (obj) {
2315 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2316 } else {
2317 swig_module_info *swig_module = SWIG_Python_GetModule();
2318 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2319 if (descriptor) {
2320 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2321 PyDict_SetItem(cache, key, obj);
2322 Py_DECREF(obj);
2323 }
2324 }
2325 Py_DECREF(key);
2326 return descriptor;
2327 }
2328
2329 /*
2330 For backward compatibility only
2331 */
2332 #define SWIG_POINTER_EXCEPTION 0
2333 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2334 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2335
2336 SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char * mesg,int infront)2337 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2338 {
2339 if (PyErr_Occurred()) {
2340 PyObject *type = 0;
2341 PyObject *value = 0;
2342 PyObject *traceback = 0;
2343 PyErr_Fetch(&type, &value, &traceback);
2344 if (value) {
2345 PyObject *old_str = PyObject_Str(value);
2346 Py_XINCREF(type);
2347 PyErr_Clear();
2348 if (infront) {
2349 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
2350 } else {
2351 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
2352 }
2353 Py_DECREF(old_str);
2354 }
2355 return 1;
2356 } else {
2357 return 0;
2358 }
2359 }
2360
2361 SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)2362 SWIG_Python_ArgFail(int argnum)
2363 {
2364 if (PyErr_Occurred()) {
2365 /* add information about failing argument */
2366 char mesg[256];
2367 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2368 return SWIG_Python_AddErrMesg(mesg, 1);
2369 } else {
2370 return 0;
2371 }
2372 }
2373
2374 SWIGRUNTIMEINLINE const char *
PySwigObject_GetDesc(PyObject * self)2375 PySwigObject_GetDesc(PyObject *self)
2376 {
2377 PySwigObject *v = (PySwigObject *)self;
2378 swig_type_info *ty = v ? v->ty : 0;
2379 return ty ? ty->str : (char*)"";
2380 }
2381
2382 SWIGRUNTIME void
SWIG_Python_TypeError(const char * type,PyObject * obj)2383 SWIG_Python_TypeError(const char *type, PyObject *obj)
2384 {
2385 if (type) {
2386 #if defined(SWIG_COBJECT_TYPES)
2387 if (obj && PySwigObject_Check(obj)) {
2388 const char *otype = (const char *) PySwigObject_GetDesc(obj);
2389 if (otype) {
2390 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
2391 type, otype);
2392 return;
2393 }
2394 } else
2395 #endif
2396 {
2397 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2398 if (otype) {
2399 PyObject *str = PyObject_Str(obj);
2400 const char *cstr = str ? PyString_AsString(str) : 0;
2401 if (cstr) {
2402 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2403 type, otype, cstr);
2404 } else {
2405 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2406 type, otype);
2407 }
2408 Py_XDECREF(str);
2409 return;
2410 }
2411 }
2412 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2413 } else {
2414 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2415 }
2416 }
2417
2418
2419 /* Convert a pointer value, signal an exception on a type mismatch */
2420 SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject * obj,swig_type_info * ty,int argnum,int flags)2421 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2422 void *result;
2423 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2424 PyErr_Clear();
2425 if (flags & SWIG_POINTER_EXCEPTION) {
2426 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2427 SWIG_Python_ArgFail(argnum);
2428 }
2429 }
2430 return result;
2431 }
2432
2433
2434 #ifdef __cplusplus
2435 #if 0
2436 { /* cc-mode */
2437 #endif
2438 }
2439 #endif
2440
2441
2442
2443 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2444
2445 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2446
2447
2448
2449 /* -------- TYPES TABLE (BEGIN) -------- */
2450
2451 #define SWIGTYPE_p_AtomForce swig_types[0]
2452 #define SWIGTYPE_p_FEMparm swig_types[1]
2453 #define SWIGTYPE_p_MGparm swig_types[2]
2454 #define SWIGTYPE_p_NOsh swig_types[3]
2455 #define SWIGTYPE_p_NOsh_PrintType swig_types[4]
2456 #define SWIGTYPE_p_NOsh_calc swig_types[5]
2457 #define SWIGTYPE_p_PBEparm swig_types[6]
2458 #define SWIGTYPE_p_Vacc swig_types[7]
2459 #define SWIGTYPE_p_Valist swig_types[8]
2460 #define SWIGTYPE_p_Vatom swig_types[9]
2461 #define SWIGTYPE_p_Vcom swig_types[10]
2462 #define SWIGTYPE_p_Vmem swig_types[11]
2463 #define SWIGTYPE_p_Vparam swig_types[12]
2464 #define SWIGTYPE_p_Vpbe swig_types[13]
2465 #define SWIGTYPE_p_Vpmg swig_types[14]
2466 #define SWIGTYPE_p_char swig_types[15]
2467 #define SWIGTYPE_p_double swig_types[16]
2468 #define SWIGTYPE_p_int swig_types[17]
2469 #define SWIGTYPE_p_p_AtomForce swig_types[18]
2470 #define SWIGTYPE_p_p_Valist swig_types[19]
2471 #define SWIGTYPE_p_p_Vgrid swig_types[20]
2472 #define SWIGTYPE_p_p_Vpbe swig_types[21]
2473 #define SWIGTYPE_p_p_Vpmg swig_types[22]
2474 #define SWIGTYPE_p_p_Vpmgp swig_types[23]
2475 static swig_type_info *swig_types[25];
2476 static swig_module_info swig_module = {swig_types, 24, 0, 0, 0, 0};
2477 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2478 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2479
2480 /* -------- TYPES TABLE (END) -------- */
2481
2482 #if (PY_VERSION_HEX <= 0x02000000)
2483 # if !defined(SWIG_PYTHON_CLASSIC)
2484 # error "This python version requires swig to be run with the '-classic' option"
2485 # endif
2486 #endif
2487
2488 /*-----------------------------------------------
2489 @(target):= _apbslib.so
2490 ------------------------------------------------*/
2491 #define SWIG_init init_apbslib
2492
2493 #define SWIG_name "_apbslib"
2494
2495 #define SWIGVERSION 0x010331
2496 #define SWIG_VERSION SWIGVERSION
2497
2498
2499 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
2500 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
2501
2502
2503 #define APBS_SWIG 1
2504 #include "maloc/maloc.h"
2505 #include "apbscfg.h"
2506 #include "routines.h"
2507 #include "apbs/valist.h"
2508 #include "apbs/vatom.h"
2509
2510
2511 #include <limits.h>
2512 #ifndef LLONG_MIN
2513 # define LLONG_MIN LONG_LONG_MIN
2514 #endif
2515 #ifndef LLONG_MAX
2516 # define LLONG_MAX LONG_LONG_MAX
2517 #endif
2518 #ifndef ULLONG_MAX
2519 # define ULLONG_MAX ULONG_LONG_MAX
2520 #endif
2521
2522
2523 SWIGINTERN int
SWIG_AsVal_double(PyObject * obj,double * val)2524 SWIG_AsVal_double (PyObject *obj, double *val)
2525 {
2526 int res = SWIG_TypeError;
2527 if (PyFloat_Check(obj)) {
2528 if (val) *val = PyFloat_AsDouble(obj);
2529 return SWIG_OK;
2530 } else if (PyInt_Check(obj)) {
2531 if (val) *val = PyInt_AsLong(obj);
2532 return SWIG_OK;
2533 } else if (PyLong_Check(obj)) {
2534 double v = PyLong_AsDouble(obj);
2535 if (!PyErr_Occurred()) {
2536 if (val) *val = v;
2537 return SWIG_OK;
2538 } else {
2539 PyErr_Clear();
2540 }
2541 }
2542 #ifdef SWIG_PYTHON_CAST_MODE
2543 {
2544 int dispatch = 0;
2545 double d = PyFloat_AsDouble(obj);
2546 if (!PyErr_Occurred()) {
2547 if (val) *val = d;
2548 return SWIG_AddCast(SWIG_OK);
2549 } else {
2550 PyErr_Clear();
2551 }
2552 if (!dispatch) {
2553 long v = PyLong_AsLong(obj);
2554 if (!PyErr_Occurred()) {
2555 if (val) *val = v;
2556 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
2557 } else {
2558 PyErr_Clear();
2559 }
2560 }
2561 }
2562 #endif
2563 return res;
2564 }
2565
2566
2567 #include <float.h>
2568
2569
2570 #include <math.h>
2571
2572
2573 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)2574 SWIG_CanCastAsInteger(double *d, double min, double max) {
2575 double x = *d;
2576 if ((min <= x && x <= max)) {
2577 double fx = floor(x);
2578 double cx = ceil(x);
2579 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
2580 if ((errno == EDOM) || (errno == ERANGE)) {
2581 errno = 0;
2582 } else {
2583 double summ, reps, diff;
2584 if (rd < x) {
2585 diff = x - rd;
2586 } else if (rd > x) {
2587 diff = rd - x;
2588 } else {
2589 return 1;
2590 }
2591 summ = rd + x;
2592 reps = diff/summ;
2593 if (reps < 8*DBL_EPSILON) {
2594 *d = rd;
2595 return 1;
2596 }
2597 }
2598 }
2599 return 0;
2600 }
2601
2602
2603 SWIGINTERN int
SWIG_AsVal_long(PyObject * obj,long * val)2604 SWIG_AsVal_long (PyObject *obj, long* val)
2605 {
2606 if (PyInt_Check(obj)) {
2607 if (val) *val = PyInt_AsLong(obj);
2608 return SWIG_OK;
2609 } else if (PyLong_Check(obj)) {
2610 long v = PyLong_AsLong(obj);
2611 if (!PyErr_Occurred()) {
2612 if (val) *val = v;
2613 return SWIG_OK;
2614 } else {
2615 PyErr_Clear();
2616 }
2617 }
2618 #ifdef SWIG_PYTHON_CAST_MODE
2619 {
2620 int dispatch = 0;
2621 long v = PyInt_AsLong(obj);
2622 if (!PyErr_Occurred()) {
2623 if (val) *val = v;
2624 return SWIG_AddCast(SWIG_OK);
2625 } else {
2626 PyErr_Clear();
2627 }
2628 if (!dispatch) {
2629 double d;
2630 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
2631 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
2632 if (val) *val = (long)(d);
2633 return res;
2634 }
2635 }
2636 }
2637 #endif
2638 return SWIG_TypeError;
2639 }
2640
2641
2642 SWIGINTERN int
SWIG_AsVal_int(PyObject * obj,int * val)2643 SWIG_AsVal_int (PyObject * obj, int *val)
2644 {
2645 long v;
2646 int res = SWIG_AsVal_long (obj, &v);
2647 if (SWIG_IsOK(res)) {
2648 if ((v < INT_MIN || v > INT_MAX)) {
2649 return SWIG_OverflowError;
2650 } else {
2651 if (val) *val = (int)(v);
2652 }
2653 }
2654 return res;
2655 }
2656
2657
2658 #define SWIG_From_long PyInt_FromLong
2659
2660
2661 SWIGINTERNINLINE PyObject *
SWIG_From_int(int value)2662 SWIG_From_int (int value)
2663 {
2664 return SWIG_From_long (value);
2665 }
2666
2667
2668 #define SWIG_From_double PyFloat_FromDouble
2669
2670
2671 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)2672 SWIG_pchar_descriptor(void)
2673 {
2674 static int init = 0;
2675 static swig_type_info* info = 0;
2676 if (!init) {
2677 info = SWIG_TypeQuery("_p_char");
2678 init = 1;
2679 }
2680 return info;
2681 }
2682
2683
2684 SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject * obj,char ** cptr,size_t * psize,int * alloc)2685 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
2686 {
2687 if (PyString_Check(obj)) {
2688 char *cstr; Py_ssize_t len;
2689 PyString_AsStringAndSize(obj, &cstr, &len);
2690 if (cptr) {
2691 if (alloc) {
2692 /*
2693 In python the user should not be able to modify the inner
2694 string representation. To warranty that, if you define
2695 SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
2696 buffer is always returned.
2697
2698 The default behavior is just to return the pointer value,
2699 so, be careful.
2700 */
2701 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
2702 if (*alloc != SWIG_OLDOBJ)
2703 #else
2704 if (*alloc == SWIG_NEWOBJ)
2705 #endif
2706 {
2707 *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
2708 *alloc = SWIG_NEWOBJ;
2709 }
2710 else {
2711 *cptr = cstr;
2712 *alloc = SWIG_OLDOBJ;
2713 }
2714 } else {
2715 *cptr = PyString_AsString(obj);
2716 }
2717 }
2718 if (psize) *psize = len + 1;
2719 return SWIG_OK;
2720 } else {
2721 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2722 if (pchar_descriptor) {
2723 void* vptr = 0;
2724 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
2725 if (cptr) *cptr = (char *) vptr;
2726 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
2727 if (alloc) *alloc = SWIG_OLDOBJ;
2728 return SWIG_OK;
2729 }
2730 }
2731 }
2732 return SWIG_TypeError;
2733 }
2734
2735
2736
2737
2738
2739 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)2740 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2741 {
2742 if (carray) {
2743 if (size > INT_MAX) {
2744 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2745 return pchar_descriptor ?
2746 SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
2747 } else {
2748 return PyString_FromStringAndSize(carray, (int)(size));
2749 }
2750 } else {
2751 return SWIG_Py_Void();
2752 }
2753 }
2754
2755
2756 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtr(const char * cptr)2757 SWIG_FromCharPtr(const char *cptr)
2758 {
2759 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2760 }
2761
2762
new_valist(int maxargs)2763 Valist **new_valist(int maxargs) {
2764 return (Valist **) malloc(maxargs*sizeof(Valist *));
2765 }
2766
get_Valist(Valist ** args,int n)2767 Valist *get_Valist(Valist **args, int n){
2768 return (Valist *)args[n];
2769 }
2770
new_gridlist(int maxargs)2771 Vgrid **new_gridlist(int maxargs) {
2772 return (Vgrid **) malloc(maxargs*sizeof(Vgrid *));
2773 }
2774
new_pmglist(int maxargs)2775 Vpmg **new_pmglist(int maxargs) {
2776 return (Vpmg **) malloc(maxargs*sizeof(Vpmg *));
2777 }
2778
get_Vpmg(Vpmg ** args,int n)2779 Vpmg *get_Vpmg(Vpmg **args, int n) {
2780 return (Vpmg *)args[n];
2781 }
2782
new_pmgplist(int maxargs)2783 Vpmgp **new_pmgplist(int maxargs) {
2784 return (Vpmgp **) malloc(maxargs*sizeof(Vpmgp *));
2785 }
2786
new_pbelist(int maxargs)2787 Vpbe **new_pbelist(int maxargs) {
2788 return (Vpbe **) malloc(maxargs*sizeof(Vpbe *));
2789 }
2790
get_Vpbe(Vpbe ** args,int n)2791 Vpbe *get_Vpbe(Vpbe **args, int n) {
2792 return (Vpbe *)args[n];
2793 }
2794
new_atomforcelist(int maxargs)2795 AtomForce **new_atomforcelist(int maxargs) {
2796 return (AtomForce **) malloc(maxargs*sizeof(AtomForce *));
2797 }
2798
delete_atomforcelist(AtomForce ** a)2799 void delete_atomforcelist(AtomForce **a) {
2800 free(a);
2801 }
delete_valist(Valist ** a)2802 void delete_valist(Valist **a) {
2803 free(a);
2804 }
delete_gridlist(Vgrid ** a)2805 void delete_gridlist(Vgrid **a) {
2806 free(a);
2807 }
delete_pmglist(Vpmg ** a)2808 void delete_pmglist(Vpmg **a) {
2809 free(a);
2810 }
delete_pmgplist(Vpmgp ** a)2811 void delete_pmgplist(Vpmgp **a) {
2812 free(a);
2813 }
delete_pbelist(Vpbe ** a)2814 void delete_pbelist(Vpbe **a) {
2815 free(a);
2816 }
2817
delete_Nosh(NOsh * nosh)2818 void delete_Nosh(NOsh *nosh) {
2819 NOsh_dtor(&nosh);
2820 }
2821
delete_Com(Vcom * com)2822 void delete_Com(Vcom *com) {
2823 Vcom_dtor(&com);
2824 }
2825
delete_Mem(Vmem * mem)2826 void delete_Mem(Vmem *mem) {
2827 Vmem_dtor(&mem);
2828 }
2829
get_AtomForce(AtomForce ** aforce,int n)2830 AtomForce **get_AtomForce(AtomForce **aforce, int n){
2831 return &aforce[n];
2832 }
2833
make_Valist(Valist ** args,int n)2834 Valist *make_Valist(Valist **args, int n){
2835 args[n] = Valist_ctor();
2836 return args[n];
2837 }
2838
remove_Valist(Valist * thee)2839 void remove_Valist(Valist *thee){
2840 Valist_dtor2(thee);
2841 }
2842
2843 /* Generic array of doubles and ints:
2844 Constructors, Destructors, Gets, and Sets */
2845
2846
double_array(int size)2847 double *double_array(int size) {
2848 return (double *) malloc(size*sizeof(double));
2849 }
2850
int_array(int size)2851 int *int_array(int size){
2852 return (int *) malloc(size*sizeof(int));
2853 }
2854
delete_double_array(double * d)2855 void delete_double_array(double *d) {
2856 free(d);
2857 }
2858
delete_int_array(int * i)2859 void delete_int_array(int *i) {
2860 free(i);
2861 }
2862
get_entry(double * array,int i)2863 double get_entry(double *array, int i){
2864 return array[i];
2865 }
2866
set_entry(double * array,int i,double val)2867 void set_entry(double *array, int i, double val){
2868 array[i] = val;
2869 }
2870
2871
2872
parseInputFromString(NOsh * nosh,PyObject * string)2873 int parseInputFromString(NOsh *nosh, PyObject *string){
2874
2875 int ret, bufsize;
2876 Vio *sock;
2877
2878 startVio();
2879 bufsize = PyString_Size(string);
2880
2881 VASSERT( bufsize <= VMAX_BUFSIZE );
2882 sock = Vio_ctor("BUFF","ASC",VNULL,"0","r");
2883
2884 Vio_bufTake(sock, PyString_AsString(string), bufsize);
2885
2886 ret = NOsh_parseInput(nosh, sock);
2887 sock->VIObuffer = VNULL;
2888 Vio_dtor(&sock);
2889 return ret;
2890 }
2891
Valist_load(Valist * thee,int size,PyObject * x,PyObject * y,PyObject * z,PyObject * chg,PyObject * rad)2892 void Valist_load(Valist *thee, int size, PyObject *x, PyObject *y, PyObject *z, PyObject *chg, PyObject *rad){
2893
2894 int i,j;
2895 double pos[3];
2896
2897 Vatom *atom;
2898
2899 VASSERT(thee != VNULL);
2900
2901 thee->atoms = Vmem_malloc(thee->vmem, size, sizeof(Vatom));
2902 thee->number = size;
2903 for (i=0;i<size;i++){
2904 pos[0] = PyFloat_AsDouble(PyList_GetItem(x,i));
2905 pos[1] = PyFloat_AsDouble(PyList_GetItem(y,i));
2906 pos[2] = PyFloat_AsDouble(PyList_GetItem(z,i));
2907 Vatom_setCharge(&(thee->atoms[i]), PyFloat_AsDouble(PyList_GetItem(chg,i)));
2908 Vatom_setRadius(&(thee->atoms[i]), PyFloat_AsDouble(PyList_GetItem(rad,i)));
2909 Vatom_setPosition(&(thee->atoms[i]), pos);
2910 Vatom_setAtomID(&(thee->atoms[i]), i);
2911 }
2912
2913 thee->center[0] = 0.0;
2914 thee->center[1] = 0.0;
2915 thee->center[2] = 0.0;
2916 thee->maxrad = 0.0;
2917 thee->charge = 0.0;
2918
2919 /* Reset stat variables */
2920 atom = &(thee->atoms[0]);
2921 for (i=0; i<3; i++) {
2922 thee->maxcrd[i] = thee->mincrd[i] = atom->position[i];
2923 }
2924 thee->maxrad = atom->radius;
2925
2926 for (i=0; i<thee->number; i++) {
2927 atom = &(thee->atoms[i]);
2928 for (j=0; j<3; j++) {
2929 if (atom->position[j] < thee->mincrd[j])
2930 thee->mincrd[j] = atom->position[j];
2931 if (atom->position[j] > thee->maxcrd[j])
2932 thee->maxcrd[j] = atom->position[j];
2933 }
2934 if (atom->radius > thee->maxrad) thee->maxrad = atom->radius;
2935 thee->charge = thee->charge + atom->charge;
2936 }
2937
2938 thee->center[0] = 0.5*(thee->maxcrd[0] + thee->mincrd[0]);
2939 thee->center[1] = 0.5*(thee->maxcrd[1] + thee->mincrd[1]);
2940 thee->center[2] = 0.5*(thee->maxcrd[2] + thee->mincrd[2]);
2941
2942 }
2943
2944 extern int NOsh_setupElecCalc(NOsh *nosh, Valist *alist[NOSH_MAXMOL]);
2945 extern int NOsh_setupApolCalc(NOsh *nosh, Valist *alist[NOSH_MAXMOL]);
2946
wrap_forceMG(Vmem * mem,NOsh * nosh,PBEparm * pbeparm,MGparm * mgparm,Vpmg * pmg,AtomForce * atomForce[NOSH_MAXCALC],Valist * alist[NOSH_MAXMOL],int forcearray[NOSH_MAXCALC],int calcid)2947 int wrap_forceMG(Vmem *mem, NOsh *nosh, PBEparm *pbeparm, MGparm *mgparm,
2948 Vpmg *pmg, AtomForce *atomForce[NOSH_MAXCALC], Valist *alist[NOSH_MAXMOL],
2949 int forcearray[NOSH_MAXCALC], int calcid)
2950 {
2951 int *nforce;
2952 nforce = malloc(sizeof(int));
2953 *nforce = 0;
2954 forceMG(mem, nosh, pbeparm, mgparm, pmg, nforce, atomForce, alist);
2955 forcearray[calcid] = *nforce;
2956
2957 return *nforce;
2958 }
2959
getAtomPosition(Vatom * atom)2960 PyObject *getAtomPosition(Vatom *atom){
2961 double *position;
2962 int i;
2963 PyObject *values;
2964
2965 values = PyList_New(3);
2966 for (i=0; i<3; i++){
2967 position = Vatom_getPosition(atom);
2968 PyList_SetItem(values, i, PyFloat_FromDouble(position[i]));
2969 }
2970
2971 return values;
2972 }
2973
getPotentials(NOsh * nosh,PBEparm * pbeparm,Vpmg * pmg,Valist * alist)2974 PyObject *getPotentials(NOsh *nosh, PBEparm *pbeparm, Vpmg *pmg, Valist *alist){
2975 Vgrid *grid;
2976 Vatom *atom;
2977 int i, rc, nx, ny, nz;
2978 double hx, hy, hzed, xcent, ycent, zcent, xmin, ymin, zmin;
2979 double value;
2980 double *position;
2981 PyObject *values;
2982
2983 values = PyList_New(Valist_getNumberAtoms(alist));
2984 nx = pmg->pmgp->nx;
2985 ny = pmg->pmgp->ny;
2986 nz = pmg->pmgp->nz;
2987 hx = pmg->pmgp->hx;
2988 hy = pmg->pmgp->hy;
2989 hzed = pmg->pmgp->hzed;
2990 xcent = pmg->pmgp->xcent;
2991 ycent = pmg->pmgp->ycent;
2992 zcent = pmg->pmgp->zcent;
2993 xmin = xcent - 0.5*(nx-1)*hx;
2994 ymin = ycent - 0.5*(ny-1)*hy;
2995 zmin = zcent - 0.5*(nz-1)*hzed;
2996
2997 Vpmg_fillArray(pmg, pmg->rwork, VDT_POT, 0.0, pbeparm->pbetype, pbeparm);
2998 grid = Vgrid_ctor(nx, ny, nz, hx, hy, hzed, xmin, ymin, zmin,
2999 pmg->rwork);
3000 for (i=0;i<Valist_getNumberAtoms(alist);i++){
3001 atom = Valist_getAtom(alist, i);
3002 position = Vatom_getPosition(atom);
3003 Vgrid_value(grid, position, &value);
3004 PyList_SetItem(values, i, PyFloat_FromDouble(value));
3005 }
3006 Vgrid_dtor(&grid);
3007 return values;
3008 }
3009
getEnergies(Vpmg * pmg,Valist * alist)3010 PyObject *getEnergies(Vpmg *pmg, Valist *alist){
3011 Vatom *atom;
3012 int i;
3013 double energy;
3014 PyObject *values;
3015
3016 values = PyList_New(Valist_getNumberAtoms(alist));
3017 for (i=0;i<Valist_getNumberAtoms(alist);i++){
3018 atom = Valist_getAtom(alist, i);
3019 energy = Vpmg_qfAtomEnergy(pmg, atom);
3020 PyList_SetItem(values, i, PyFloat_FromDouble(energy));
3021 }
3022 return values;
3023 }
3024
getForces(AtomForce ** atomForce,Valist * alist)3025 PyObject *getForces(AtomForce **atomForce, Valist *alist){
3026 int i, j;
3027 PyObject *dict;
3028 PyObject *qfvalues, *qf, *qfholder;
3029 PyObject *ibvalues, *ib, *ibholder;
3030 PyObject *dbvalues, *db, *dbholder;
3031 PyObject *npvalues, *np, *npholder;
3032
3033 dict = PyDict_New();
3034 qfvalues = PyList_New(Valist_getNumberAtoms(alist));
3035 dbvalues = PyList_New(Valist_getNumberAtoms(alist));
3036 ibvalues = PyList_New(Valist_getNumberAtoms(alist));
3037
3038 qfholder = PyList_New(3);
3039 dbholder = PyList_New(3);
3040 ibholder = PyList_New(3);
3041
3042 qf = PyString_FromString("qf");
3043 db = PyString_FromString("db");
3044 ib = PyString_FromString("ib");
3045
3046 for (i=0;i<Valist_getNumberAtoms(alist);i++){
3047 for (j=0;j<3;j++){
3048 PyList_SetItem(qfholder, j, PyFloat_FromDouble(atomForce[0][i].qfForce[j]));
3049 PyList_SetItem(dbholder, j, PyFloat_FromDouble(atomForce[0][i].dbForce[j]));
3050 PyList_SetItem(ibholder, j, PyFloat_FromDouble(atomForce[0][i].ibForce[j]));
3051 }
3052 PyList_SetItem(qfvalues, i, PyList_GetSlice(qfholder, 0, 3));
3053 PyList_SetItem(dbvalues, i, PyList_GetSlice(dbholder, 0, 3));
3054 PyList_SetItem(ibvalues, i, PyList_GetSlice(ibholder, 0, 3));
3055 }
3056 PyDict_SetItem(dict, qf, qfvalues);
3057 PyDict_SetItem(dict, db, dbvalues);
3058 PyDict_SetItem(dict, ib, ibvalues);
3059 return dict;
3060 }
3061
3062 #ifdef __cplusplus
3063 extern "C" {
3064 #endif
_wrap_new_Valist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3065 SWIGINTERN PyObject *_wrap_new_Valist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3066 PyObject *resultobj = 0;
3067 Valist *result = 0 ;
3068
3069 if (!PyArg_ParseTuple(args,(char *)":new_Valist")) SWIG_fail;
3070 result = (Valist *)(Valist *) calloc(1, sizeof(Valist));
3071 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Valist, SWIG_POINTER_NEW | 0 );
3072 return resultobj;
3073 fail:
3074 return NULL;
3075 }
3076
3077
_wrap_delete_Valist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3078 SWIGINTERN PyObject *_wrap_delete_Valist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3079 PyObject *resultobj = 0;
3080 Valist *arg1 = (Valist *) 0 ;
3081 void *argp1 = 0 ;
3082 int res1 = 0 ;
3083 PyObject * obj0 = 0 ;
3084
3085 if (!PyArg_ParseTuple(args,(char *)"O:delete_Valist",&obj0)) SWIG_fail;
3086 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Valist, SWIG_POINTER_DISOWN | 0 );
3087 if (!SWIG_IsOK(res1)) {
3088 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Valist" "', argument " "1"" of type '" "Valist *""'");
3089 }
3090 arg1 = (Valist *)(argp1);
3091 free((char *) arg1);
3092
3093 resultobj = SWIG_Py_Void();
3094 return resultobj;
3095 fail:
3096 return NULL;
3097 }
3098
3099
_wrap_Valist_number_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3100 SWIGINTERN PyObject *_wrap_Valist_number_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3101 PyObject *resultobj = 0;
3102 Valist *arg1 = (Valist *) 0 ;
3103 int arg2 ;
3104 void *argp1 = 0 ;
3105 int res1 = 0 ;
3106 int val2 ;
3107 int ecode2 = 0 ;
3108 PyObject * obj0 = 0 ;
3109 PyObject * obj1 = 0 ;
3110
3111 if (!PyArg_ParseTuple(args,(char *)"OO:Valist_number_set",&obj0,&obj1)) SWIG_fail;
3112 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Valist, 0 | 0 );
3113 if (!SWIG_IsOK(res1)) {
3114 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Valist_number_set" "', argument " "1"" of type '" "Valist *""'");
3115 }
3116 arg1 = (Valist *)(argp1);
3117 ecode2 = SWIG_AsVal_int(obj1, &val2);
3118 if (!SWIG_IsOK(ecode2)) {
3119 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Valist_number_set" "', argument " "2"" of type '" "int""'");
3120 }
3121 arg2 = (int)(val2);
3122 if (arg1) (arg1)->number = arg2;
3123
3124 resultobj = SWIG_Py_Void();
3125 return resultobj;
3126 fail:
3127 return NULL;
3128 }
3129
3130
_wrap_Valist_number_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3131 SWIGINTERN PyObject *_wrap_Valist_number_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3132 PyObject *resultobj = 0;
3133 Valist *arg1 = (Valist *) 0 ;
3134 int result;
3135 void *argp1 = 0 ;
3136 int res1 = 0 ;
3137 PyObject * obj0 = 0 ;
3138
3139 if (!PyArg_ParseTuple(args,(char *)"O:Valist_number_get",&obj0)) SWIG_fail;
3140 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Valist, 0 | 0 );
3141 if (!SWIG_IsOK(res1)) {
3142 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Valist_number_get" "', argument " "1"" of type '" "Valist *""'");
3143 }
3144 arg1 = (Valist *)(argp1);
3145 result = (int) ((arg1)->number);
3146 resultobj = SWIG_From_int((int)(result));
3147 return resultobj;
3148 fail:
3149 return NULL;
3150 }
3151
3152
Valist_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3153 SWIGINTERN PyObject *Valist_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3154 PyObject *obj;
3155 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
3156 SWIG_TypeNewClientData(SWIGTYPE_p_Valist, SWIG_NewClientData(obj));
3157 return SWIG_Py_Void();
3158 }
3159
_wrap_Valist_getAtomList(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3160 SWIGINTERN PyObject *_wrap_Valist_getAtomList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3161 PyObject *resultobj = 0;
3162 Valist *arg1 = (Valist *) 0 ;
3163 Vatom *result = 0 ;
3164 void *argp1 = 0 ;
3165 int res1 = 0 ;
3166 PyObject * obj0 = 0 ;
3167
3168 if (!PyArg_ParseTuple(args,(char *)"O:Valist_getAtomList",&obj0)) SWIG_fail;
3169 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Valist, 0 | 0 );
3170 if (!SWIG_IsOK(res1)) {
3171 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Valist_getAtomList" "', argument " "1"" of type '" "Valist *""'");
3172 }
3173 arg1 = (Valist *)(argp1);
3174 result = (Vatom *)Valist_getAtomList(arg1);
3175 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vatom, 0 | 0 );
3176 return resultobj;
3177 fail:
3178 return NULL;
3179 }
3180
3181
_wrap_Valist_getAtom(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3182 SWIGINTERN PyObject *_wrap_Valist_getAtom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3183 PyObject *resultobj = 0;
3184 Valist *arg1 = (Valist *) 0 ;
3185 int arg2 ;
3186 Vatom *result = 0 ;
3187 void *argp1 = 0 ;
3188 int res1 = 0 ;
3189 int val2 ;
3190 int ecode2 = 0 ;
3191 PyObject * obj0 = 0 ;
3192 PyObject * obj1 = 0 ;
3193
3194 if (!PyArg_ParseTuple(args,(char *)"OO:Valist_getAtom",&obj0,&obj1)) SWIG_fail;
3195 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Valist, 0 | 0 );
3196 if (!SWIG_IsOK(res1)) {
3197 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Valist_getAtom" "', argument " "1"" of type '" "Valist *""'");
3198 }
3199 arg1 = (Valist *)(argp1);
3200 ecode2 = SWIG_AsVal_int(obj1, &val2);
3201 if (!SWIG_IsOK(ecode2)) {
3202 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Valist_getAtom" "', argument " "2"" of type '" "int""'");
3203 }
3204 arg2 = (int)(val2);
3205 result = (Vatom *)Valist_getAtom(arg1,arg2);
3206 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vatom, 0 | 0 );
3207 return resultobj;
3208 fail:
3209 return NULL;
3210 }
3211
3212
_wrap_new_Vatom(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3213 SWIGINTERN PyObject *_wrap_new_Vatom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3214 PyObject *resultobj = 0;
3215 Vatom *result = 0 ;
3216
3217 if (!PyArg_ParseTuple(args,(char *)":new_Vatom")) SWIG_fail;
3218 result = (Vatom *)(Vatom *) calloc(1, sizeof(Vatom));
3219 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vatom, SWIG_POINTER_NEW | 0 );
3220 return resultobj;
3221 fail:
3222 return NULL;
3223 }
3224
3225
_wrap_delete_Vatom(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3226 SWIGINTERN PyObject *_wrap_delete_Vatom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3227 PyObject *resultobj = 0;
3228 Vatom *arg1 = (Vatom *) 0 ;
3229 void *argp1 = 0 ;
3230 int res1 = 0 ;
3231 PyObject * obj0 = 0 ;
3232
3233 if (!PyArg_ParseTuple(args,(char *)"O:delete_Vatom",&obj0)) SWIG_fail;
3234 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, SWIG_POINTER_DISOWN | 0 );
3235 if (!SWIG_IsOK(res1)) {
3236 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vatom" "', argument " "1"" of type '" "Vatom *""'");
3237 }
3238 arg1 = (Vatom *)(argp1);
3239 free((char *) arg1);
3240
3241 resultobj = SWIG_Py_Void();
3242 return resultobj;
3243 fail:
3244 return NULL;
3245 }
3246
3247
_wrap_Vatom_id_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3248 SWIGINTERN PyObject *_wrap_Vatom_id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3249 PyObject *resultobj = 0;
3250 Vatom *arg1 = (Vatom *) 0 ;
3251 int arg2 ;
3252 void *argp1 = 0 ;
3253 int res1 = 0 ;
3254 int val2 ;
3255 int ecode2 = 0 ;
3256 PyObject * obj0 = 0 ;
3257 PyObject * obj1 = 0 ;
3258
3259 if (!PyArg_ParseTuple(args,(char *)"OO:Vatom_id_set",&obj0,&obj1)) SWIG_fail;
3260 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, 0 | 0 );
3261 if (!SWIG_IsOK(res1)) {
3262 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vatom_id_set" "', argument " "1"" of type '" "Vatom *""'");
3263 }
3264 arg1 = (Vatom *)(argp1);
3265 ecode2 = SWIG_AsVal_int(obj1, &val2);
3266 if (!SWIG_IsOK(ecode2)) {
3267 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vatom_id_set" "', argument " "2"" of type '" "int""'");
3268 }
3269 arg2 = (int)(val2);
3270 if (arg1) (arg1)->id = arg2;
3271
3272 resultobj = SWIG_Py_Void();
3273 return resultobj;
3274 fail:
3275 return NULL;
3276 }
3277
3278
_wrap_Vatom_id_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3279 SWIGINTERN PyObject *_wrap_Vatom_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3280 PyObject *resultobj = 0;
3281 Vatom *arg1 = (Vatom *) 0 ;
3282 int result;
3283 void *argp1 = 0 ;
3284 int res1 = 0 ;
3285 PyObject * obj0 = 0 ;
3286
3287 if (!PyArg_ParseTuple(args,(char *)"O:Vatom_id_get",&obj0)) SWIG_fail;
3288 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, 0 | 0 );
3289 if (!SWIG_IsOK(res1)) {
3290 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vatom_id_get" "', argument " "1"" of type '" "Vatom *""'");
3291 }
3292 arg1 = (Vatom *)(argp1);
3293 result = (int) ((arg1)->id);
3294 resultobj = SWIG_From_int((int)(result));
3295 return resultobj;
3296 fail:
3297 return NULL;
3298 }
3299
3300
Vatom_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3301 SWIGINTERN PyObject *Vatom_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3302 PyObject *obj;
3303 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
3304 SWIG_TypeNewClientData(SWIGTYPE_p_Vatom, SWIG_NewClientData(obj));
3305 return SWIG_Py_Void();
3306 }
3307
_wrap_Vatom_getPosition(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3308 SWIGINTERN PyObject *_wrap_Vatom_getPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3309 PyObject *resultobj = 0;
3310 Vatom *arg1 = (Vatom *) 0 ;
3311 double *result = 0 ;
3312 void *argp1 = 0 ;
3313 int res1 = 0 ;
3314 PyObject * obj0 = 0 ;
3315
3316 if (!PyArg_ParseTuple(args,(char *)"O:Vatom_getPosition",&obj0)) SWIG_fail;
3317 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, 0 | 0 );
3318 if (!SWIG_IsOK(res1)) {
3319 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vatom_getPosition" "', argument " "1"" of type '" "Vatom *""'");
3320 }
3321 arg1 = (Vatom *)(argp1);
3322 result = (double *)Vatom_getPosition(arg1);
3323 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
3324 return resultobj;
3325 fail:
3326 return NULL;
3327 }
3328
3329
_wrap_Vatom_setCharge(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3330 SWIGINTERN PyObject *_wrap_Vatom_setCharge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3331 PyObject *resultobj = 0;
3332 Vatom *arg1 = (Vatom *) 0 ;
3333 double arg2 ;
3334 void *argp1 = 0 ;
3335 int res1 = 0 ;
3336 double val2 ;
3337 int ecode2 = 0 ;
3338 PyObject * obj0 = 0 ;
3339 PyObject * obj1 = 0 ;
3340
3341 if (!PyArg_ParseTuple(args,(char *)"OO:Vatom_setCharge",&obj0,&obj1)) SWIG_fail;
3342 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, 0 | 0 );
3343 if (!SWIG_IsOK(res1)) {
3344 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vatom_setCharge" "', argument " "1"" of type '" "Vatom *""'");
3345 }
3346 arg1 = (Vatom *)(argp1);
3347 ecode2 = SWIG_AsVal_double(obj1, &val2);
3348 if (!SWIG_IsOK(ecode2)) {
3349 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vatom_setCharge" "', argument " "2"" of type '" "double""'");
3350 }
3351 arg2 = (double)(val2);
3352 Vatom_setCharge(arg1,arg2);
3353 resultobj = SWIG_Py_Void();
3354 return resultobj;
3355 fail:
3356 return NULL;
3357 }
3358
3359
_wrap_Vatom_getCharge(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3360 SWIGINTERN PyObject *_wrap_Vatom_getCharge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3361 PyObject *resultobj = 0;
3362 Vatom *arg1 = (Vatom *) 0 ;
3363 double result;
3364 void *argp1 = 0 ;
3365 int res1 = 0 ;
3366 PyObject * obj0 = 0 ;
3367
3368 if (!PyArg_ParseTuple(args,(char *)"O:Vatom_getCharge",&obj0)) SWIG_fail;
3369 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, 0 | 0 );
3370 if (!SWIG_IsOK(res1)) {
3371 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vatom_getCharge" "', argument " "1"" of type '" "Vatom *""'");
3372 }
3373 arg1 = (Vatom *)(argp1);
3374 result = (double)Vatom_getCharge(arg1);
3375 resultobj = SWIG_From_double((double)(result));
3376 return resultobj;
3377 fail:
3378 return NULL;
3379 }
3380
3381
_wrap_Vatom_getRadius(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3382 SWIGINTERN PyObject *_wrap_Vatom_getRadius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3383 PyObject *resultobj = 0;
3384 Vatom *arg1 = (Vatom *) 0 ;
3385 double result;
3386 void *argp1 = 0 ;
3387 int res1 = 0 ;
3388 PyObject * obj0 = 0 ;
3389
3390 if (!PyArg_ParseTuple(args,(char *)"O:Vatom_getRadius",&obj0)) SWIG_fail;
3391 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, 0 | 0 );
3392 if (!SWIG_IsOK(res1)) {
3393 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vatom_getRadius" "', argument " "1"" of type '" "Vatom *""'");
3394 }
3395 arg1 = (Vatom *)(argp1);
3396 result = (double)Vatom_getRadius(arg1);
3397 resultobj = SWIG_From_double((double)(result));
3398 return resultobj;
3399 fail:
3400 return NULL;
3401 }
3402
3403
_wrap_new_MGparm(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3404 SWIGINTERN PyObject *_wrap_new_MGparm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3405 PyObject *resultobj = 0;
3406 MGparm *result = 0 ;
3407
3408 if (!PyArg_ParseTuple(args,(char *)":new_MGparm")) SWIG_fail;
3409 result = (MGparm *)(MGparm *) calloc(1, sizeof(MGparm));
3410 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MGparm, SWIG_POINTER_NEW | 0 );
3411 return resultobj;
3412 fail:
3413 return NULL;
3414 }
3415
3416
_wrap_delete_MGparm(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3417 SWIGINTERN PyObject *_wrap_delete_MGparm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3418 PyObject *resultobj = 0;
3419 MGparm *arg1 = (MGparm *) 0 ;
3420 void *argp1 = 0 ;
3421 int res1 = 0 ;
3422 PyObject * obj0 = 0 ;
3423
3424 if (!PyArg_ParseTuple(args,(char *)"O:delete_MGparm",&obj0)) SWIG_fail;
3425 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MGparm, SWIG_POINTER_DISOWN | 0 );
3426 if (!SWIG_IsOK(res1)) {
3427 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MGparm" "', argument " "1"" of type '" "MGparm *""'");
3428 }
3429 arg1 = (MGparm *)(argp1);
3430 free((char *) arg1);
3431
3432 resultobj = SWIG_Py_Void();
3433 return resultobj;
3434 fail:
3435 return NULL;
3436 }
3437
3438
_wrap_MGparm_type_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3439 SWIGINTERN PyObject *_wrap_MGparm_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3440 PyObject *resultobj = 0;
3441 MGparm *arg1 = (MGparm *) 0 ;
3442 MGparm_CalcType arg2 ;
3443 void *argp1 = 0 ;
3444 int res1 = 0 ;
3445 int val2 ;
3446 int ecode2 = 0 ;
3447 PyObject * obj0 = 0 ;
3448 PyObject * obj1 = 0 ;
3449
3450 if (!PyArg_ParseTuple(args,(char *)"OO:MGparm_type_set",&obj0,&obj1)) SWIG_fail;
3451 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MGparm, 0 | 0 );
3452 if (!SWIG_IsOK(res1)) {
3453 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MGparm_type_set" "', argument " "1"" of type '" "MGparm *""'");
3454 }
3455 arg1 = (MGparm *)(argp1);
3456 ecode2 = SWIG_AsVal_int(obj1, &val2);
3457 if (!SWIG_IsOK(ecode2)) {
3458 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MGparm_type_set" "', argument " "2"" of type '" "MGparm_CalcType""'");
3459 }
3460 arg2 = (MGparm_CalcType)(val2);
3461 if (arg1) (arg1)->type = arg2;
3462
3463 resultobj = SWIG_Py_Void();
3464 return resultobj;
3465 fail:
3466 return NULL;
3467 }
3468
3469
_wrap_MGparm_type_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3470 SWIGINTERN PyObject *_wrap_MGparm_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3471 PyObject *resultobj = 0;
3472 MGparm *arg1 = (MGparm *) 0 ;
3473 MGparm_CalcType result;
3474 void *argp1 = 0 ;
3475 int res1 = 0 ;
3476 PyObject * obj0 = 0 ;
3477
3478 if (!PyArg_ParseTuple(args,(char *)"O:MGparm_type_get",&obj0)) SWIG_fail;
3479 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MGparm, 0 | 0 );
3480 if (!SWIG_IsOK(res1)) {
3481 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MGparm_type_get" "', argument " "1"" of type '" "MGparm *""'");
3482 }
3483 arg1 = (MGparm *)(argp1);
3484 result = (MGparm_CalcType) ((arg1)->type);
3485 resultobj = SWIG_From_int((int)(result));
3486 return resultobj;
3487 fail:
3488 return NULL;
3489 }
3490
3491
MGparm_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3492 SWIGINTERN PyObject *MGparm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3493 PyObject *obj;
3494 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
3495 SWIG_TypeNewClientData(SWIGTYPE_p_MGparm, SWIG_NewClientData(obj));
3496 return SWIG_Py_Void();
3497 }
3498
_wrap_MGparm_setCenterX(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3499 SWIGINTERN PyObject *_wrap_MGparm_setCenterX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3500 PyObject *resultobj = 0;
3501 MGparm *arg1 = (MGparm *) 0 ;
3502 double arg2 ;
3503 void *argp1 = 0 ;
3504 int res1 = 0 ;
3505 double val2 ;
3506 int ecode2 = 0 ;
3507 PyObject * obj0 = 0 ;
3508 PyObject * obj1 = 0 ;
3509
3510 if (!PyArg_ParseTuple(args,(char *)"OO:MGparm_setCenterX",&obj0,&obj1)) SWIG_fail;
3511 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MGparm, 0 | 0 );
3512 if (!SWIG_IsOK(res1)) {
3513 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MGparm_setCenterX" "', argument " "1"" of type '" "MGparm *""'");
3514 }
3515 arg1 = (MGparm *)(argp1);
3516 ecode2 = SWIG_AsVal_double(obj1, &val2);
3517 if (!SWIG_IsOK(ecode2)) {
3518 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MGparm_setCenterX" "', argument " "2"" of type '" "double""'");
3519 }
3520 arg2 = (double)(val2);
3521 MGparm_setCenterX(arg1,arg2);
3522 resultobj = SWIG_Py_Void();
3523 return resultobj;
3524 fail:
3525 return NULL;
3526 }
3527
3528
_wrap_MGparm_setCenterY(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3529 SWIGINTERN PyObject *_wrap_MGparm_setCenterY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3530 PyObject *resultobj = 0;
3531 MGparm *arg1 = (MGparm *) 0 ;
3532 double arg2 ;
3533 void *argp1 = 0 ;
3534 int res1 = 0 ;
3535 double val2 ;
3536 int ecode2 = 0 ;
3537 PyObject * obj0 = 0 ;
3538 PyObject * obj1 = 0 ;
3539
3540 if (!PyArg_ParseTuple(args,(char *)"OO:MGparm_setCenterY",&obj0,&obj1)) SWIG_fail;
3541 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MGparm, 0 | 0 );
3542 if (!SWIG_IsOK(res1)) {
3543 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MGparm_setCenterY" "', argument " "1"" of type '" "MGparm *""'");
3544 }
3545 arg1 = (MGparm *)(argp1);
3546 ecode2 = SWIG_AsVal_double(obj1, &val2);
3547 if (!SWIG_IsOK(ecode2)) {
3548 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MGparm_setCenterY" "', argument " "2"" of type '" "double""'");
3549 }
3550 arg2 = (double)(val2);
3551 MGparm_setCenterY(arg1,arg2);
3552 resultobj = SWIG_Py_Void();
3553 return resultobj;
3554 fail:
3555 return NULL;
3556 }
3557
3558
_wrap_MGparm_setCenterZ(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3559 SWIGINTERN PyObject *_wrap_MGparm_setCenterZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3560 PyObject *resultobj = 0;
3561 MGparm *arg1 = (MGparm *) 0 ;
3562 double arg2 ;
3563 void *argp1 = 0 ;
3564 int res1 = 0 ;
3565 double val2 ;
3566 int ecode2 = 0 ;
3567 PyObject * obj0 = 0 ;
3568 PyObject * obj1 = 0 ;
3569
3570 if (!PyArg_ParseTuple(args,(char *)"OO:MGparm_setCenterZ",&obj0,&obj1)) SWIG_fail;
3571 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MGparm, 0 | 0 );
3572 if (!SWIG_IsOK(res1)) {
3573 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MGparm_setCenterZ" "', argument " "1"" of type '" "MGparm *""'");
3574 }
3575 arg1 = (MGparm *)(argp1);
3576 ecode2 = SWIG_AsVal_double(obj1, &val2);
3577 if (!SWIG_IsOK(ecode2)) {
3578 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MGparm_setCenterZ" "', argument " "2"" of type '" "double""'");
3579 }
3580 arg2 = (double)(val2);
3581 MGparm_setCenterZ(arg1,arg2);
3582 resultobj = SWIG_Py_Void();
3583 return resultobj;
3584 fail:
3585 return NULL;
3586 }
3587
3588
_wrap_new_PBEparm(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3589 SWIGINTERN PyObject *_wrap_new_PBEparm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3590 PyObject *resultobj = 0;
3591 PBEparm *result = 0 ;
3592
3593 if (!PyArg_ParseTuple(args,(char *)":new_PBEparm")) SWIG_fail;
3594 result = (PBEparm *)(PBEparm *) calloc(1, sizeof(PBEparm));
3595 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PBEparm, SWIG_POINTER_NEW | 0 );
3596 return resultobj;
3597 fail:
3598 return NULL;
3599 }
3600
3601
_wrap_delete_PBEparm(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3602 SWIGINTERN PyObject *_wrap_delete_PBEparm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3603 PyObject *resultobj = 0;
3604 PBEparm *arg1 = (PBEparm *) 0 ;
3605 void *argp1 = 0 ;
3606 int res1 = 0 ;
3607 PyObject * obj0 = 0 ;
3608
3609 if (!PyArg_ParseTuple(args,(char *)"O:delete_PBEparm",&obj0)) SWIG_fail;
3610 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, SWIG_POINTER_DISOWN | 0 );
3611 if (!SWIG_IsOK(res1)) {
3612 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PBEparm" "', argument " "1"" of type '" "PBEparm *""'");
3613 }
3614 arg1 = (PBEparm *)(argp1);
3615 free((char *) arg1);
3616
3617 resultobj = SWIG_Py_Void();
3618 return resultobj;
3619 fail:
3620 return NULL;
3621 }
3622
3623
_wrap_PBEparm_temp_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3624 SWIGINTERN PyObject *_wrap_PBEparm_temp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3625 PyObject *resultobj = 0;
3626 PBEparm *arg1 = (PBEparm *) 0 ;
3627 double arg2 ;
3628 void *argp1 = 0 ;
3629 int res1 = 0 ;
3630 double val2 ;
3631 int ecode2 = 0 ;
3632 PyObject * obj0 = 0 ;
3633 PyObject * obj1 = 0 ;
3634
3635 if (!PyArg_ParseTuple(args,(char *)"OO:PBEparm_temp_set",&obj0,&obj1)) SWIG_fail;
3636 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3637 if (!SWIG_IsOK(res1)) {
3638 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_temp_set" "', argument " "1"" of type '" "PBEparm *""'");
3639 }
3640 arg1 = (PBEparm *)(argp1);
3641 ecode2 = SWIG_AsVal_double(obj1, &val2);
3642 if (!SWIG_IsOK(ecode2)) {
3643 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PBEparm_temp_set" "', argument " "2"" of type '" "double""'");
3644 }
3645 arg2 = (double)(val2);
3646 if (arg1) (arg1)->temp = arg2;
3647
3648 resultobj = SWIG_Py_Void();
3649 return resultobj;
3650 fail:
3651 return NULL;
3652 }
3653
3654
_wrap_PBEparm_temp_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3655 SWIGINTERN PyObject *_wrap_PBEparm_temp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3656 PyObject *resultobj = 0;
3657 PBEparm *arg1 = (PBEparm *) 0 ;
3658 double result;
3659 void *argp1 = 0 ;
3660 int res1 = 0 ;
3661 PyObject * obj0 = 0 ;
3662
3663 if (!PyArg_ParseTuple(args,(char *)"O:PBEparm_temp_get",&obj0)) SWIG_fail;
3664 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3665 if (!SWIG_IsOK(res1)) {
3666 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_temp_get" "', argument " "1"" of type '" "PBEparm *""'");
3667 }
3668 arg1 = (PBEparm *)(argp1);
3669 result = (double) ((arg1)->temp);
3670 resultobj = SWIG_From_double((double)(result));
3671 return resultobj;
3672 fail:
3673 return NULL;
3674 }
3675
3676
_wrap_PBEparm_pdie_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3677 SWIGINTERN PyObject *_wrap_PBEparm_pdie_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3678 PyObject *resultobj = 0;
3679 PBEparm *arg1 = (PBEparm *) 0 ;
3680 double arg2 ;
3681 void *argp1 = 0 ;
3682 int res1 = 0 ;
3683 double val2 ;
3684 int ecode2 = 0 ;
3685 PyObject * obj0 = 0 ;
3686 PyObject * obj1 = 0 ;
3687
3688 if (!PyArg_ParseTuple(args,(char *)"OO:PBEparm_pdie_set",&obj0,&obj1)) SWIG_fail;
3689 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3690 if (!SWIG_IsOK(res1)) {
3691 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_pdie_set" "', argument " "1"" of type '" "PBEparm *""'");
3692 }
3693 arg1 = (PBEparm *)(argp1);
3694 ecode2 = SWIG_AsVal_double(obj1, &val2);
3695 if (!SWIG_IsOK(ecode2)) {
3696 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PBEparm_pdie_set" "', argument " "2"" of type '" "double""'");
3697 }
3698 arg2 = (double)(val2);
3699 if (arg1) (arg1)->pdie = arg2;
3700
3701 resultobj = SWIG_Py_Void();
3702 return resultobj;
3703 fail:
3704 return NULL;
3705 }
3706
3707
_wrap_PBEparm_pdie_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3708 SWIGINTERN PyObject *_wrap_PBEparm_pdie_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3709 PyObject *resultobj = 0;
3710 PBEparm *arg1 = (PBEparm *) 0 ;
3711 double result;
3712 void *argp1 = 0 ;
3713 int res1 = 0 ;
3714 PyObject * obj0 = 0 ;
3715
3716 if (!PyArg_ParseTuple(args,(char *)"O:PBEparm_pdie_get",&obj0)) SWIG_fail;
3717 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3718 if (!SWIG_IsOK(res1)) {
3719 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_pdie_get" "', argument " "1"" of type '" "PBEparm *""'");
3720 }
3721 arg1 = (PBEparm *)(argp1);
3722 result = (double) ((arg1)->pdie);
3723 resultobj = SWIG_From_double((double)(result));
3724 return resultobj;
3725 fail:
3726 return NULL;
3727 }
3728
3729
_wrap_PBEparm_sdie_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3730 SWIGINTERN PyObject *_wrap_PBEparm_sdie_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3731 PyObject *resultobj = 0;
3732 PBEparm *arg1 = (PBEparm *) 0 ;
3733 double arg2 ;
3734 void *argp1 = 0 ;
3735 int res1 = 0 ;
3736 double val2 ;
3737 int ecode2 = 0 ;
3738 PyObject * obj0 = 0 ;
3739 PyObject * obj1 = 0 ;
3740
3741 if (!PyArg_ParseTuple(args,(char *)"OO:PBEparm_sdie_set",&obj0,&obj1)) SWIG_fail;
3742 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3743 if (!SWIG_IsOK(res1)) {
3744 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_sdie_set" "', argument " "1"" of type '" "PBEparm *""'");
3745 }
3746 arg1 = (PBEparm *)(argp1);
3747 ecode2 = SWIG_AsVal_double(obj1, &val2);
3748 if (!SWIG_IsOK(ecode2)) {
3749 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PBEparm_sdie_set" "', argument " "2"" of type '" "double""'");
3750 }
3751 arg2 = (double)(val2);
3752 if (arg1) (arg1)->sdie = arg2;
3753
3754 resultobj = SWIG_Py_Void();
3755 return resultobj;
3756 fail:
3757 return NULL;
3758 }
3759
3760
_wrap_PBEparm_sdie_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3761 SWIGINTERN PyObject *_wrap_PBEparm_sdie_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3762 PyObject *resultobj = 0;
3763 PBEparm *arg1 = (PBEparm *) 0 ;
3764 double result;
3765 void *argp1 = 0 ;
3766 int res1 = 0 ;
3767 PyObject * obj0 = 0 ;
3768
3769 if (!PyArg_ParseTuple(args,(char *)"O:PBEparm_sdie_get",&obj0)) SWIG_fail;
3770 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3771 if (!SWIG_IsOK(res1)) {
3772 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_sdie_get" "', argument " "1"" of type '" "PBEparm *""'");
3773 }
3774 arg1 = (PBEparm *)(argp1);
3775 result = (double) ((arg1)->sdie);
3776 resultobj = SWIG_From_double((double)(result));
3777 return resultobj;
3778 fail:
3779 return NULL;
3780 }
3781
3782
_wrap_PBEparm_molid_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3783 SWIGINTERN PyObject *_wrap_PBEparm_molid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3784 PyObject *resultobj = 0;
3785 PBEparm *arg1 = (PBEparm *) 0 ;
3786 int arg2 ;
3787 void *argp1 = 0 ;
3788 int res1 = 0 ;
3789 int val2 ;
3790 int ecode2 = 0 ;
3791 PyObject * obj0 = 0 ;
3792 PyObject * obj1 = 0 ;
3793
3794 if (!PyArg_ParseTuple(args,(char *)"OO:PBEparm_molid_set",&obj0,&obj1)) SWIG_fail;
3795 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3796 if (!SWIG_IsOK(res1)) {
3797 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_molid_set" "', argument " "1"" of type '" "PBEparm *""'");
3798 }
3799 arg1 = (PBEparm *)(argp1);
3800 ecode2 = SWIG_AsVal_int(obj1, &val2);
3801 if (!SWIG_IsOK(ecode2)) {
3802 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PBEparm_molid_set" "', argument " "2"" of type '" "int""'");
3803 }
3804 arg2 = (int)(val2);
3805 if (arg1) (arg1)->molid = arg2;
3806
3807 resultobj = SWIG_Py_Void();
3808 return resultobj;
3809 fail:
3810 return NULL;
3811 }
3812
3813
_wrap_PBEparm_molid_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3814 SWIGINTERN PyObject *_wrap_PBEparm_molid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3815 PyObject *resultobj = 0;
3816 PBEparm *arg1 = (PBEparm *) 0 ;
3817 int result;
3818 void *argp1 = 0 ;
3819 int res1 = 0 ;
3820 PyObject * obj0 = 0 ;
3821
3822 if (!PyArg_ParseTuple(args,(char *)"O:PBEparm_molid_get",&obj0)) SWIG_fail;
3823 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
3824 if (!SWIG_IsOK(res1)) {
3825 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PBEparm_molid_get" "', argument " "1"" of type '" "PBEparm *""'");
3826 }
3827 arg1 = (PBEparm *)(argp1);
3828 result = (int) ((arg1)->molid);
3829 resultobj = SWIG_From_int((int)(result));
3830 return resultobj;
3831 fail:
3832 return NULL;
3833 }
3834
3835
PBEparm_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3836 SWIGINTERN PyObject *PBEparm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3837 PyObject *obj;
3838 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
3839 SWIG_TypeNewClientData(SWIGTYPE_p_PBEparm, SWIG_NewClientData(obj));
3840 return SWIG_Py_Void();
3841 }
3842
_wrap_new_Vcom(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3843 SWIGINTERN PyObject *_wrap_new_Vcom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3844 PyObject *resultobj = 0;
3845 Vcom *result = 0 ;
3846
3847 if (!PyArg_ParseTuple(args,(char *)":new_Vcom")) SWIG_fail;
3848 result = (Vcom *)(Vcom *) calloc(1, sizeof(Vcom));
3849 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vcom, SWIG_POINTER_NEW | 0 );
3850 return resultobj;
3851 fail:
3852 return NULL;
3853 }
3854
3855
_wrap_delete_Vcom(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3856 SWIGINTERN PyObject *_wrap_delete_Vcom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3857 PyObject *resultobj = 0;
3858 Vcom *arg1 = (Vcom *) 0 ;
3859 void *argp1 = 0 ;
3860 int res1 = 0 ;
3861 PyObject * obj0 = 0 ;
3862
3863 if (!PyArg_ParseTuple(args,(char *)"O:delete_Vcom",&obj0)) SWIG_fail;
3864 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, SWIG_POINTER_DISOWN | 0 );
3865 if (!SWIG_IsOK(res1)) {
3866 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vcom" "', argument " "1"" of type '" "Vcom *""'");
3867 }
3868 arg1 = (Vcom *)(argp1);
3869 free((char *) arg1);
3870
3871 resultobj = SWIG_Py_Void();
3872 return resultobj;
3873 fail:
3874 return NULL;
3875 }
3876
3877
Vcom_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3878 SWIGINTERN PyObject *Vcom_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3879 PyObject *obj;
3880 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
3881 SWIG_TypeNewClientData(SWIGTYPE_p_Vcom, SWIG_NewClientData(obj));
3882 return SWIG_Py_Void();
3883 }
3884
_wrap_Vcom_ctor(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3885 SWIGINTERN PyObject *_wrap_Vcom_ctor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3886 PyObject *resultobj = 0;
3887 int arg1 ;
3888 Vcom *result = 0 ;
3889 int val1 ;
3890 int ecode1 = 0 ;
3891 PyObject * obj0 = 0 ;
3892
3893 if (!PyArg_ParseTuple(args,(char *)"O:Vcom_ctor",&obj0)) SWIG_fail;
3894 ecode1 = SWIG_AsVal_int(obj0, &val1);
3895 if (!SWIG_IsOK(ecode1)) {
3896 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Vcom_ctor" "', argument " "1"" of type '" "int""'");
3897 }
3898 arg1 = (int)(val1);
3899 result = (Vcom *)Vcom_ctor(arg1);
3900 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vcom, 0 | 0 );
3901 return resultobj;
3902 fail:
3903 return NULL;
3904 }
3905
3906
_wrap_Vcom_size(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3907 SWIGINTERN PyObject *_wrap_Vcom_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3908 PyObject *resultobj = 0;
3909 Vcom *arg1 = (Vcom *) 0 ;
3910 int result;
3911 void *argp1 = 0 ;
3912 int res1 = 0 ;
3913 PyObject * obj0 = 0 ;
3914
3915 if (!PyArg_ParseTuple(args,(char *)"O:Vcom_size",&obj0)) SWIG_fail;
3916 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
3917 if (!SWIG_IsOK(res1)) {
3918 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vcom_size" "', argument " "1"" of type '" "Vcom *""'");
3919 }
3920 arg1 = (Vcom *)(argp1);
3921 result = (int)Vcom_size(arg1);
3922 resultobj = SWIG_From_int((int)(result));
3923 return resultobj;
3924 fail:
3925 return NULL;
3926 }
3927
3928
_wrap_Vcom_rank(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3929 SWIGINTERN PyObject *_wrap_Vcom_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3930 PyObject *resultobj = 0;
3931 Vcom *arg1 = (Vcom *) 0 ;
3932 int result;
3933 void *argp1 = 0 ;
3934 int res1 = 0 ;
3935 PyObject * obj0 = 0 ;
3936
3937 if (!PyArg_ParseTuple(args,(char *)"O:Vcom_rank",&obj0)) SWIG_fail;
3938 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
3939 if (!SWIG_IsOK(res1)) {
3940 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vcom_rank" "', argument " "1"" of type '" "Vcom *""'");
3941 }
3942 arg1 = (Vcom *)(argp1);
3943 result = (int)Vcom_rank(arg1);
3944 resultobj = SWIG_From_int((int)(result));
3945 return resultobj;
3946 fail:
3947 return NULL;
3948 }
3949
3950
_wrap_new_Vmem(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3951 SWIGINTERN PyObject *_wrap_new_Vmem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3952 PyObject *resultobj = 0;
3953 Vmem *result = 0 ;
3954
3955 if (!PyArg_ParseTuple(args,(char *)":new_Vmem")) SWIG_fail;
3956 result = (Vmem *)(Vmem *) calloc(1, sizeof(Vmem));
3957 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vmem, SWIG_POINTER_NEW | 0 );
3958 return resultobj;
3959 fail:
3960 return NULL;
3961 }
3962
3963
_wrap_delete_Vmem(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3964 SWIGINTERN PyObject *_wrap_delete_Vmem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3965 PyObject *resultobj = 0;
3966 Vmem *arg1 = (Vmem *) 0 ;
3967 void *argp1 = 0 ;
3968 int res1 = 0 ;
3969 PyObject * obj0 = 0 ;
3970
3971 if (!PyArg_ParseTuple(args,(char *)"O:delete_Vmem",&obj0)) SWIG_fail;
3972 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vmem, SWIG_POINTER_DISOWN | 0 );
3973 if (!SWIG_IsOK(res1)) {
3974 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vmem" "', argument " "1"" of type '" "Vmem *""'");
3975 }
3976 arg1 = (Vmem *)(argp1);
3977 free((char *) arg1);
3978
3979 resultobj = SWIG_Py_Void();
3980 return resultobj;
3981 fail:
3982 return NULL;
3983 }
3984
3985
Vmem_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3986 SWIGINTERN PyObject *Vmem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3987 PyObject *obj;
3988 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
3989 SWIG_TypeNewClientData(SWIGTYPE_p_Vmem, SWIG_NewClientData(obj));
3990 return SWIG_Py_Void();
3991 }
3992
_wrap_Vmem_ctor(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3993 SWIGINTERN PyObject *_wrap_Vmem_ctor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3994 PyObject *resultobj = 0;
3995 char *arg1 = (char *) 0 ;
3996 Vmem *result = 0 ;
3997 int res1 ;
3998 char *buf1 = 0 ;
3999 int alloc1 = 0 ;
4000 PyObject * obj0 = 0 ;
4001
4002 if (!PyArg_ParseTuple(args,(char *)"O:Vmem_ctor",&obj0)) SWIG_fail;
4003 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4004 if (!SWIG_IsOK(res1)) {
4005 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vmem_ctor" "', argument " "1"" of type '" "char *""'");
4006 }
4007 arg1 = (char *)(buf1);
4008 result = (Vmem *)Vmem_ctor(arg1);
4009 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vmem, 0 | 0 );
4010 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4011 return resultobj;
4012 fail:
4013 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4014 return NULL;
4015 }
4016
4017
_wrap_new_Vpmg(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4018 SWIGINTERN PyObject *_wrap_new_Vpmg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4019 PyObject *resultobj = 0;
4020 Vpmg *result = 0 ;
4021
4022 if (!PyArg_ParseTuple(args,(char *)":new_Vpmg")) SWIG_fail;
4023 result = (Vpmg *)(Vpmg *) calloc(1, sizeof(Vpmg));
4024 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vpmg, SWIG_POINTER_NEW | 0 );
4025 return resultobj;
4026 fail:
4027 return NULL;
4028 }
4029
4030
_wrap_delete_Vpmg(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4031 SWIGINTERN PyObject *_wrap_delete_Vpmg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4032 PyObject *resultobj = 0;
4033 Vpmg *arg1 = (Vpmg *) 0 ;
4034 void *argp1 = 0 ;
4035 int res1 = 0 ;
4036 PyObject * obj0 = 0 ;
4037
4038 if (!PyArg_ParseTuple(args,(char *)"O:delete_Vpmg",&obj0)) SWIG_fail;
4039 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vpmg, SWIG_POINTER_DISOWN | 0 );
4040 if (!SWIG_IsOK(res1)) {
4041 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vpmg" "', argument " "1"" of type '" "Vpmg *""'");
4042 }
4043 arg1 = (Vpmg *)(argp1);
4044 free((char *) arg1);
4045
4046 resultobj = SWIG_Py_Void();
4047 return resultobj;
4048 fail:
4049 return NULL;
4050 }
4051
4052
Vpmg_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4053 SWIGINTERN PyObject *Vpmg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4054 PyObject *obj;
4055 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
4056 SWIG_TypeNewClientData(SWIGTYPE_p_Vpmg, SWIG_NewClientData(obj));
4057 return SWIG_Py_Void();
4058 }
4059
_wrap_new_Vpbe(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4060 SWIGINTERN PyObject *_wrap_new_Vpbe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4061 PyObject *resultobj = 0;
4062 Vpbe *result = 0 ;
4063
4064 if (!PyArg_ParseTuple(args,(char *)":new_Vpbe")) SWIG_fail;
4065 result = (Vpbe *)(Vpbe *) calloc(1, sizeof(Vpbe));
4066 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vpbe, SWIG_POINTER_NEW | 0 );
4067 return resultobj;
4068 fail:
4069 return NULL;
4070 }
4071
4072
_wrap_delete_Vpbe(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4073 SWIGINTERN PyObject *_wrap_delete_Vpbe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4074 PyObject *resultobj = 0;
4075 Vpbe *arg1 = (Vpbe *) 0 ;
4076 void *argp1 = 0 ;
4077 int res1 = 0 ;
4078 PyObject * obj0 = 0 ;
4079
4080 if (!PyArg_ParseTuple(args,(char *)"O:delete_Vpbe",&obj0)) SWIG_fail;
4081 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vpbe, SWIG_POINTER_DISOWN | 0 );
4082 if (!SWIG_IsOK(res1)) {
4083 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vpbe" "', argument " "1"" of type '" "Vpbe *""'");
4084 }
4085 arg1 = (Vpbe *)(argp1);
4086 free((char *) arg1);
4087
4088 resultobj = SWIG_Py_Void();
4089 return resultobj;
4090 fail:
4091 return NULL;
4092 }
4093
4094
_wrap_Vpbe_acc_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4095 SWIGINTERN PyObject *_wrap_Vpbe_acc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4096 PyObject *resultobj = 0;
4097 Vpbe *arg1 = (Vpbe *) 0 ;
4098 Vacc *arg2 = (Vacc *) 0 ;
4099 void *argp1 = 0 ;
4100 int res1 = 0 ;
4101 void *argp2 = 0 ;
4102 int res2 = 0 ;
4103 PyObject * obj0 = 0 ;
4104 PyObject * obj1 = 0 ;
4105
4106 if (!PyArg_ParseTuple(args,(char *)"OO:Vpbe_acc_set",&obj0,&obj1)) SWIG_fail;
4107 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vpbe, 0 | 0 );
4108 if (!SWIG_IsOK(res1)) {
4109 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vpbe_acc_set" "', argument " "1"" of type '" "Vpbe *""'");
4110 }
4111 arg1 = (Vpbe *)(argp1);
4112 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Vacc, SWIG_POINTER_DISOWN | 0 );
4113 if (!SWIG_IsOK(res2)) {
4114 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vpbe_acc_set" "', argument " "2"" of type '" "Vacc *""'");
4115 }
4116 arg2 = (Vacc *)(argp2);
4117 if (arg1) (arg1)->acc = arg2;
4118
4119 resultobj = SWIG_Py_Void();
4120 return resultobj;
4121 fail:
4122 return NULL;
4123 }
4124
4125
_wrap_Vpbe_acc_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4126 SWIGINTERN PyObject *_wrap_Vpbe_acc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4127 PyObject *resultobj = 0;
4128 Vpbe *arg1 = (Vpbe *) 0 ;
4129 Vacc *result = 0 ;
4130 void *argp1 = 0 ;
4131 int res1 = 0 ;
4132 PyObject * obj0 = 0 ;
4133
4134 if (!PyArg_ParseTuple(args,(char *)"O:Vpbe_acc_get",&obj0)) SWIG_fail;
4135 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vpbe, 0 | 0 );
4136 if (!SWIG_IsOK(res1)) {
4137 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vpbe_acc_get" "', argument " "1"" of type '" "Vpbe *""'");
4138 }
4139 arg1 = (Vpbe *)(argp1);
4140 result = (Vacc *) ((arg1)->acc);
4141 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vacc, 0 | 0 );
4142 return resultobj;
4143 fail:
4144 return NULL;
4145 }
4146
4147
Vpbe_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4148 SWIGINTERN PyObject *Vpbe_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4149 PyObject *obj;
4150 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
4151 SWIG_TypeNewClientData(SWIGTYPE_p_Vpbe, SWIG_NewClientData(obj));
4152 return SWIG_Py_Void();
4153 }
4154
_wrap_new_NOsh_calc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4155 SWIGINTERN PyObject *_wrap_new_NOsh_calc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4156 PyObject *resultobj = 0;
4157 NOsh_calc *result = 0 ;
4158
4159 if (!PyArg_ParseTuple(args,(char *)":new_NOsh_calc")) SWIG_fail;
4160 result = (NOsh_calc *)(NOsh_calc *) calloc(1, sizeof(NOsh_calc));
4161 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NOsh_calc, SWIG_POINTER_NEW | 0 );
4162 return resultobj;
4163 fail:
4164 return NULL;
4165 }
4166
4167
_wrap_delete_NOsh_calc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4168 SWIGINTERN PyObject *_wrap_delete_NOsh_calc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4169 PyObject *resultobj = 0;
4170 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4171 void *argp1 = 0 ;
4172 int res1 = 0 ;
4173 PyObject * obj0 = 0 ;
4174
4175 if (!PyArg_ParseTuple(args,(char *)"O:delete_NOsh_calc",&obj0)) SWIG_fail;
4176 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, SWIG_POINTER_DISOWN | 0 );
4177 if (!SWIG_IsOK(res1)) {
4178 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NOsh_calc" "', argument " "1"" of type '" "NOsh_calc *""'");
4179 }
4180 arg1 = (NOsh_calc *)(argp1);
4181 free((char *) arg1);
4182
4183 resultobj = SWIG_Py_Void();
4184 return resultobj;
4185 fail:
4186 return NULL;
4187 }
4188
4189
_wrap_NOsh_calc_mgparm_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4190 SWIGINTERN PyObject *_wrap_NOsh_calc_mgparm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4191 PyObject *resultobj = 0;
4192 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4193 MGparm *arg2 = (MGparm *) 0 ;
4194 void *argp1 = 0 ;
4195 int res1 = 0 ;
4196 void *argp2 = 0 ;
4197 int res2 = 0 ;
4198 PyObject * obj0 = 0 ;
4199 PyObject * obj1 = 0 ;
4200
4201 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_calc_mgparm_set",&obj0,&obj1)) SWIG_fail;
4202 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4203 if (!SWIG_IsOK(res1)) {
4204 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_mgparm_set" "', argument " "1"" of type '" "NOsh_calc *""'");
4205 }
4206 arg1 = (NOsh_calc *)(argp1);
4207 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_MGparm, SWIG_POINTER_DISOWN | 0 );
4208 if (!SWIG_IsOK(res2)) {
4209 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NOsh_calc_mgparm_set" "', argument " "2"" of type '" "MGparm *""'");
4210 }
4211 arg2 = (MGparm *)(argp2);
4212 if (arg1) (arg1)->mgparm = arg2;
4213
4214 resultobj = SWIG_Py_Void();
4215 return resultobj;
4216 fail:
4217 return NULL;
4218 }
4219
4220
_wrap_NOsh_calc_mgparm_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4221 SWIGINTERN PyObject *_wrap_NOsh_calc_mgparm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4222 PyObject *resultobj = 0;
4223 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4224 MGparm *result = 0 ;
4225 void *argp1 = 0 ;
4226 int res1 = 0 ;
4227 PyObject * obj0 = 0 ;
4228
4229 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_calc_mgparm_get",&obj0)) SWIG_fail;
4230 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4231 if (!SWIG_IsOK(res1)) {
4232 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_mgparm_get" "', argument " "1"" of type '" "NOsh_calc *""'");
4233 }
4234 arg1 = (NOsh_calc *)(argp1);
4235 result = (MGparm *) ((arg1)->mgparm);
4236 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MGparm, 0 | 0 );
4237 return resultobj;
4238 fail:
4239 return NULL;
4240 }
4241
4242
_wrap_NOsh_calc_femparm_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4243 SWIGINTERN PyObject *_wrap_NOsh_calc_femparm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4244 PyObject *resultobj = 0;
4245 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4246 FEMparm *arg2 = (FEMparm *) 0 ;
4247 void *argp1 = 0 ;
4248 int res1 = 0 ;
4249 void *argp2 = 0 ;
4250 int res2 = 0 ;
4251 PyObject * obj0 = 0 ;
4252 PyObject * obj1 = 0 ;
4253
4254 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_calc_femparm_set",&obj0,&obj1)) SWIG_fail;
4255 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4256 if (!SWIG_IsOK(res1)) {
4257 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_femparm_set" "', argument " "1"" of type '" "NOsh_calc *""'");
4258 }
4259 arg1 = (NOsh_calc *)(argp1);
4260 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEMparm, SWIG_POINTER_DISOWN | 0 );
4261 if (!SWIG_IsOK(res2)) {
4262 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NOsh_calc_femparm_set" "', argument " "2"" of type '" "FEMparm *""'");
4263 }
4264 arg2 = (FEMparm *)(argp2);
4265 if (arg1) (arg1)->femparm = arg2;
4266
4267 resultobj = SWIG_Py_Void();
4268 return resultobj;
4269 fail:
4270 return NULL;
4271 }
4272
4273
_wrap_NOsh_calc_femparm_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4274 SWIGINTERN PyObject *_wrap_NOsh_calc_femparm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4275 PyObject *resultobj = 0;
4276 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4277 FEMparm *result = 0 ;
4278 void *argp1 = 0 ;
4279 int res1 = 0 ;
4280 PyObject * obj0 = 0 ;
4281
4282 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_calc_femparm_get",&obj0)) SWIG_fail;
4283 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4284 if (!SWIG_IsOK(res1)) {
4285 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_femparm_get" "', argument " "1"" of type '" "NOsh_calc *""'");
4286 }
4287 arg1 = (NOsh_calc *)(argp1);
4288 result = (FEMparm *) ((arg1)->femparm);
4289 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEMparm, 0 | 0 );
4290 return resultobj;
4291 fail:
4292 return NULL;
4293 }
4294
4295
_wrap_NOsh_calc_pbeparm_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4296 SWIGINTERN PyObject *_wrap_NOsh_calc_pbeparm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4297 PyObject *resultobj = 0;
4298 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4299 PBEparm *arg2 = (PBEparm *) 0 ;
4300 void *argp1 = 0 ;
4301 int res1 = 0 ;
4302 void *argp2 = 0 ;
4303 int res2 = 0 ;
4304 PyObject * obj0 = 0 ;
4305 PyObject * obj1 = 0 ;
4306
4307 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_calc_pbeparm_set",&obj0,&obj1)) SWIG_fail;
4308 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4309 if (!SWIG_IsOK(res1)) {
4310 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_pbeparm_set" "', argument " "1"" of type '" "NOsh_calc *""'");
4311 }
4312 arg1 = (NOsh_calc *)(argp1);
4313 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_PBEparm, SWIG_POINTER_DISOWN | 0 );
4314 if (!SWIG_IsOK(res2)) {
4315 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NOsh_calc_pbeparm_set" "', argument " "2"" of type '" "PBEparm *""'");
4316 }
4317 arg2 = (PBEparm *)(argp2);
4318 if (arg1) (arg1)->pbeparm = arg2;
4319
4320 resultobj = SWIG_Py_Void();
4321 return resultobj;
4322 fail:
4323 return NULL;
4324 }
4325
4326
_wrap_NOsh_calc_pbeparm_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4327 SWIGINTERN PyObject *_wrap_NOsh_calc_pbeparm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4328 PyObject *resultobj = 0;
4329 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4330 PBEparm *result = 0 ;
4331 void *argp1 = 0 ;
4332 int res1 = 0 ;
4333 PyObject * obj0 = 0 ;
4334
4335 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_calc_pbeparm_get",&obj0)) SWIG_fail;
4336 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4337 if (!SWIG_IsOK(res1)) {
4338 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_pbeparm_get" "', argument " "1"" of type '" "NOsh_calc *""'");
4339 }
4340 arg1 = (NOsh_calc *)(argp1);
4341 result = (PBEparm *) ((arg1)->pbeparm);
4342 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PBEparm, 0 | 0 );
4343 return resultobj;
4344 fail:
4345 return NULL;
4346 }
4347
4348
_wrap_NOsh_calc_calctype_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4349 SWIGINTERN PyObject *_wrap_NOsh_calc_calctype_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4350 PyObject *resultobj = 0;
4351 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4352 int arg2 ;
4353 void *argp1 = 0 ;
4354 int res1 = 0 ;
4355 int val2 ;
4356 int ecode2 = 0 ;
4357 PyObject * obj0 = 0 ;
4358 PyObject * obj1 = 0 ;
4359
4360 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_calc_calctype_set",&obj0,&obj1)) SWIG_fail;
4361 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4362 if (!SWIG_IsOK(res1)) {
4363 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_calctype_set" "', argument " "1"" of type '" "NOsh_calc *""'");
4364 }
4365 arg1 = (NOsh_calc *)(argp1);
4366 ecode2 = SWIG_AsVal_int(obj1, &val2);
4367 if (!SWIG_IsOK(ecode2)) {
4368 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_calc_calctype_set" "', argument " "2"" of type '" "int""'");
4369 }
4370 arg2 = (int)(val2);
4371 if (arg1) (arg1)->calctype = arg2;
4372
4373 resultobj = SWIG_Py_Void();
4374 return resultobj;
4375 fail:
4376 return NULL;
4377 }
4378
4379
_wrap_NOsh_calc_calctype_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4380 SWIGINTERN PyObject *_wrap_NOsh_calc_calctype_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4381 PyObject *resultobj = 0;
4382 NOsh_calc *arg1 = (NOsh_calc *) 0 ;
4383 int result;
4384 void *argp1 = 0 ;
4385 int res1 = 0 ;
4386 PyObject * obj0 = 0 ;
4387
4388 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_calc_calctype_get",&obj0)) SWIG_fail;
4389 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh_calc, 0 | 0 );
4390 if (!SWIG_IsOK(res1)) {
4391 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_calc_calctype_get" "', argument " "1"" of type '" "NOsh_calc *""'");
4392 }
4393 arg1 = (NOsh_calc *)(argp1);
4394 result = (int) ((arg1)->calctype);
4395 resultobj = SWIG_From_int((int)(result));
4396 return resultobj;
4397 fail:
4398 return NULL;
4399 }
4400
4401
NOsh_calc_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4402 SWIGINTERN PyObject *NOsh_calc_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4403 PyObject *obj;
4404 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
4405 SWIG_TypeNewClientData(SWIGTYPE_p_NOsh_calc, SWIG_NewClientData(obj));
4406 return SWIG_Py_Void();
4407 }
4408
_wrap_new_NOsh(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4409 SWIGINTERN PyObject *_wrap_new_NOsh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4410 PyObject *resultobj = 0;
4411 NOsh *result = 0 ;
4412
4413 if (!PyArg_ParseTuple(args,(char *)":new_NOsh")) SWIG_fail;
4414 result = (NOsh *)(NOsh *) calloc(1, sizeof(NOsh));
4415 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NOsh, SWIG_POINTER_NEW | 0 );
4416 return resultobj;
4417 fail:
4418 return NULL;
4419 }
4420
4421
_wrap_delete_NOsh(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4422 SWIGINTERN PyObject *_wrap_delete_NOsh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4423 PyObject *resultobj = 0;
4424 NOsh *arg1 = (NOsh *) 0 ;
4425 void *argp1 = 0 ;
4426 int res1 = 0 ;
4427 PyObject * obj0 = 0 ;
4428
4429 if (!PyArg_ParseTuple(args,(char *)"O:delete_NOsh",&obj0)) SWIG_fail;
4430 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, SWIG_POINTER_DISOWN | 0 );
4431 if (!SWIG_IsOK(res1)) {
4432 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NOsh" "', argument " "1"" of type '" "NOsh *""'");
4433 }
4434 arg1 = (NOsh *)(argp1);
4435 free((char *) arg1);
4436
4437 resultobj = SWIG_Py_Void();
4438 return resultobj;
4439 fail:
4440 return NULL;
4441 }
4442
4443
_wrap_NOsh_ncalc_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4444 SWIGINTERN PyObject *_wrap_NOsh_ncalc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4445 PyObject *resultobj = 0;
4446 NOsh *arg1 = (NOsh *) 0 ;
4447 int arg2 ;
4448 void *argp1 = 0 ;
4449 int res1 = 0 ;
4450 int val2 ;
4451 int ecode2 = 0 ;
4452 PyObject * obj0 = 0 ;
4453 PyObject * obj1 = 0 ;
4454
4455 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_ncalc_set",&obj0,&obj1)) SWIG_fail;
4456 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4457 if (!SWIG_IsOK(res1)) {
4458 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_ncalc_set" "', argument " "1"" of type '" "NOsh *""'");
4459 }
4460 arg1 = (NOsh *)(argp1);
4461 ecode2 = SWIG_AsVal_int(obj1, &val2);
4462 if (!SWIG_IsOK(ecode2)) {
4463 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_ncalc_set" "', argument " "2"" of type '" "int""'");
4464 }
4465 arg2 = (int)(val2);
4466 if (arg1) (arg1)->ncalc = arg2;
4467
4468 resultobj = SWIG_Py_Void();
4469 return resultobj;
4470 fail:
4471 return NULL;
4472 }
4473
4474
_wrap_NOsh_ncalc_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4475 SWIGINTERN PyObject *_wrap_NOsh_ncalc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4476 PyObject *resultobj = 0;
4477 NOsh *arg1 = (NOsh *) 0 ;
4478 int result;
4479 void *argp1 = 0 ;
4480 int res1 = 0 ;
4481 PyObject * obj0 = 0 ;
4482
4483 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_ncalc_get",&obj0)) SWIG_fail;
4484 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4485 if (!SWIG_IsOK(res1)) {
4486 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_ncalc_get" "', argument " "1"" of type '" "NOsh *""'");
4487 }
4488 arg1 = (NOsh *)(argp1);
4489 result = (int) ((arg1)->ncalc);
4490 resultobj = SWIG_From_int((int)(result));
4491 return resultobj;
4492 fail:
4493 return NULL;
4494 }
4495
4496
_wrap_NOsh_nprint_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4497 SWIGINTERN PyObject *_wrap_NOsh_nprint_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4498 PyObject *resultobj = 0;
4499 NOsh *arg1 = (NOsh *) 0 ;
4500 int arg2 ;
4501 void *argp1 = 0 ;
4502 int res1 = 0 ;
4503 int val2 ;
4504 int ecode2 = 0 ;
4505 PyObject * obj0 = 0 ;
4506 PyObject * obj1 = 0 ;
4507
4508 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_nprint_set",&obj0,&obj1)) SWIG_fail;
4509 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4510 if (!SWIG_IsOK(res1)) {
4511 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_nprint_set" "', argument " "1"" of type '" "NOsh *""'");
4512 }
4513 arg1 = (NOsh *)(argp1);
4514 ecode2 = SWIG_AsVal_int(obj1, &val2);
4515 if (!SWIG_IsOK(ecode2)) {
4516 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_nprint_set" "', argument " "2"" of type '" "int""'");
4517 }
4518 arg2 = (int)(val2);
4519 if (arg1) (arg1)->nprint = arg2;
4520
4521 resultobj = SWIG_Py_Void();
4522 return resultobj;
4523 fail:
4524 return NULL;
4525 }
4526
4527
_wrap_NOsh_nprint_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4528 SWIGINTERN PyObject *_wrap_NOsh_nprint_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4529 PyObject *resultobj = 0;
4530 NOsh *arg1 = (NOsh *) 0 ;
4531 int result;
4532 void *argp1 = 0 ;
4533 int res1 = 0 ;
4534 PyObject * obj0 = 0 ;
4535
4536 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_nprint_get",&obj0)) SWIG_fail;
4537 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4538 if (!SWIG_IsOK(res1)) {
4539 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_nprint_get" "', argument " "1"" of type '" "NOsh *""'");
4540 }
4541 arg1 = (NOsh *)(argp1);
4542 result = (int) ((arg1)->nprint);
4543 resultobj = SWIG_From_int((int)(result));
4544 return resultobj;
4545 fail:
4546 return NULL;
4547 }
4548
4549
_wrap_NOsh_nelec_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4550 SWIGINTERN PyObject *_wrap_NOsh_nelec_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4551 PyObject *resultobj = 0;
4552 NOsh *arg1 = (NOsh *) 0 ;
4553 int arg2 ;
4554 void *argp1 = 0 ;
4555 int res1 = 0 ;
4556 int val2 ;
4557 int ecode2 = 0 ;
4558 PyObject * obj0 = 0 ;
4559 PyObject * obj1 = 0 ;
4560
4561 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_nelec_set",&obj0,&obj1)) SWIG_fail;
4562 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4563 if (!SWIG_IsOK(res1)) {
4564 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_nelec_set" "', argument " "1"" of type '" "NOsh *""'");
4565 }
4566 arg1 = (NOsh *)(argp1);
4567 ecode2 = SWIG_AsVal_int(obj1, &val2);
4568 if (!SWIG_IsOK(ecode2)) {
4569 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_nelec_set" "', argument " "2"" of type '" "int""'");
4570 }
4571 arg2 = (int)(val2);
4572 if (arg1) (arg1)->nelec = arg2;
4573
4574 resultobj = SWIG_Py_Void();
4575 return resultobj;
4576 fail:
4577 return NULL;
4578 }
4579
4580
_wrap_NOsh_nelec_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4581 SWIGINTERN PyObject *_wrap_NOsh_nelec_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4582 PyObject *resultobj = 0;
4583 NOsh *arg1 = (NOsh *) 0 ;
4584 int result;
4585 void *argp1 = 0 ;
4586 int res1 = 0 ;
4587 PyObject * obj0 = 0 ;
4588
4589 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_nelec_get",&obj0)) SWIG_fail;
4590 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4591 if (!SWIG_IsOK(res1)) {
4592 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_nelec_get" "', argument " "1"" of type '" "NOsh *""'");
4593 }
4594 arg1 = (NOsh *)(argp1);
4595 result = (int) ((arg1)->nelec);
4596 resultobj = SWIG_From_int((int)(result));
4597 return resultobj;
4598 fail:
4599 return NULL;
4600 }
4601
4602
_wrap_NOsh_nmol_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4603 SWIGINTERN PyObject *_wrap_NOsh_nmol_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4604 PyObject *resultobj = 0;
4605 NOsh *arg1 = (NOsh *) 0 ;
4606 int arg2 ;
4607 void *argp1 = 0 ;
4608 int res1 = 0 ;
4609 int val2 ;
4610 int ecode2 = 0 ;
4611 PyObject * obj0 = 0 ;
4612 PyObject * obj1 = 0 ;
4613
4614 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_nmol_set",&obj0,&obj1)) SWIG_fail;
4615 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4616 if (!SWIG_IsOK(res1)) {
4617 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_nmol_set" "', argument " "1"" of type '" "NOsh *""'");
4618 }
4619 arg1 = (NOsh *)(argp1);
4620 ecode2 = SWIG_AsVal_int(obj1, &val2);
4621 if (!SWIG_IsOK(ecode2)) {
4622 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_nmol_set" "', argument " "2"" of type '" "int""'");
4623 }
4624 arg2 = (int)(val2);
4625 if (arg1) (arg1)->nmol = arg2;
4626
4627 resultobj = SWIG_Py_Void();
4628 return resultobj;
4629 fail:
4630 return NULL;
4631 }
4632
4633
_wrap_NOsh_nmol_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4634 SWIGINTERN PyObject *_wrap_NOsh_nmol_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4635 PyObject *resultobj = 0;
4636 NOsh *arg1 = (NOsh *) 0 ;
4637 int result;
4638 void *argp1 = 0 ;
4639 int res1 = 0 ;
4640 PyObject * obj0 = 0 ;
4641
4642 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_nmol_get",&obj0)) SWIG_fail;
4643 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4644 if (!SWIG_IsOK(res1)) {
4645 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_nmol_get" "', argument " "1"" of type '" "NOsh *""'");
4646 }
4647 arg1 = (NOsh *)(argp1);
4648 result = (int) ((arg1)->nmol);
4649 resultobj = SWIG_From_int((int)(result));
4650 return resultobj;
4651 fail:
4652 return NULL;
4653 }
4654
4655
_wrap_NOsh_printwhat_set(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4656 SWIGINTERN PyObject *_wrap_NOsh_printwhat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4657 PyObject *resultobj = 0;
4658 NOsh *arg1 = (NOsh *) 0 ;
4659 NOsh_PrintType *arg2 ;
4660 void *argp1 = 0 ;
4661 int res1 = 0 ;
4662 void *argp2 = 0 ;
4663 int res2 = 0 ;
4664 PyObject * obj0 = 0 ;
4665 PyObject * obj1 = 0 ;
4666
4667 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_printwhat_set",&obj0,&obj1)) SWIG_fail;
4668 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4669 if (!SWIG_IsOK(res1)) {
4670 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_printwhat_set" "', argument " "1"" of type '" "NOsh *""'");
4671 }
4672 arg1 = (NOsh *)(argp1);
4673 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh_PrintType, 0 | 0 );
4674 if (!SWIG_IsOK(res2)) {
4675 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NOsh_printwhat_set" "', argument " "2"" of type '" "NOsh_PrintType [NOSH_MAXPRINT]""'");
4676 }
4677 arg2 = (NOsh_PrintType *)(argp2);
4678 {
4679 if (arg2) {
4680 size_t ii = 0;
4681 for (; ii < (size_t)NOSH_MAXPRINT; ++ii) arg1->printwhat[ii] = arg2[ii];
4682 } else {
4683 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""printwhat""' of type '""NOsh_PrintType [NOSH_MAXPRINT]""'");
4684 }
4685 }
4686 resultobj = SWIG_Py_Void();
4687 return resultobj;
4688 fail:
4689 return NULL;
4690 }
4691
4692
_wrap_NOsh_printwhat_get(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4693 SWIGINTERN PyObject *_wrap_NOsh_printwhat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4694 PyObject *resultobj = 0;
4695 NOsh *arg1 = (NOsh *) 0 ;
4696 NOsh_PrintType *result = 0 ;
4697 void *argp1 = 0 ;
4698 int res1 = 0 ;
4699 PyObject * obj0 = 0 ;
4700
4701 if (!PyArg_ParseTuple(args,(char *)"O:NOsh_printwhat_get",&obj0)) SWIG_fail;
4702 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4703 if (!SWIG_IsOK(res1)) {
4704 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_printwhat_get" "', argument " "1"" of type '" "NOsh *""'");
4705 }
4706 arg1 = (NOsh *)(argp1);
4707 result = (NOsh_PrintType *)(NOsh_PrintType *) ((arg1)->printwhat);
4708 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NOsh_PrintType, 0 | 0 );
4709 return resultobj;
4710 fail:
4711 return NULL;
4712 }
4713
4714
NOsh_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4715 SWIGINTERN PyObject *NOsh_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4716 PyObject *obj;
4717 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
4718 SWIG_TypeNewClientData(SWIGTYPE_p_NOsh, SWIG_NewClientData(obj));
4719 return SWIG_Py_Void();
4720 }
4721
_wrap_NOsh_getCalc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4722 SWIGINTERN PyObject *_wrap_NOsh_getCalc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4723 PyObject *resultobj = 0;
4724 NOsh *arg1 = (NOsh *) 0 ;
4725 int arg2 ;
4726 NOsh_calc *result = 0 ;
4727 void *argp1 = 0 ;
4728 int res1 = 0 ;
4729 int val2 ;
4730 int ecode2 = 0 ;
4731 PyObject * obj0 = 0 ;
4732 PyObject * obj1 = 0 ;
4733
4734 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_getCalc",&obj0,&obj1)) SWIG_fail;
4735 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4736 if (!SWIG_IsOK(res1)) {
4737 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_getCalc" "', argument " "1"" of type '" "NOsh *""'");
4738 }
4739 arg1 = (NOsh *)(argp1);
4740 ecode2 = SWIG_AsVal_int(obj1, &val2);
4741 if (!SWIG_IsOK(ecode2)) {
4742 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_getCalc" "', argument " "2"" of type '" "int""'");
4743 }
4744 arg2 = (int)(val2);
4745 result = (NOsh_calc *)NOsh_getCalc(arg1,arg2);
4746 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NOsh_calc, 0 | 0 );
4747 return resultobj;
4748 fail:
4749 return NULL;
4750 }
4751
4752
_wrap_NOsh_elecname(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4753 SWIGINTERN PyObject *_wrap_NOsh_elecname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4754 PyObject *resultobj = 0;
4755 NOsh *arg1 = (NOsh *) 0 ;
4756 int arg2 ;
4757 char *result = 0 ;
4758 void *argp1 = 0 ;
4759 int res1 = 0 ;
4760 int val2 ;
4761 int ecode2 = 0 ;
4762 PyObject * obj0 = 0 ;
4763 PyObject * obj1 = 0 ;
4764
4765 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_elecname",&obj0,&obj1)) SWIG_fail;
4766 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4767 if (!SWIG_IsOK(res1)) {
4768 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_elecname" "', argument " "1"" of type '" "NOsh *""'");
4769 }
4770 arg1 = (NOsh *)(argp1);
4771 ecode2 = SWIG_AsVal_int(obj1, &val2);
4772 if (!SWIG_IsOK(ecode2)) {
4773 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_elecname" "', argument " "2"" of type '" "int""'");
4774 }
4775 arg2 = (int)(val2);
4776 result = (char *)NOsh_elecname(arg1,arg2);
4777 resultobj = SWIG_FromCharPtr((const char *)result);
4778 return resultobj;
4779 fail:
4780 return NULL;
4781 }
4782
4783
_wrap_NOsh_elec2calc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4784 SWIGINTERN PyObject *_wrap_NOsh_elec2calc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4785 PyObject *resultobj = 0;
4786 NOsh *arg1 = (NOsh *) 0 ;
4787 int arg2 ;
4788 int result;
4789 void *argp1 = 0 ;
4790 int res1 = 0 ;
4791 int val2 ;
4792 int ecode2 = 0 ;
4793 PyObject * obj0 = 0 ;
4794 PyObject * obj1 = 0 ;
4795
4796 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_elec2calc",&obj0,&obj1)) SWIG_fail;
4797 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4798 if (!SWIG_IsOK(res1)) {
4799 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_elec2calc" "', argument " "1"" of type '" "NOsh *""'");
4800 }
4801 arg1 = (NOsh *)(argp1);
4802 ecode2 = SWIG_AsVal_int(obj1, &val2);
4803 if (!SWIG_IsOK(ecode2)) {
4804 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_elec2calc" "', argument " "2"" of type '" "int""'");
4805 }
4806 arg2 = (int)(val2);
4807 result = (int)NOsh_elec2calc(arg1,arg2);
4808 resultobj = SWIG_From_int((int)(result));
4809 return resultobj;
4810 fail:
4811 return NULL;
4812 }
4813
4814
_wrap_NOsh_printWhat(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4815 SWIGINTERN PyObject *_wrap_NOsh_printWhat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4816 PyObject *resultobj = 0;
4817 NOsh *arg1 = (NOsh *) 0 ;
4818 int arg2 ;
4819 NOsh_PrintType result;
4820 void *argp1 = 0 ;
4821 int res1 = 0 ;
4822 int val2 ;
4823 int ecode2 = 0 ;
4824 PyObject * obj0 = 0 ;
4825 PyObject * obj1 = 0 ;
4826
4827 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_printWhat",&obj0,&obj1)) SWIG_fail;
4828 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4829 if (!SWIG_IsOK(res1)) {
4830 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_printWhat" "', argument " "1"" of type '" "NOsh *""'");
4831 }
4832 arg1 = (NOsh *)(argp1);
4833 ecode2 = SWIG_AsVal_int(obj1, &val2);
4834 if (!SWIG_IsOK(ecode2)) {
4835 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_printWhat" "', argument " "2"" of type '" "int""'");
4836 }
4837 arg2 = (int)(val2);
4838 result = (NOsh_PrintType)NOsh_printWhat(arg1,arg2);
4839 resultobj = SWIG_From_int((int)(result));
4840 return resultobj;
4841 fail:
4842 return NULL;
4843 }
4844
4845
_wrap_NOsh_parseInputFile(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4846 SWIGINTERN PyObject *_wrap_NOsh_parseInputFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4847 PyObject *resultobj = 0;
4848 NOsh *arg1 = (NOsh *) 0 ;
4849 char *arg2 = (char *) 0 ;
4850 int result;
4851 void *argp1 = 0 ;
4852 int res1 = 0 ;
4853 int res2 ;
4854 char *buf2 = 0 ;
4855 int alloc2 = 0 ;
4856 PyObject * obj0 = 0 ;
4857 PyObject * obj1 = 0 ;
4858
4859 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_parseInputFile",&obj0,&obj1)) SWIG_fail;
4860 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
4861 if (!SWIG_IsOK(res1)) {
4862 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_parseInputFile" "', argument " "1"" of type '" "NOsh *""'");
4863 }
4864 arg1 = (NOsh *)(argp1);
4865 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4866 if (!SWIG_IsOK(res2)) {
4867 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NOsh_parseInputFile" "', argument " "2"" of type '" "char *""'");
4868 }
4869 arg2 = (char *)(buf2);
4870 result = (int)NOsh_parseInputFile(arg1,arg2);
4871 resultobj = SWIG_From_int((int)(result));
4872 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4873 return resultobj;
4874 fail:
4875 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4876 return NULL;
4877 }
4878
4879
_wrap_NOsh_ctor(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4880 SWIGINTERN PyObject *_wrap_NOsh_ctor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4881 PyObject *resultobj = 0;
4882 int arg1 ;
4883 int arg2 ;
4884 NOsh *result = 0 ;
4885 int val1 ;
4886 int ecode1 = 0 ;
4887 int val2 ;
4888 int ecode2 = 0 ;
4889 PyObject * obj0 = 0 ;
4890 PyObject * obj1 = 0 ;
4891
4892 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_ctor",&obj0,&obj1)) SWIG_fail;
4893 ecode1 = SWIG_AsVal_int(obj0, &val1);
4894 if (!SWIG_IsOK(ecode1)) {
4895 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "NOsh_ctor" "', argument " "1"" of type '" "int""'");
4896 }
4897 arg1 = (int)(val1);
4898 ecode2 = SWIG_AsVal_int(obj1, &val2);
4899 if (!SWIG_IsOK(ecode2)) {
4900 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NOsh_ctor" "', argument " "2"" of type '" "int""'");
4901 }
4902 arg2 = (int)(val2);
4903 result = (NOsh *)NOsh_ctor(arg1,arg2);
4904 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NOsh, 0 | 0 );
4905 return resultobj;
4906 fail:
4907 return NULL;
4908 }
4909
4910
_wrap_new_AtomForce(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4911 SWIGINTERN PyObject *_wrap_new_AtomForce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4912 PyObject *resultobj = 0;
4913 AtomForce *result = 0 ;
4914
4915 if (!PyArg_ParseTuple(args,(char *)":new_AtomForce")) SWIG_fail;
4916 result = (AtomForce *)(AtomForce *) calloc(1, sizeof(AtomForce));
4917 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AtomForce, SWIG_POINTER_NEW | 0 );
4918 return resultobj;
4919 fail:
4920 return NULL;
4921 }
4922
4923
_wrap_delete_AtomForce(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4924 SWIGINTERN PyObject *_wrap_delete_AtomForce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4925 PyObject *resultobj = 0;
4926 AtomForce *arg1 = (AtomForce *) 0 ;
4927 void *argp1 = 0 ;
4928 int res1 = 0 ;
4929 PyObject * obj0 = 0 ;
4930
4931 if (!PyArg_ParseTuple(args,(char *)"O:delete_AtomForce",&obj0)) SWIG_fail;
4932 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AtomForce, SWIG_POINTER_DISOWN | 0 );
4933 if (!SWIG_IsOK(res1)) {
4934 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AtomForce" "', argument " "1"" of type '" "AtomForce *""'");
4935 }
4936 arg1 = (AtomForce *)(argp1);
4937 free((char *) arg1);
4938
4939 resultobj = SWIG_Py_Void();
4940 return resultobj;
4941 fail:
4942 return NULL;
4943 }
4944
4945
AtomForce_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4946 SWIGINTERN PyObject *AtomForce_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4947 PyObject *obj;
4948 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
4949 SWIG_TypeNewClientData(SWIGTYPE_p_AtomForce, SWIG_NewClientData(obj));
4950 return SWIG_Py_Void();
4951 }
4952
_wrap_new_valist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4953 SWIGINTERN PyObject *_wrap_new_valist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4954 PyObject *resultobj = 0;
4955 int arg1 ;
4956 Valist **result = 0 ;
4957 int val1 ;
4958 int ecode1 = 0 ;
4959 PyObject * obj0 = 0 ;
4960
4961 if (!PyArg_ParseTuple(args,(char *)"O:new_valist",&obj0)) SWIG_fail;
4962 ecode1 = SWIG_AsVal_int(obj0, &val1);
4963 if (!SWIG_IsOK(ecode1)) {
4964 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_valist" "', argument " "1"" of type '" "int""'");
4965 }
4966 arg1 = (int)(val1);
4967 result = (Valist **)new_valist(arg1);
4968 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_Valist, 0 | 0 );
4969 return resultobj;
4970 fail:
4971 return NULL;
4972 }
4973
4974
_wrap_get_Valist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4975 SWIGINTERN PyObject *_wrap_get_Valist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4976 PyObject *resultobj = 0;
4977 Valist **arg1 = (Valist **) 0 ;
4978 int arg2 ;
4979 Valist *result = 0 ;
4980 void *argp1 = 0 ;
4981 int res1 = 0 ;
4982 int val2 ;
4983 int ecode2 = 0 ;
4984 PyObject * obj0 = 0 ;
4985 PyObject * obj1 = 0 ;
4986
4987 if (!PyArg_ParseTuple(args,(char *)"OO:get_Valist",&obj0,&obj1)) SWIG_fail;
4988 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Valist, 0 | 0 );
4989 if (!SWIG_IsOK(res1)) {
4990 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_Valist" "', argument " "1"" of type '" "Valist **""'");
4991 }
4992 arg1 = (Valist **)(argp1);
4993 ecode2 = SWIG_AsVal_int(obj1, &val2);
4994 if (!SWIG_IsOK(ecode2)) {
4995 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_Valist" "', argument " "2"" of type '" "int""'");
4996 }
4997 arg2 = (int)(val2);
4998 result = (Valist *)get_Valist(arg1,arg2);
4999 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Valist, 0 | 0 );
5000 return resultobj;
5001 fail:
5002 return NULL;
5003 }
5004
5005
_wrap_new_gridlist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5006 SWIGINTERN PyObject *_wrap_new_gridlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5007 PyObject *resultobj = 0;
5008 int arg1 ;
5009 Vgrid **result = 0 ;
5010 int val1 ;
5011 int ecode1 = 0 ;
5012 PyObject * obj0 = 0 ;
5013
5014 if (!PyArg_ParseTuple(args,(char *)"O:new_gridlist",&obj0)) SWIG_fail;
5015 ecode1 = SWIG_AsVal_int(obj0, &val1);
5016 if (!SWIG_IsOK(ecode1)) {
5017 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_gridlist" "', argument " "1"" of type '" "int""'");
5018 }
5019 arg1 = (int)(val1);
5020 result = (Vgrid **)new_gridlist(arg1);
5021 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_Vgrid, 0 | 0 );
5022 return resultobj;
5023 fail:
5024 return NULL;
5025 }
5026
5027
_wrap_new_pmglist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5028 SWIGINTERN PyObject *_wrap_new_pmglist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5029 PyObject *resultobj = 0;
5030 int arg1 ;
5031 Vpmg **result = 0 ;
5032 int val1 ;
5033 int ecode1 = 0 ;
5034 PyObject * obj0 = 0 ;
5035
5036 if (!PyArg_ParseTuple(args,(char *)"O:new_pmglist",&obj0)) SWIG_fail;
5037 ecode1 = SWIG_AsVal_int(obj0, &val1);
5038 if (!SWIG_IsOK(ecode1)) {
5039 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_pmglist" "', argument " "1"" of type '" "int""'");
5040 }
5041 arg1 = (int)(val1);
5042 result = (Vpmg **)new_pmglist(arg1);
5043 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_Vpmg, 0 | 0 );
5044 return resultobj;
5045 fail:
5046 return NULL;
5047 }
5048
5049
_wrap_get_Vpmg(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5050 SWIGINTERN PyObject *_wrap_get_Vpmg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5051 PyObject *resultobj = 0;
5052 Vpmg **arg1 = (Vpmg **) 0 ;
5053 int arg2 ;
5054 Vpmg *result = 0 ;
5055 void *argp1 = 0 ;
5056 int res1 = 0 ;
5057 int val2 ;
5058 int ecode2 = 0 ;
5059 PyObject * obj0 = 0 ;
5060 PyObject * obj1 = 0 ;
5061
5062 if (!PyArg_ParseTuple(args,(char *)"OO:get_Vpmg",&obj0,&obj1)) SWIG_fail;
5063 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Vpmg, 0 | 0 );
5064 if (!SWIG_IsOK(res1)) {
5065 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_Vpmg" "', argument " "1"" of type '" "Vpmg **""'");
5066 }
5067 arg1 = (Vpmg **)(argp1);
5068 ecode2 = SWIG_AsVal_int(obj1, &val2);
5069 if (!SWIG_IsOK(ecode2)) {
5070 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_Vpmg" "', argument " "2"" of type '" "int""'");
5071 }
5072 arg2 = (int)(val2);
5073 result = (Vpmg *)get_Vpmg(arg1,arg2);
5074 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vpmg, 0 | 0 );
5075 return resultobj;
5076 fail:
5077 return NULL;
5078 }
5079
5080
_wrap_new_pmgplist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5081 SWIGINTERN PyObject *_wrap_new_pmgplist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5082 PyObject *resultobj = 0;
5083 int arg1 ;
5084 Vpmgp **result = 0 ;
5085 int val1 ;
5086 int ecode1 = 0 ;
5087 PyObject * obj0 = 0 ;
5088
5089 if (!PyArg_ParseTuple(args,(char *)"O:new_pmgplist",&obj0)) SWIG_fail;
5090 ecode1 = SWIG_AsVal_int(obj0, &val1);
5091 if (!SWIG_IsOK(ecode1)) {
5092 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_pmgplist" "', argument " "1"" of type '" "int""'");
5093 }
5094 arg1 = (int)(val1);
5095 result = (Vpmgp **)new_pmgplist(arg1);
5096 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_Vpmgp, 0 | 0 );
5097 return resultobj;
5098 fail:
5099 return NULL;
5100 }
5101
5102
_wrap_new_pbelist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5103 SWIGINTERN PyObject *_wrap_new_pbelist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5104 PyObject *resultobj = 0;
5105 int arg1 ;
5106 Vpbe **result = 0 ;
5107 int val1 ;
5108 int ecode1 = 0 ;
5109 PyObject * obj0 = 0 ;
5110
5111 if (!PyArg_ParseTuple(args,(char *)"O:new_pbelist",&obj0)) SWIG_fail;
5112 ecode1 = SWIG_AsVal_int(obj0, &val1);
5113 if (!SWIG_IsOK(ecode1)) {
5114 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_pbelist" "', argument " "1"" of type '" "int""'");
5115 }
5116 arg1 = (int)(val1);
5117 result = (Vpbe **)new_pbelist(arg1);
5118 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_Vpbe, 0 | 0 );
5119 return resultobj;
5120 fail:
5121 return NULL;
5122 }
5123
5124
_wrap_get_Vpbe(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5125 SWIGINTERN PyObject *_wrap_get_Vpbe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5126 PyObject *resultobj = 0;
5127 Vpbe **arg1 = (Vpbe **) 0 ;
5128 int arg2 ;
5129 Vpbe *result = 0 ;
5130 void *argp1 = 0 ;
5131 int res1 = 0 ;
5132 int val2 ;
5133 int ecode2 = 0 ;
5134 PyObject * obj0 = 0 ;
5135 PyObject * obj1 = 0 ;
5136
5137 if (!PyArg_ParseTuple(args,(char *)"OO:get_Vpbe",&obj0,&obj1)) SWIG_fail;
5138 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Vpbe, 0 | 0 );
5139 if (!SWIG_IsOK(res1)) {
5140 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_Vpbe" "', argument " "1"" of type '" "Vpbe **""'");
5141 }
5142 arg1 = (Vpbe **)(argp1);
5143 ecode2 = SWIG_AsVal_int(obj1, &val2);
5144 if (!SWIG_IsOK(ecode2)) {
5145 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_Vpbe" "', argument " "2"" of type '" "int""'");
5146 }
5147 arg2 = (int)(val2);
5148 result = (Vpbe *)get_Vpbe(arg1,arg2);
5149 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Vpbe, 0 | 0 );
5150 return resultobj;
5151 fail:
5152 return NULL;
5153 }
5154
5155
_wrap_new_atomforcelist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5156 SWIGINTERN PyObject *_wrap_new_atomforcelist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5157 PyObject *resultobj = 0;
5158 int arg1 ;
5159 AtomForce **result = 0 ;
5160 int val1 ;
5161 int ecode1 = 0 ;
5162 PyObject * obj0 = 0 ;
5163
5164 if (!PyArg_ParseTuple(args,(char *)"O:new_atomforcelist",&obj0)) SWIG_fail;
5165 ecode1 = SWIG_AsVal_int(obj0, &val1);
5166 if (!SWIG_IsOK(ecode1)) {
5167 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_atomforcelist" "', argument " "1"" of type '" "int""'");
5168 }
5169 arg1 = (int)(val1);
5170 result = (AtomForce **)new_atomforcelist(arg1);
5171 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_AtomForce, 0 | 0 );
5172 return resultobj;
5173 fail:
5174 return NULL;
5175 }
5176
5177
_wrap_delete_atomforcelist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5178 SWIGINTERN PyObject *_wrap_delete_atomforcelist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5179 PyObject *resultobj = 0;
5180 AtomForce **arg1 = (AtomForce **) 0 ;
5181 void *argp1 = 0 ;
5182 int res1 = 0 ;
5183 PyObject * obj0 = 0 ;
5184
5185 if (!PyArg_ParseTuple(args,(char *)"O:delete_atomforcelist",&obj0)) SWIG_fail;
5186 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_AtomForce, 0 | 0 );
5187 if (!SWIG_IsOK(res1)) {
5188 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_atomforcelist" "', argument " "1"" of type '" "AtomForce **""'");
5189 }
5190 arg1 = (AtomForce **)(argp1);
5191 delete_atomforcelist(arg1);
5192 resultobj = SWIG_Py_Void();
5193 return resultobj;
5194 fail:
5195 return NULL;
5196 }
5197
5198
_wrap_delete_valist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5199 SWIGINTERN PyObject *_wrap_delete_valist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5200 PyObject *resultobj = 0;
5201 Valist **arg1 = (Valist **) 0 ;
5202 void *argp1 = 0 ;
5203 int res1 = 0 ;
5204 PyObject * obj0 = 0 ;
5205
5206 if (!PyArg_ParseTuple(args,(char *)"O:delete_valist",&obj0)) SWIG_fail;
5207 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Valist, 0 | 0 );
5208 if (!SWIG_IsOK(res1)) {
5209 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_valist" "', argument " "1"" of type '" "Valist **""'");
5210 }
5211 arg1 = (Valist **)(argp1);
5212 delete_valist(arg1);
5213 resultobj = SWIG_Py_Void();
5214 return resultobj;
5215 fail:
5216 return NULL;
5217 }
5218
5219
_wrap_delete_gridlist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5220 SWIGINTERN PyObject *_wrap_delete_gridlist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5221 PyObject *resultobj = 0;
5222 Vgrid **arg1 = (Vgrid **) 0 ;
5223 void *argp1 = 0 ;
5224 int res1 = 0 ;
5225 PyObject * obj0 = 0 ;
5226
5227 if (!PyArg_ParseTuple(args,(char *)"O:delete_gridlist",&obj0)) SWIG_fail;
5228 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Vgrid, 0 | 0 );
5229 if (!SWIG_IsOK(res1)) {
5230 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gridlist" "', argument " "1"" of type '" "Vgrid **""'");
5231 }
5232 arg1 = (Vgrid **)(argp1);
5233 delete_gridlist(arg1);
5234 resultobj = SWIG_Py_Void();
5235 return resultobj;
5236 fail:
5237 return NULL;
5238 }
5239
5240
_wrap_delete_pmglist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5241 SWIGINTERN PyObject *_wrap_delete_pmglist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5242 PyObject *resultobj = 0;
5243 Vpmg **arg1 = (Vpmg **) 0 ;
5244 void *argp1 = 0 ;
5245 int res1 = 0 ;
5246 PyObject * obj0 = 0 ;
5247
5248 if (!PyArg_ParseTuple(args,(char *)"O:delete_pmglist",&obj0)) SWIG_fail;
5249 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Vpmg, 0 | 0 );
5250 if (!SWIG_IsOK(res1)) {
5251 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pmglist" "', argument " "1"" of type '" "Vpmg **""'");
5252 }
5253 arg1 = (Vpmg **)(argp1);
5254 delete_pmglist(arg1);
5255 resultobj = SWIG_Py_Void();
5256 return resultobj;
5257 fail:
5258 return NULL;
5259 }
5260
5261
_wrap_delete_pmgplist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5262 SWIGINTERN PyObject *_wrap_delete_pmgplist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5263 PyObject *resultobj = 0;
5264 Vpmgp **arg1 = (Vpmgp **) 0 ;
5265 void *argp1 = 0 ;
5266 int res1 = 0 ;
5267 PyObject * obj0 = 0 ;
5268
5269 if (!PyArg_ParseTuple(args,(char *)"O:delete_pmgplist",&obj0)) SWIG_fail;
5270 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Vpmgp, 0 | 0 );
5271 if (!SWIG_IsOK(res1)) {
5272 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pmgplist" "', argument " "1"" of type '" "Vpmgp **""'");
5273 }
5274 arg1 = (Vpmgp **)(argp1);
5275 delete_pmgplist(arg1);
5276 resultobj = SWIG_Py_Void();
5277 return resultobj;
5278 fail:
5279 return NULL;
5280 }
5281
5282
_wrap_delete_pbelist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5283 SWIGINTERN PyObject *_wrap_delete_pbelist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5284 PyObject *resultobj = 0;
5285 Vpbe **arg1 = (Vpbe **) 0 ;
5286 void *argp1 = 0 ;
5287 int res1 = 0 ;
5288 PyObject * obj0 = 0 ;
5289
5290 if (!PyArg_ParseTuple(args,(char *)"O:delete_pbelist",&obj0)) SWIG_fail;
5291 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Vpbe, 0 | 0 );
5292 if (!SWIG_IsOK(res1)) {
5293 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pbelist" "', argument " "1"" of type '" "Vpbe **""'");
5294 }
5295 arg1 = (Vpbe **)(argp1);
5296 delete_pbelist(arg1);
5297 resultobj = SWIG_Py_Void();
5298 return resultobj;
5299 fail:
5300 return NULL;
5301 }
5302
5303
_wrap_delete_Nosh(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5304 SWIGINTERN PyObject *_wrap_delete_Nosh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5305 PyObject *resultobj = 0;
5306 NOsh *arg1 = (NOsh *) 0 ;
5307 void *argp1 = 0 ;
5308 int res1 = 0 ;
5309 PyObject * obj0 = 0 ;
5310
5311 if (!PyArg_ParseTuple(args,(char *)"O:delete_Nosh",&obj0)) SWIG_fail;
5312 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
5313 if (!SWIG_IsOK(res1)) {
5314 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Nosh" "', argument " "1"" of type '" "NOsh *""'");
5315 }
5316 arg1 = (NOsh *)(argp1);
5317 delete_Nosh(arg1);
5318 resultobj = SWIG_Py_Void();
5319 return resultobj;
5320 fail:
5321 return NULL;
5322 }
5323
5324
_wrap_delete_Com(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5325 SWIGINTERN PyObject *_wrap_delete_Com(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5326 PyObject *resultobj = 0;
5327 Vcom *arg1 = (Vcom *) 0 ;
5328 void *argp1 = 0 ;
5329 int res1 = 0 ;
5330 PyObject * obj0 = 0 ;
5331
5332 if (!PyArg_ParseTuple(args,(char *)"O:delete_Com",&obj0)) SWIG_fail;
5333 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
5334 if (!SWIG_IsOK(res1)) {
5335 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Com" "', argument " "1"" of type '" "Vcom *""'");
5336 }
5337 arg1 = (Vcom *)(argp1);
5338 delete_Com(arg1);
5339 resultobj = SWIG_Py_Void();
5340 return resultobj;
5341 fail:
5342 return NULL;
5343 }
5344
5345
_wrap_delete_Mem(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5346 SWIGINTERN PyObject *_wrap_delete_Mem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5347 PyObject *resultobj = 0;
5348 Vmem *arg1 = (Vmem *) 0 ;
5349 void *argp1 = 0 ;
5350 int res1 = 0 ;
5351 PyObject * obj0 = 0 ;
5352
5353 if (!PyArg_ParseTuple(args,(char *)"O:delete_Mem",&obj0)) SWIG_fail;
5354 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vmem, 0 | 0 );
5355 if (!SWIG_IsOK(res1)) {
5356 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Mem" "', argument " "1"" of type '" "Vmem *""'");
5357 }
5358 arg1 = (Vmem *)(argp1);
5359 delete_Mem(arg1);
5360 resultobj = SWIG_Py_Void();
5361 return resultobj;
5362 fail:
5363 return NULL;
5364 }
5365
5366
_wrap_get_AtomForce(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5367 SWIGINTERN PyObject *_wrap_get_AtomForce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5368 PyObject *resultobj = 0;
5369 AtomForce **arg1 = (AtomForce **) 0 ;
5370 int arg2 ;
5371 AtomForce **result = 0 ;
5372 void *argp1 = 0 ;
5373 int res1 = 0 ;
5374 int val2 ;
5375 int ecode2 = 0 ;
5376 PyObject * obj0 = 0 ;
5377 PyObject * obj1 = 0 ;
5378
5379 if (!PyArg_ParseTuple(args,(char *)"OO:get_AtomForce",&obj0,&obj1)) SWIG_fail;
5380 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_AtomForce, 0 | 0 );
5381 if (!SWIG_IsOK(res1)) {
5382 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_AtomForce" "', argument " "1"" of type '" "AtomForce **""'");
5383 }
5384 arg1 = (AtomForce **)(argp1);
5385 ecode2 = SWIG_AsVal_int(obj1, &val2);
5386 if (!SWIG_IsOK(ecode2)) {
5387 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_AtomForce" "', argument " "2"" of type '" "int""'");
5388 }
5389 arg2 = (int)(val2);
5390 result = (AtomForce **)get_AtomForce(arg1,arg2);
5391 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_AtomForce, 0 | 0 );
5392 return resultobj;
5393 fail:
5394 return NULL;
5395 }
5396
5397
_wrap_make_Valist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5398 SWIGINTERN PyObject *_wrap_make_Valist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5399 PyObject *resultobj = 0;
5400 Valist **arg1 = (Valist **) 0 ;
5401 int arg2 ;
5402 Valist *result = 0 ;
5403 void *argp1 = 0 ;
5404 int res1 = 0 ;
5405 int val2 ;
5406 int ecode2 = 0 ;
5407 PyObject * obj0 = 0 ;
5408 PyObject * obj1 = 0 ;
5409
5410 if (!PyArg_ParseTuple(args,(char *)"OO:make_Valist",&obj0,&obj1)) SWIG_fail;
5411 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_Valist, 0 | 0 );
5412 if (!SWIG_IsOK(res1)) {
5413 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_Valist" "', argument " "1"" of type '" "Valist **""'");
5414 }
5415 arg1 = (Valist **)(argp1);
5416 ecode2 = SWIG_AsVal_int(obj1, &val2);
5417 if (!SWIG_IsOK(ecode2)) {
5418 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_Valist" "', argument " "2"" of type '" "int""'");
5419 }
5420 arg2 = (int)(val2);
5421 result = (Valist *)make_Valist(arg1,arg2);
5422 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Valist, 0 | 0 );
5423 return resultobj;
5424 fail:
5425 return NULL;
5426 }
5427
5428
_wrap_remove_Valist(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5429 SWIGINTERN PyObject *_wrap_remove_Valist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5430 PyObject *resultobj = 0;
5431 Valist *arg1 = (Valist *) 0 ;
5432 void *argp1 = 0 ;
5433 int res1 = 0 ;
5434 PyObject * obj0 = 0 ;
5435
5436 if (!PyArg_ParseTuple(args,(char *)"O:remove_Valist",&obj0)) SWIG_fail;
5437 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Valist, 0 | 0 );
5438 if (!SWIG_IsOK(res1)) {
5439 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remove_Valist" "', argument " "1"" of type '" "Valist *""'");
5440 }
5441 arg1 = (Valist *)(argp1);
5442 remove_Valist(arg1);
5443 resultobj = SWIG_Py_Void();
5444 return resultobj;
5445 fail:
5446 return NULL;
5447 }
5448
5449
_wrap_double_array(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5450 SWIGINTERN PyObject *_wrap_double_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5451 PyObject *resultobj = 0;
5452 int arg1 ;
5453 double *result = 0 ;
5454 int val1 ;
5455 int ecode1 = 0 ;
5456 PyObject * obj0 = 0 ;
5457
5458 if (!PyArg_ParseTuple(args,(char *)"O:double_array",&obj0)) SWIG_fail;
5459 ecode1 = SWIG_AsVal_int(obj0, &val1);
5460 if (!SWIG_IsOK(ecode1)) {
5461 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "double_array" "', argument " "1"" of type '" "int""'");
5462 }
5463 arg1 = (int)(val1);
5464 result = (double *)double_array(arg1);
5465 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
5466 return resultobj;
5467 fail:
5468 return NULL;
5469 }
5470
5471
_wrap_int_array(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5472 SWIGINTERN PyObject *_wrap_int_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5473 PyObject *resultobj = 0;
5474 int arg1 ;
5475 int *result = 0 ;
5476 int val1 ;
5477 int ecode1 = 0 ;
5478 PyObject * obj0 = 0 ;
5479
5480 if (!PyArg_ParseTuple(args,(char *)"O:int_array",&obj0)) SWIG_fail;
5481 ecode1 = SWIG_AsVal_int(obj0, &val1);
5482 if (!SWIG_IsOK(ecode1)) {
5483 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "int_array" "', argument " "1"" of type '" "int""'");
5484 }
5485 arg1 = (int)(val1);
5486 result = (int *)int_array(arg1);
5487 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
5488 return resultobj;
5489 fail:
5490 return NULL;
5491 }
5492
5493
_wrap_delete_double_array(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5494 SWIGINTERN PyObject *_wrap_delete_double_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5495 PyObject *resultobj = 0;
5496 double *arg1 = (double *) 0 ;
5497 void *argp1 = 0 ;
5498 int res1 = 0 ;
5499 PyObject * obj0 = 0 ;
5500
5501 if (!PyArg_ParseTuple(args,(char *)"O:delete_double_array",&obj0)) SWIG_fail;
5502 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 );
5503 if (!SWIG_IsOK(res1)) {
5504 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_double_array" "', argument " "1"" of type '" "double *""'");
5505 }
5506 arg1 = (double *)(argp1);
5507 delete_double_array(arg1);
5508 resultobj = SWIG_Py_Void();
5509 return resultobj;
5510 fail:
5511 return NULL;
5512 }
5513
5514
_wrap_delete_int_array(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5515 SWIGINTERN PyObject *_wrap_delete_int_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5516 PyObject *resultobj = 0;
5517 int *arg1 = (int *) 0 ;
5518 void *argp1 = 0 ;
5519 int res1 = 0 ;
5520 PyObject * obj0 = 0 ;
5521
5522 if (!PyArg_ParseTuple(args,(char *)"O:delete_int_array",&obj0)) SWIG_fail;
5523 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 );
5524 if (!SWIG_IsOK(res1)) {
5525 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_int_array" "', argument " "1"" of type '" "int *""'");
5526 }
5527 arg1 = (int *)(argp1);
5528 delete_int_array(arg1);
5529 resultobj = SWIG_Py_Void();
5530 return resultobj;
5531 fail:
5532 return NULL;
5533 }
5534
5535
_wrap_get_entry(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5536 SWIGINTERN PyObject *_wrap_get_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5537 PyObject *resultobj = 0;
5538 double *arg1 = (double *) 0 ;
5539 int arg2 ;
5540 double result;
5541 void *argp1 = 0 ;
5542 int res1 = 0 ;
5543 int val2 ;
5544 int ecode2 = 0 ;
5545 PyObject * obj0 = 0 ;
5546 PyObject * obj1 = 0 ;
5547
5548 if (!PyArg_ParseTuple(args,(char *)"OO:get_entry",&obj0,&obj1)) SWIG_fail;
5549 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 );
5550 if (!SWIG_IsOK(res1)) {
5551 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_entry" "', argument " "1"" of type '" "double *""'");
5552 }
5553 arg1 = (double *)(argp1);
5554 ecode2 = SWIG_AsVal_int(obj1, &val2);
5555 if (!SWIG_IsOK(ecode2)) {
5556 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_entry" "', argument " "2"" of type '" "int""'");
5557 }
5558 arg2 = (int)(val2);
5559 result = (double)get_entry(arg1,arg2);
5560 resultobj = SWIG_From_double((double)(result));
5561 return resultobj;
5562 fail:
5563 return NULL;
5564 }
5565
5566
_wrap_set_entry(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5567 SWIGINTERN PyObject *_wrap_set_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5568 PyObject *resultobj = 0;
5569 double *arg1 = (double *) 0 ;
5570 int arg2 ;
5571 double arg3 ;
5572 void *argp1 = 0 ;
5573 int res1 = 0 ;
5574 int val2 ;
5575 int ecode2 = 0 ;
5576 double val3 ;
5577 int ecode3 = 0 ;
5578 PyObject * obj0 = 0 ;
5579 PyObject * obj1 = 0 ;
5580 PyObject * obj2 = 0 ;
5581
5582 if (!PyArg_ParseTuple(args,(char *)"OOO:set_entry",&obj0,&obj1,&obj2)) SWIG_fail;
5583 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 );
5584 if (!SWIG_IsOK(res1)) {
5585 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_entry" "', argument " "1"" of type '" "double *""'");
5586 }
5587 arg1 = (double *)(argp1);
5588 ecode2 = SWIG_AsVal_int(obj1, &val2);
5589 if (!SWIG_IsOK(ecode2)) {
5590 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "set_entry" "', argument " "2"" of type '" "int""'");
5591 }
5592 arg2 = (int)(val2);
5593 ecode3 = SWIG_AsVal_double(obj2, &val3);
5594 if (!SWIG_IsOK(ecode3)) {
5595 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "set_entry" "', argument " "3"" of type '" "double""'");
5596 }
5597 arg3 = (double)(val3);
5598 set_entry(arg1,arg2,arg3);
5599 resultobj = SWIG_Py_Void();
5600 return resultobj;
5601 fail:
5602 return NULL;
5603 }
5604
5605
_wrap_parseInputFromString(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5606 SWIGINTERN PyObject *_wrap_parseInputFromString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5607 PyObject *resultobj = 0;
5608 NOsh *arg1 = (NOsh *) 0 ;
5609 PyObject *arg2 = (PyObject *) 0 ;
5610 int result;
5611 void *argp1 = 0 ;
5612 int res1 = 0 ;
5613 PyObject * obj0 = 0 ;
5614 PyObject * obj1 = 0 ;
5615
5616 if (!PyArg_ParseTuple(args,(char *)"OO:parseInputFromString",&obj0,&obj1)) SWIG_fail;
5617 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
5618 if (!SWIG_IsOK(res1)) {
5619 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "parseInputFromString" "', argument " "1"" of type '" "NOsh *""'");
5620 }
5621 arg1 = (NOsh *)(argp1);
5622 arg2 = obj1;
5623 result = (int)parseInputFromString(arg1,arg2);
5624 resultobj = SWIG_From_int((int)(result));
5625 return resultobj;
5626 fail:
5627 return NULL;
5628 }
5629
5630
_wrap_Valist_load(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5631 SWIGINTERN PyObject *_wrap_Valist_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5632 PyObject *resultobj = 0;
5633 Valist *arg1 = (Valist *) 0 ;
5634 int arg2 ;
5635 PyObject *arg3 = (PyObject *) 0 ;
5636 PyObject *arg4 = (PyObject *) 0 ;
5637 PyObject *arg5 = (PyObject *) 0 ;
5638 PyObject *arg6 = (PyObject *) 0 ;
5639 PyObject *arg7 = (PyObject *) 0 ;
5640 void *argp1 = 0 ;
5641 int res1 = 0 ;
5642 int val2 ;
5643 int ecode2 = 0 ;
5644 PyObject * obj0 = 0 ;
5645 PyObject * obj1 = 0 ;
5646 PyObject * obj2 = 0 ;
5647 PyObject * obj3 = 0 ;
5648 PyObject * obj4 = 0 ;
5649 PyObject * obj5 = 0 ;
5650 PyObject * obj6 = 0 ;
5651
5652 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:Valist_load",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
5653 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Valist, 0 | 0 );
5654 if (!SWIG_IsOK(res1)) {
5655 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Valist_load" "', argument " "1"" of type '" "Valist *""'");
5656 }
5657 arg1 = (Valist *)(argp1);
5658 ecode2 = SWIG_AsVal_int(obj1, &val2);
5659 if (!SWIG_IsOK(ecode2)) {
5660 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Valist_load" "', argument " "2"" of type '" "int""'");
5661 }
5662 arg2 = (int)(val2);
5663 arg3 = obj2;
5664 arg4 = obj3;
5665 arg5 = obj4;
5666 arg6 = obj5;
5667 arg7 = obj6;
5668 Valist_load(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
5669 resultobj = SWIG_Py_Void();
5670 return resultobj;
5671 fail:
5672 return NULL;
5673 }
5674
5675
_wrap_NOsh_setupElecCalc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5676 SWIGINTERN PyObject *_wrap_NOsh_setupElecCalc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5677 PyObject *resultobj = 0;
5678 NOsh *arg1 = (NOsh *) 0 ;
5679 Valist **arg2 ;
5680 int result;
5681 void *argp1 = 0 ;
5682 int res1 = 0 ;
5683 void *argp2 = 0 ;
5684 int res2 = 0 ;
5685 PyObject * obj0 = 0 ;
5686 PyObject * obj1 = 0 ;
5687
5688 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_setupElecCalc",&obj0,&obj1)) SWIG_fail;
5689 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
5690 if (!SWIG_IsOK(res1)) {
5691 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_setupElecCalc" "', argument " "1"" of type '" "NOsh *""'");
5692 }
5693 arg1 = (NOsh *)(argp1);
5694 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Valist, 0 | 0 );
5695 if (!SWIG_IsOK(res2)) {
5696 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NOsh_setupElecCalc" "', argument " "2"" of type '" "Valist *[NOSH_MAXMOL]""'");
5697 }
5698 arg2 = (Valist **)(argp2);
5699 result = (int)NOsh_setupElecCalc(arg1,arg2);
5700 resultobj = SWIG_From_int((int)(result));
5701 return resultobj;
5702 fail:
5703 return NULL;
5704 }
5705
5706
_wrap_NOsh_setupApolCalc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5707 SWIGINTERN PyObject *_wrap_NOsh_setupApolCalc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5708 PyObject *resultobj = 0;
5709 NOsh *arg1 = (NOsh *) 0 ;
5710 Valist **arg2 ;
5711 int result;
5712 void *argp1 = 0 ;
5713 int res1 = 0 ;
5714 void *argp2 = 0 ;
5715 int res2 = 0 ;
5716 PyObject * obj0 = 0 ;
5717 PyObject * obj1 = 0 ;
5718
5719 if (!PyArg_ParseTuple(args,(char *)"OO:NOsh_setupApolCalc",&obj0,&obj1)) SWIG_fail;
5720 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
5721 if (!SWIG_IsOK(res1)) {
5722 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NOsh_setupApolCalc" "', argument " "1"" of type '" "NOsh *""'");
5723 }
5724 arg1 = (NOsh *)(argp1);
5725 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Valist, 0 | 0 );
5726 if (!SWIG_IsOK(res2)) {
5727 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NOsh_setupApolCalc" "', argument " "2"" of type '" "Valist *[NOSH_MAXMOL]""'");
5728 }
5729 arg2 = (Valist **)(argp2);
5730 result = (int)NOsh_setupApolCalc(arg1,arg2);
5731 resultobj = SWIG_From_int((int)(result));
5732 return resultobj;
5733 fail:
5734 return NULL;
5735 }
5736
5737
_wrap_wrap_forceMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5738 SWIGINTERN PyObject *_wrap_wrap_forceMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5739 PyObject *resultobj = 0;
5740 Vmem *arg1 = (Vmem *) 0 ;
5741 NOsh *arg2 = (NOsh *) 0 ;
5742 PBEparm *arg3 = (PBEparm *) 0 ;
5743 MGparm *arg4 = (MGparm *) 0 ;
5744 Vpmg *arg5 = (Vpmg *) 0 ;
5745 AtomForce **arg6 ;
5746 Valist **arg7 ;
5747 int *arg8 ;
5748 int arg9 ;
5749 int result;
5750 void *argp1 = 0 ;
5751 int res1 = 0 ;
5752 void *argp2 = 0 ;
5753 int res2 = 0 ;
5754 void *argp3 = 0 ;
5755 int res3 = 0 ;
5756 void *argp4 = 0 ;
5757 int res4 = 0 ;
5758 void *argp5 = 0 ;
5759 int res5 = 0 ;
5760 void *argp6 = 0 ;
5761 int res6 = 0 ;
5762 void *argp7 = 0 ;
5763 int res7 = 0 ;
5764 void *argp8 = 0 ;
5765 int res8 = 0 ;
5766 int val9 ;
5767 int ecode9 = 0 ;
5768 PyObject * obj0 = 0 ;
5769 PyObject * obj1 = 0 ;
5770 PyObject * obj2 = 0 ;
5771 PyObject * obj3 = 0 ;
5772 PyObject * obj4 = 0 ;
5773 PyObject * obj5 = 0 ;
5774 PyObject * obj6 = 0 ;
5775 PyObject * obj7 = 0 ;
5776 PyObject * obj8 = 0 ;
5777
5778 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:wrap_forceMG",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
5779 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vmem, 0 | 0 );
5780 if (!SWIG_IsOK(res1)) {
5781 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrap_forceMG" "', argument " "1"" of type '" "Vmem *""'");
5782 }
5783 arg1 = (Vmem *)(argp1);
5784 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
5785 if (!SWIG_IsOK(res2)) {
5786 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrap_forceMG" "', argument " "2"" of type '" "NOsh *""'");
5787 }
5788 arg2 = (NOsh *)(argp2);
5789 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_PBEparm, 0 | 0 );
5790 if (!SWIG_IsOK(res3)) {
5791 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrap_forceMG" "', argument " "3"" of type '" "PBEparm *""'");
5792 }
5793 arg3 = (PBEparm *)(argp3);
5794 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_MGparm, 0 | 0 );
5795 if (!SWIG_IsOK(res4)) {
5796 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrap_forceMG" "', argument " "4"" of type '" "MGparm *""'");
5797 }
5798 arg4 = (MGparm *)(argp4);
5799 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_Vpmg, 0 | 0 );
5800 if (!SWIG_IsOK(res5)) {
5801 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "wrap_forceMG" "', argument " "5"" of type '" "Vpmg *""'");
5802 }
5803 arg5 = (Vpmg *)(argp5);
5804 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_p_AtomForce, 0 | 0 );
5805 if (!SWIG_IsOK(res6)) {
5806 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "wrap_forceMG" "', argument " "6"" of type '" "AtomForce *[NOSH_MAXCALC]""'");
5807 }
5808 arg6 = (AtomForce **)(argp6);
5809 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_Valist, 0 | 0 );
5810 if (!SWIG_IsOK(res7)) {
5811 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "wrap_forceMG" "', argument " "7"" of type '" "Valist *[NOSH_MAXMOL]""'");
5812 }
5813 arg7 = (Valist **)(argp7);
5814 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 | 0 );
5815 if (!SWIG_IsOK(res8)) {
5816 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "wrap_forceMG" "', argument " "8"" of type '" "int [NOSH_MAXCALC]""'");
5817 }
5818 arg8 = (int *)(argp8);
5819 ecode9 = SWIG_AsVal_int(obj8, &val9);
5820 if (!SWIG_IsOK(ecode9)) {
5821 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "wrap_forceMG" "', argument " "9"" of type '" "int""'");
5822 }
5823 arg9 = (int)(val9);
5824 result = (int)wrap_forceMG(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
5825 resultobj = SWIG_From_int((int)(result));
5826 return resultobj;
5827 fail:
5828 return NULL;
5829 }
5830
5831
_wrap_getAtomPosition(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5832 SWIGINTERN PyObject *_wrap_getAtomPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5833 PyObject *resultobj = 0;
5834 Vatom *arg1 = (Vatom *) 0 ;
5835 PyObject *result = 0 ;
5836 void *argp1 = 0 ;
5837 int res1 = 0 ;
5838 PyObject * obj0 = 0 ;
5839
5840 if (!PyArg_ParseTuple(args,(char *)"O:getAtomPosition",&obj0)) SWIG_fail;
5841 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vatom, 0 | 0 );
5842 if (!SWIG_IsOK(res1)) {
5843 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getAtomPosition" "', argument " "1"" of type '" "Vatom *""'");
5844 }
5845 arg1 = (Vatom *)(argp1);
5846 result = (PyObject *)getAtomPosition(arg1);
5847 resultobj = result;
5848 return resultobj;
5849 fail:
5850 return NULL;
5851 }
5852
5853
_wrap_getPotentials(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5854 SWIGINTERN PyObject *_wrap_getPotentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5855 PyObject *resultobj = 0;
5856 NOsh *arg1 = (NOsh *) 0 ;
5857 PBEparm *arg2 = (PBEparm *) 0 ;
5858 Vpmg *arg3 = (Vpmg *) 0 ;
5859 Valist *arg4 = (Valist *) 0 ;
5860 PyObject *result = 0 ;
5861 void *argp1 = 0 ;
5862 int res1 = 0 ;
5863 void *argp2 = 0 ;
5864 int res2 = 0 ;
5865 void *argp3 = 0 ;
5866 int res3 = 0 ;
5867 void *argp4 = 0 ;
5868 int res4 = 0 ;
5869 PyObject * obj0 = 0 ;
5870 PyObject * obj1 = 0 ;
5871 PyObject * obj2 = 0 ;
5872 PyObject * obj3 = 0 ;
5873
5874 if (!PyArg_ParseTuple(args,(char *)"OOOO:getPotentials",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5875 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
5876 if (!SWIG_IsOK(res1)) {
5877 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getPotentials" "', argument " "1"" of type '" "NOsh *""'");
5878 }
5879 arg1 = (NOsh *)(argp1);
5880 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_PBEparm, 0 | 0 );
5881 if (!SWIG_IsOK(res2)) {
5882 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getPotentials" "', argument " "2"" of type '" "PBEparm *""'");
5883 }
5884 arg2 = (PBEparm *)(argp2);
5885 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Vpmg, 0 | 0 );
5886 if (!SWIG_IsOK(res3)) {
5887 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "getPotentials" "', argument " "3"" of type '" "Vpmg *""'");
5888 }
5889 arg3 = (Vpmg *)(argp3);
5890 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_Valist, 0 | 0 );
5891 if (!SWIG_IsOK(res4)) {
5892 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "getPotentials" "', argument " "4"" of type '" "Valist *""'");
5893 }
5894 arg4 = (Valist *)(argp4);
5895 result = (PyObject *)getPotentials(arg1,arg2,arg3,arg4);
5896 resultobj = result;
5897 return resultobj;
5898 fail:
5899 return NULL;
5900 }
5901
5902
_wrap_getEnergies(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5903 SWIGINTERN PyObject *_wrap_getEnergies(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5904 PyObject *resultobj = 0;
5905 Vpmg *arg1 = (Vpmg *) 0 ;
5906 Valist *arg2 = (Valist *) 0 ;
5907 PyObject *result = 0 ;
5908 void *argp1 = 0 ;
5909 int res1 = 0 ;
5910 void *argp2 = 0 ;
5911 int res2 = 0 ;
5912 PyObject * obj0 = 0 ;
5913 PyObject * obj1 = 0 ;
5914
5915 if (!PyArg_ParseTuple(args,(char *)"OO:getEnergies",&obj0,&obj1)) SWIG_fail;
5916 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vpmg, 0 | 0 );
5917 if (!SWIG_IsOK(res1)) {
5918 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getEnergies" "', argument " "1"" of type '" "Vpmg *""'");
5919 }
5920 arg1 = (Vpmg *)(argp1);
5921 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Valist, 0 | 0 );
5922 if (!SWIG_IsOK(res2)) {
5923 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getEnergies" "', argument " "2"" of type '" "Valist *""'");
5924 }
5925 arg2 = (Valist *)(argp2);
5926 result = (PyObject *)getEnergies(arg1,arg2);
5927 resultobj = result;
5928 return resultobj;
5929 fail:
5930 return NULL;
5931 }
5932
5933
_wrap_getForces(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5934 SWIGINTERN PyObject *_wrap_getForces(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5935 PyObject *resultobj = 0;
5936 AtomForce **arg1 = (AtomForce **) 0 ;
5937 Valist *arg2 = (Valist *) 0 ;
5938 PyObject *result = 0 ;
5939 void *argp1 = 0 ;
5940 int res1 = 0 ;
5941 void *argp2 = 0 ;
5942 int res2 = 0 ;
5943 PyObject * obj0 = 0 ;
5944 PyObject * obj1 = 0 ;
5945
5946 if (!PyArg_ParseTuple(args,(char *)"OO:getForces",&obj0,&obj1)) SWIG_fail;
5947 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_AtomForce, 0 | 0 );
5948 if (!SWIG_IsOK(res1)) {
5949 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getForces" "', argument " "1"" of type '" "AtomForce **""'");
5950 }
5951 arg1 = (AtomForce **)(argp1);
5952 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Valist, 0 | 0 );
5953 if (!SWIG_IsOK(res2)) {
5954 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getForces" "', argument " "2"" of type '" "Valist *""'");
5955 }
5956 arg2 = (Valist *)(argp2);
5957 result = (PyObject *)getForces(arg1,arg2);
5958 resultobj = result;
5959 return resultobj;
5960 fail:
5961 return NULL;
5962 }
5963
5964
_wrap_loadMolecules(PyObject * SWIGUNUSEDPARM (self),PyObject * args)5965 SWIGINTERN PyObject *_wrap_loadMolecules(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5966 PyObject *resultobj = 0;
5967 NOsh *arg1 = (NOsh *) 0 ;
5968 Vparam *arg2 = (Vparam *) 0 ;
5969 Valist **arg3 ;
5970 int result;
5971 void *argp1 = 0 ;
5972 int res1 = 0 ;
5973 void *argp2 = 0 ;
5974 int res2 = 0 ;
5975 void *argp3 = 0 ;
5976 int res3 = 0 ;
5977 PyObject * obj0 = 0 ;
5978 PyObject * obj1 = 0 ;
5979 PyObject * obj2 = 0 ;
5980
5981 if (!PyArg_ParseTuple(args,(char *)"OOO:loadMolecules",&obj0,&obj1,&obj2)) SWIG_fail;
5982 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
5983 if (!SWIG_IsOK(res1)) {
5984 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "loadMolecules" "', argument " "1"" of type '" "NOsh *""'");
5985 }
5986 arg1 = (NOsh *)(argp1);
5987 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Vparam, 0 | 0 );
5988 if (!SWIG_IsOK(res2)) {
5989 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "loadMolecules" "', argument " "2"" of type '" "Vparam *""'");
5990 }
5991 arg2 = (Vparam *)(argp2);
5992 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_Valist, 0 | 0 );
5993 if (!SWIG_IsOK(res3)) {
5994 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "loadMolecules" "', argument " "3"" of type '" "Valist *[NOSH_MAXMOL]""'");
5995 }
5996 arg3 = (Valist **)(argp3);
5997 result = (int)loadMolecules(arg1,arg2,arg3);
5998 resultobj = SWIG_From_int((int)(result));
5999 return resultobj;
6000 fail:
6001 return NULL;
6002 }
6003
6004
_wrap_killMolecules(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6005 SWIGINTERN PyObject *_wrap_killMolecules(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6006 PyObject *resultobj = 0;
6007 NOsh *arg1 = (NOsh *) 0 ;
6008 Valist **arg2 ;
6009 void *argp1 = 0 ;
6010 int res1 = 0 ;
6011 void *argp2 = 0 ;
6012 int res2 = 0 ;
6013 PyObject * obj0 = 0 ;
6014 PyObject * obj1 = 0 ;
6015
6016 if (!PyArg_ParseTuple(args,(char *)"OO:killMolecules",&obj0,&obj1)) SWIG_fail;
6017 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6018 if (!SWIG_IsOK(res1)) {
6019 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "killMolecules" "', argument " "1"" of type '" "NOsh *""'");
6020 }
6021 arg1 = (NOsh *)(argp1);
6022 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Valist, 0 | 0 );
6023 if (!SWIG_IsOK(res2)) {
6024 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "killMolecules" "', argument " "2"" of type '" "Valist *[NOSH_MAXMOL]""'");
6025 }
6026 arg2 = (Valist **)(argp2);
6027 killMolecules(arg1,arg2);
6028 resultobj = SWIG_Py_Void();
6029 return resultobj;
6030 fail:
6031 return NULL;
6032 }
6033
6034
_wrap_loadDielMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6035 SWIGINTERN PyObject *_wrap_loadDielMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6036 PyObject *resultobj = 0;
6037 NOsh *arg1 = (NOsh *) 0 ;
6038 Vgrid **arg2 ;
6039 Vgrid **arg3 ;
6040 Vgrid **arg4 ;
6041 int result;
6042 void *argp1 = 0 ;
6043 int res1 = 0 ;
6044 void *argp2 = 0 ;
6045 int res2 = 0 ;
6046 void *argp3 = 0 ;
6047 int res3 = 0 ;
6048 void *argp4 = 0 ;
6049 int res4 = 0 ;
6050 PyObject * obj0 = 0 ;
6051 PyObject * obj1 = 0 ;
6052 PyObject * obj2 = 0 ;
6053 PyObject * obj3 = 0 ;
6054
6055 if (!PyArg_ParseTuple(args,(char *)"OOOO:loadDielMaps",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6056 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6057 if (!SWIG_IsOK(res1)) {
6058 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "loadDielMaps" "', argument " "1"" of type '" "NOsh *""'");
6059 }
6060 arg1 = (NOsh *)(argp1);
6061 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6062 if (!SWIG_IsOK(res2)) {
6063 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "loadDielMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6064 }
6065 arg2 = (Vgrid **)(argp2);
6066 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6067 if (!SWIG_IsOK(res3)) {
6068 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "loadDielMaps" "', argument " "3"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6069 }
6070 arg3 = (Vgrid **)(argp3);
6071 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6072 if (!SWIG_IsOK(res4)) {
6073 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "loadDielMaps" "', argument " "4"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6074 }
6075 arg4 = (Vgrid **)(argp4);
6076 result = (int)loadDielMaps(arg1,arg2,arg3,arg4);
6077 resultobj = SWIG_From_int((int)(result));
6078 return resultobj;
6079 fail:
6080 return NULL;
6081 }
6082
6083
_wrap_killDielMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6084 SWIGINTERN PyObject *_wrap_killDielMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6085 PyObject *resultobj = 0;
6086 NOsh *arg1 = (NOsh *) 0 ;
6087 Vgrid **arg2 ;
6088 Vgrid **arg3 ;
6089 Vgrid **arg4 ;
6090 void *argp1 = 0 ;
6091 int res1 = 0 ;
6092 void *argp2 = 0 ;
6093 int res2 = 0 ;
6094 void *argp3 = 0 ;
6095 int res3 = 0 ;
6096 void *argp4 = 0 ;
6097 int res4 = 0 ;
6098 PyObject * obj0 = 0 ;
6099 PyObject * obj1 = 0 ;
6100 PyObject * obj2 = 0 ;
6101 PyObject * obj3 = 0 ;
6102
6103 if (!PyArg_ParseTuple(args,(char *)"OOOO:killDielMaps",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6104 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6105 if (!SWIG_IsOK(res1)) {
6106 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "killDielMaps" "', argument " "1"" of type '" "NOsh *""'");
6107 }
6108 arg1 = (NOsh *)(argp1);
6109 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6110 if (!SWIG_IsOK(res2)) {
6111 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "killDielMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6112 }
6113 arg2 = (Vgrid **)(argp2);
6114 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6115 if (!SWIG_IsOK(res3)) {
6116 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "killDielMaps" "', argument " "3"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6117 }
6118 arg3 = (Vgrid **)(argp3);
6119 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6120 if (!SWIG_IsOK(res4)) {
6121 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "killDielMaps" "', argument " "4"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6122 }
6123 arg4 = (Vgrid **)(argp4);
6124 killDielMaps(arg1,arg2,arg3,arg4);
6125 resultobj = SWIG_Py_Void();
6126 return resultobj;
6127 fail:
6128 return NULL;
6129 }
6130
6131
_wrap_loadKappaMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6132 SWIGINTERN PyObject *_wrap_loadKappaMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6133 PyObject *resultobj = 0;
6134 NOsh *arg1 = (NOsh *) 0 ;
6135 Vgrid **arg2 ;
6136 int result;
6137 void *argp1 = 0 ;
6138 int res1 = 0 ;
6139 void *argp2 = 0 ;
6140 int res2 = 0 ;
6141 PyObject * obj0 = 0 ;
6142 PyObject * obj1 = 0 ;
6143
6144 if (!PyArg_ParseTuple(args,(char *)"OO:loadKappaMaps",&obj0,&obj1)) SWIG_fail;
6145 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6146 if (!SWIG_IsOK(res1)) {
6147 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "loadKappaMaps" "', argument " "1"" of type '" "NOsh *""'");
6148 }
6149 arg1 = (NOsh *)(argp1);
6150 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6151 if (!SWIG_IsOK(res2)) {
6152 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "loadKappaMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6153 }
6154 arg2 = (Vgrid **)(argp2);
6155 result = (int)loadKappaMaps(arg1,arg2);
6156 resultobj = SWIG_From_int((int)(result));
6157 return resultobj;
6158 fail:
6159 return NULL;
6160 }
6161
6162
_wrap_killKappaMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6163 SWIGINTERN PyObject *_wrap_killKappaMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6164 PyObject *resultobj = 0;
6165 NOsh *arg1 = (NOsh *) 0 ;
6166 Vgrid **arg2 ;
6167 void *argp1 = 0 ;
6168 int res1 = 0 ;
6169 void *argp2 = 0 ;
6170 int res2 = 0 ;
6171 PyObject * obj0 = 0 ;
6172 PyObject * obj1 = 0 ;
6173
6174 if (!PyArg_ParseTuple(args,(char *)"OO:killKappaMaps",&obj0,&obj1)) SWIG_fail;
6175 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6176 if (!SWIG_IsOK(res1)) {
6177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "killKappaMaps" "', argument " "1"" of type '" "NOsh *""'");
6178 }
6179 arg1 = (NOsh *)(argp1);
6180 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6181 if (!SWIG_IsOK(res2)) {
6182 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "killKappaMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6183 }
6184 arg2 = (Vgrid **)(argp2);
6185 killKappaMaps(arg1,arg2);
6186 resultobj = SWIG_Py_Void();
6187 return resultobj;
6188 fail:
6189 return NULL;
6190 }
6191
6192
_wrap_loadPotMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6193 SWIGINTERN PyObject *_wrap_loadPotMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6194 PyObject *resultobj = 0;
6195 NOsh *arg1 = (NOsh *) 0 ;
6196 Vgrid **arg2 ;
6197 int result;
6198 void *argp1 = 0 ;
6199 int res1 = 0 ;
6200 void *argp2 = 0 ;
6201 int res2 = 0 ;
6202 PyObject * obj0 = 0 ;
6203 PyObject * obj1 = 0 ;
6204
6205 if (!PyArg_ParseTuple(args,(char *)"OO:loadPotMaps",&obj0,&obj1)) SWIG_fail;
6206 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6207 if (!SWIG_IsOK(res1)) {
6208 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "loadPotMaps" "', argument " "1"" of type '" "NOsh *""'");
6209 }
6210 arg1 = (NOsh *)(argp1);
6211 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6212 if (!SWIG_IsOK(res2)) {
6213 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "loadPotMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6214 }
6215 arg2 = (Vgrid **)(argp2);
6216 result = (int)loadPotMaps(arg1,arg2);
6217 resultobj = SWIG_From_int((int)(result));
6218 return resultobj;
6219 fail:
6220 return NULL;
6221 }
6222
6223
_wrap_killPotMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6224 SWIGINTERN PyObject *_wrap_killPotMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6225 PyObject *resultobj = 0;
6226 NOsh *arg1 = (NOsh *) 0 ;
6227 Vgrid **arg2 ;
6228 void *argp1 = 0 ;
6229 int res1 = 0 ;
6230 void *argp2 = 0 ;
6231 int res2 = 0 ;
6232 PyObject * obj0 = 0 ;
6233 PyObject * obj1 = 0 ;
6234
6235 if (!PyArg_ParseTuple(args,(char *)"OO:killPotMaps",&obj0,&obj1)) SWIG_fail;
6236 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6237 if (!SWIG_IsOK(res1)) {
6238 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "killPotMaps" "', argument " "1"" of type '" "NOsh *""'");
6239 }
6240 arg1 = (NOsh *)(argp1);
6241 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6242 if (!SWIG_IsOK(res2)) {
6243 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "killPotMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6244 }
6245 arg2 = (Vgrid **)(argp2);
6246 killPotMaps(arg1,arg2);
6247 resultobj = SWIG_Py_Void();
6248 return resultobj;
6249 fail:
6250 return NULL;
6251 }
6252
6253
_wrap_loadChargeMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6254 SWIGINTERN PyObject *_wrap_loadChargeMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6255 PyObject *resultobj = 0;
6256 NOsh *arg1 = (NOsh *) 0 ;
6257 Vgrid **arg2 ;
6258 int result;
6259 void *argp1 = 0 ;
6260 int res1 = 0 ;
6261 void *argp2 = 0 ;
6262 int res2 = 0 ;
6263 PyObject * obj0 = 0 ;
6264 PyObject * obj1 = 0 ;
6265
6266 if (!PyArg_ParseTuple(args,(char *)"OO:loadChargeMaps",&obj0,&obj1)) SWIG_fail;
6267 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6268 if (!SWIG_IsOK(res1)) {
6269 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "loadChargeMaps" "', argument " "1"" of type '" "NOsh *""'");
6270 }
6271 arg1 = (NOsh *)(argp1);
6272 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6273 if (!SWIG_IsOK(res2)) {
6274 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "loadChargeMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6275 }
6276 arg2 = (Vgrid **)(argp2);
6277 result = (int)loadChargeMaps(arg1,arg2);
6278 resultobj = SWIG_From_int((int)(result));
6279 return resultobj;
6280 fail:
6281 return NULL;
6282 }
6283
6284
_wrap_killChargeMaps(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6285 SWIGINTERN PyObject *_wrap_killChargeMaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6286 PyObject *resultobj = 0;
6287 NOsh *arg1 = (NOsh *) 0 ;
6288 Vgrid **arg2 ;
6289 void *argp1 = 0 ;
6290 int res1 = 0 ;
6291 void *argp2 = 0 ;
6292 int res2 = 0 ;
6293 PyObject * obj0 = 0 ;
6294 PyObject * obj1 = 0 ;
6295
6296 if (!PyArg_ParseTuple(args,(char *)"OO:killChargeMaps",&obj0,&obj1)) SWIG_fail;
6297 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6298 if (!SWIG_IsOK(res1)) {
6299 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "killChargeMaps" "', argument " "1"" of type '" "NOsh *""'");
6300 }
6301 arg1 = (NOsh *)(argp1);
6302 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6303 if (!SWIG_IsOK(res2)) {
6304 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "killChargeMaps" "', argument " "2"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6305 }
6306 arg2 = (Vgrid **)(argp2);
6307 killChargeMaps(arg1,arg2);
6308 resultobj = SWIG_Py_Void();
6309 return resultobj;
6310 fail:
6311 return NULL;
6312 }
6313
6314
_wrap_printPBEPARM(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6315 SWIGINTERN PyObject *_wrap_printPBEPARM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6316 PyObject *resultobj = 0;
6317 PBEparm *arg1 = (PBEparm *) 0 ;
6318 void *argp1 = 0 ;
6319 int res1 = 0 ;
6320 PyObject * obj0 = 0 ;
6321
6322 if (!PyArg_ParseTuple(args,(char *)"O:printPBEPARM",&obj0)) SWIG_fail;
6323 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PBEparm, 0 | 0 );
6324 if (!SWIG_IsOK(res1)) {
6325 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printPBEPARM" "', argument " "1"" of type '" "PBEparm *""'");
6326 }
6327 arg1 = (PBEparm *)(argp1);
6328 printPBEPARM(arg1);
6329 resultobj = SWIG_Py_Void();
6330 return resultobj;
6331 fail:
6332 return NULL;
6333 }
6334
6335
_wrap_printMGPARM(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6336 SWIGINTERN PyObject *_wrap_printMGPARM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6337 PyObject *resultobj = 0;
6338 MGparm *arg1 = (MGparm *) 0 ;
6339 double *arg2 ;
6340 void *argp1 = 0 ;
6341 int res1 = 0 ;
6342 void *argp2 = 0 ;
6343 int res2 = 0 ;
6344 PyObject * obj0 = 0 ;
6345 PyObject * obj1 = 0 ;
6346
6347 if (!PyArg_ParseTuple(args,(char *)"OO:printMGPARM",&obj0,&obj1)) SWIG_fail;
6348 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MGparm, 0 | 0 );
6349 if (!SWIG_IsOK(res1)) {
6350 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printMGPARM" "', argument " "1"" of type '" "MGparm *""'");
6351 }
6352 arg1 = (MGparm *)(argp1);
6353 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 );
6354 if (!SWIG_IsOK(res2)) {
6355 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "printMGPARM" "', argument " "2"" of type '" "double [3]""'");
6356 }
6357 arg2 = (double *)(argp2);
6358 printMGPARM(arg1,arg2);
6359 resultobj = SWIG_Py_Void();
6360 return resultobj;
6361 fail:
6362 return NULL;
6363 }
6364
6365
_wrap_initMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6366 SWIGINTERN PyObject *_wrap_initMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6367 PyObject *resultobj = 0;
6368 int arg1 ;
6369 NOsh *arg2 = (NOsh *) 0 ;
6370 MGparm *arg3 = (MGparm *) 0 ;
6371 PBEparm *arg4 = (PBEparm *) 0 ;
6372 double *arg5 ;
6373 Vpbe **arg6 ;
6374 Valist **arg7 ;
6375 Vgrid **arg8 ;
6376 Vgrid **arg9 ;
6377 Vgrid **arg10 ;
6378 Vgrid **arg11 ;
6379 Vgrid **arg12 ;
6380 Vpmgp **arg13 ;
6381 Vpmg **arg14 ;
6382 Vgrid **arg15 ;
6383 int result;
6384 int val1 ;
6385 int ecode1 = 0 ;
6386 void *argp2 = 0 ;
6387 int res2 = 0 ;
6388 void *argp3 = 0 ;
6389 int res3 = 0 ;
6390 void *argp4 = 0 ;
6391 int res4 = 0 ;
6392 void *argp5 = 0 ;
6393 int res5 = 0 ;
6394 void *argp6 = 0 ;
6395 int res6 = 0 ;
6396 void *argp7 = 0 ;
6397 int res7 = 0 ;
6398 void *argp8 = 0 ;
6399 int res8 = 0 ;
6400 void *argp9 = 0 ;
6401 int res9 = 0 ;
6402 void *argp10 = 0 ;
6403 int res10 = 0 ;
6404 void *argp11 = 0 ;
6405 int res11 = 0 ;
6406 void *argp12 = 0 ;
6407 int res12 = 0 ;
6408 void *argp13 = 0 ;
6409 int res13 = 0 ;
6410 void *argp14 = 0 ;
6411 int res14 = 0 ;
6412 void *argp15 = 0 ;
6413 int res15 = 0 ;
6414 PyObject * obj0 = 0 ;
6415 PyObject * obj1 = 0 ;
6416 PyObject * obj2 = 0 ;
6417 PyObject * obj3 = 0 ;
6418 PyObject * obj4 = 0 ;
6419 PyObject * obj5 = 0 ;
6420 PyObject * obj6 = 0 ;
6421 PyObject * obj7 = 0 ;
6422 PyObject * obj8 = 0 ;
6423 PyObject * obj9 = 0 ;
6424 PyObject * obj10 = 0 ;
6425 PyObject * obj11 = 0 ;
6426 PyObject * obj12 = 0 ;
6427 PyObject * obj13 = 0 ;
6428 PyObject * obj14 = 0 ;
6429
6430 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOO:initMG",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14)) SWIG_fail;
6431 ecode1 = SWIG_AsVal_int(obj0, &val1);
6432 if (!SWIG_IsOK(ecode1)) {
6433 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "initMG" "', argument " "1"" of type '" "int""'");
6434 }
6435 arg1 = (int)(val1);
6436 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
6437 if (!SWIG_IsOK(res2)) {
6438 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "initMG" "', argument " "2"" of type '" "NOsh *""'");
6439 }
6440 arg2 = (NOsh *)(argp2);
6441 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_MGparm, 0 | 0 );
6442 if (!SWIG_IsOK(res3)) {
6443 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "initMG" "', argument " "3"" of type '" "MGparm *""'");
6444 }
6445 arg3 = (MGparm *)(argp3);
6446 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_PBEparm, 0 | 0 );
6447 if (!SWIG_IsOK(res4)) {
6448 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "initMG" "', argument " "4"" of type '" "PBEparm *""'");
6449 }
6450 arg4 = (PBEparm *)(argp4);
6451 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 );
6452 if (!SWIG_IsOK(res5)) {
6453 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "initMG" "', argument " "5"" of type '" "double [3]""'");
6454 }
6455 arg5 = (double *)(argp5);
6456 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_p_Vpbe, 0 | 0 );
6457 if (!SWIG_IsOK(res6)) {
6458 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "initMG" "', argument " "6"" of type '" "Vpbe *[NOSH_MAXCALC]""'");
6459 }
6460 arg6 = (Vpbe **)(argp6);
6461 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_Valist, 0 | 0 );
6462 if (!SWIG_IsOK(res7)) {
6463 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "initMG" "', argument " "7"" of type '" "Valist *[NOSH_MAXMOL]""'");
6464 }
6465 arg7 = (Valist **)(argp7);
6466 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6467 if (!SWIG_IsOK(res8)) {
6468 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "initMG" "', argument " "8"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6469 }
6470 arg8 = (Vgrid **)(argp8);
6471 res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6472 if (!SWIG_IsOK(res9)) {
6473 SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "initMG" "', argument " "9"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6474 }
6475 arg9 = (Vgrid **)(argp9);
6476 res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6477 if (!SWIG_IsOK(res10)) {
6478 SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "initMG" "', argument " "10"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6479 }
6480 arg10 = (Vgrid **)(argp10);
6481 res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6482 if (!SWIG_IsOK(res11)) {
6483 SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "initMG" "', argument " "11"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6484 }
6485 arg11 = (Vgrid **)(argp11);
6486 res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6487 if (!SWIG_IsOK(res12)) {
6488 SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "initMG" "', argument " "12"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6489 }
6490 arg12 = (Vgrid **)(argp12);
6491 res13 = SWIG_ConvertPtr(obj12, &argp13,SWIGTYPE_p_p_Vpmgp, 0 | 0 );
6492 if (!SWIG_IsOK(res13)) {
6493 SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "initMG" "', argument " "13"" of type '" "Vpmgp *[NOSH_MAXCALC]""'");
6494 }
6495 arg13 = (Vpmgp **)(argp13);
6496 res14 = SWIG_ConvertPtr(obj13, &argp14,SWIGTYPE_p_p_Vpmg, 0 | 0 );
6497 if (!SWIG_IsOK(res14)) {
6498 SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "initMG" "', argument " "14"" of type '" "Vpmg *[NOSH_MAXCALC]""'");
6499 }
6500 arg14 = (Vpmg **)(argp14);
6501 res15 = SWIG_ConvertPtr(obj14, &argp15,SWIGTYPE_p_p_Vgrid, 0 | 0 );
6502 if (!SWIG_IsOK(res15)) {
6503 SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "initMG" "', argument " "15"" of type '" "Vgrid *[NOSH_MAXMOL]""'");
6504 }
6505 arg15 = (Vgrid **)(argp15);
6506 result = (int)initMG(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
6507 resultobj = SWIG_From_int((int)(result));
6508 return resultobj;
6509 fail:
6510 return NULL;
6511 }
6512
6513
_wrap_killMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6514 SWIGINTERN PyObject *_wrap_killMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6515 PyObject *resultobj = 0;
6516 NOsh *arg1 = (NOsh *) 0 ;
6517 Vpbe **arg2 ;
6518 Vpmgp **arg3 ;
6519 Vpmg **arg4 ;
6520 void *argp1 = 0 ;
6521 int res1 = 0 ;
6522 void *argp2 = 0 ;
6523 int res2 = 0 ;
6524 void *argp3 = 0 ;
6525 int res3 = 0 ;
6526 void *argp4 = 0 ;
6527 int res4 = 0 ;
6528 PyObject * obj0 = 0 ;
6529 PyObject * obj1 = 0 ;
6530 PyObject * obj2 = 0 ;
6531 PyObject * obj3 = 0 ;
6532
6533 if (!PyArg_ParseTuple(args,(char *)"OOOO:killMG",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6534 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6535 if (!SWIG_IsOK(res1)) {
6536 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "killMG" "', argument " "1"" of type '" "NOsh *""'");
6537 }
6538 arg1 = (NOsh *)(argp1);
6539 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_Vpbe, 0 | 0 );
6540 if (!SWIG_IsOK(res2)) {
6541 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "killMG" "', argument " "2"" of type '" "Vpbe *[NOSH_MAXCALC]""'");
6542 }
6543 arg2 = (Vpbe **)(argp2);
6544 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_Vpmgp, 0 | 0 );
6545 if (!SWIG_IsOK(res3)) {
6546 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "killMG" "', argument " "3"" of type '" "Vpmgp *[NOSH_MAXCALC]""'");
6547 }
6548 arg3 = (Vpmgp **)(argp3);
6549 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_Vpmg, 0 | 0 );
6550 if (!SWIG_IsOK(res4)) {
6551 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "killMG" "', argument " "4"" of type '" "Vpmg *[NOSH_MAXCALC]""'");
6552 }
6553 arg4 = (Vpmg **)(argp4);
6554 killMG(arg1,arg2,arg3,arg4);
6555 resultobj = SWIG_Py_Void();
6556 return resultobj;
6557 fail:
6558 return NULL;
6559 }
6560
6561
_wrap_solveMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6562 SWIGINTERN PyObject *_wrap_solveMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6563 PyObject *resultobj = 0;
6564 NOsh *arg1 = (NOsh *) 0 ;
6565 Vpmg *arg2 = (Vpmg *) 0 ;
6566 MGparm_CalcType arg3 ;
6567 int result;
6568 void *argp1 = 0 ;
6569 int res1 = 0 ;
6570 void *argp2 = 0 ;
6571 int res2 = 0 ;
6572 int val3 ;
6573 int ecode3 = 0 ;
6574 PyObject * obj0 = 0 ;
6575 PyObject * obj1 = 0 ;
6576 PyObject * obj2 = 0 ;
6577
6578 if (!PyArg_ParseTuple(args,(char *)"OOO:solveMG",&obj0,&obj1,&obj2)) SWIG_fail;
6579 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6580 if (!SWIG_IsOK(res1)) {
6581 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "solveMG" "', argument " "1"" of type '" "NOsh *""'");
6582 }
6583 arg1 = (NOsh *)(argp1);
6584 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Vpmg, 0 | 0 );
6585 if (!SWIG_IsOK(res2)) {
6586 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "solveMG" "', argument " "2"" of type '" "Vpmg *""'");
6587 }
6588 arg2 = (Vpmg *)(argp2);
6589 ecode3 = SWIG_AsVal_int(obj2, &val3);
6590 if (!SWIG_IsOK(ecode3)) {
6591 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "solveMG" "', argument " "3"" of type '" "MGparm_CalcType""'");
6592 }
6593 arg3 = (MGparm_CalcType)(val3);
6594 result = (int)solveMG(arg1,arg2,arg3);
6595 resultobj = SWIG_From_int((int)(result));
6596 return resultobj;
6597 fail:
6598 return NULL;
6599 }
6600
6601
_wrap_setPartMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6602 SWIGINTERN PyObject *_wrap_setPartMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6603 PyObject *resultobj = 0;
6604 NOsh *arg1 = (NOsh *) 0 ;
6605 MGparm *arg2 = (MGparm *) 0 ;
6606 Vpmg *arg3 = (Vpmg *) 0 ;
6607 int result;
6608 void *argp1 = 0 ;
6609 int res1 = 0 ;
6610 void *argp2 = 0 ;
6611 int res2 = 0 ;
6612 void *argp3 = 0 ;
6613 int res3 = 0 ;
6614 PyObject * obj0 = 0 ;
6615 PyObject * obj1 = 0 ;
6616 PyObject * obj2 = 0 ;
6617
6618 if (!PyArg_ParseTuple(args,(char *)"OOO:setPartMG",&obj0,&obj1,&obj2)) SWIG_fail;
6619 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
6620 if (!SWIG_IsOK(res1)) {
6621 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setPartMG" "', argument " "1"" of type '" "NOsh *""'");
6622 }
6623 arg1 = (NOsh *)(argp1);
6624 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_MGparm, 0 | 0 );
6625 if (!SWIG_IsOK(res2)) {
6626 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setPartMG" "', argument " "2"" of type '" "MGparm *""'");
6627 }
6628 arg2 = (MGparm *)(argp2);
6629 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Vpmg, 0 | 0 );
6630 if (!SWIG_IsOK(res3)) {
6631 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setPartMG" "', argument " "3"" of type '" "Vpmg *""'");
6632 }
6633 arg3 = (Vpmg *)(argp3);
6634 result = (int)setPartMG(arg1,arg2,arg3);
6635 resultobj = SWIG_From_int((int)(result));
6636 return resultobj;
6637 fail:
6638 return NULL;
6639 }
6640
6641
_wrap_killEnergy(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6642 SWIGINTERN PyObject *_wrap_killEnergy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6643 PyObject *resultobj = 0;
6644
6645 if (!PyArg_ParseTuple(args,(char *)":killEnergy")) SWIG_fail;
6646 killEnergy();
6647 resultobj = SWIG_Py_Void();
6648 return resultobj;
6649 fail:
6650 return NULL;
6651 }
6652
6653
_wrap_killForce(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6654 SWIGINTERN PyObject *_wrap_killForce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6655 PyObject *resultobj = 0;
6656 Vmem *arg1 = (Vmem *) 0 ;
6657 NOsh *arg2 = (NOsh *) 0 ;
6658 int *arg3 ;
6659 AtomForce **arg4 ;
6660 void *argp1 = 0 ;
6661 int res1 = 0 ;
6662 void *argp2 = 0 ;
6663 int res2 = 0 ;
6664 void *argp3 = 0 ;
6665 int res3 = 0 ;
6666 void *argp4 = 0 ;
6667 int res4 = 0 ;
6668 PyObject * obj0 = 0 ;
6669 PyObject * obj1 = 0 ;
6670 PyObject * obj2 = 0 ;
6671 PyObject * obj3 = 0 ;
6672
6673 if (!PyArg_ParseTuple(args,(char *)"OOOO:killForce",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6674 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vmem, 0 | 0 );
6675 if (!SWIG_IsOK(res1)) {
6676 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "killForce" "', argument " "1"" of type '" "Vmem *""'");
6677 }
6678 arg1 = (Vmem *)(argp1);
6679 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
6680 if (!SWIG_IsOK(res2)) {
6681 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "killForce" "', argument " "2"" of type '" "NOsh *""'");
6682 }
6683 arg2 = (NOsh *)(argp2);
6684 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
6685 if (!SWIG_IsOK(res3)) {
6686 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "killForce" "', argument " "3"" of type '" "int [NOSH_MAXCALC]""'");
6687 }
6688 arg3 = (int *)(argp3);
6689 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_AtomForce, 0 | 0 );
6690 if (!SWIG_IsOK(res4)) {
6691 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "killForce" "', argument " "4"" of type '" "AtomForce *[NOSH_MAXCALC]""'");
6692 }
6693 arg4 = (AtomForce **)(argp4);
6694 killForce(arg1,arg2,arg3,arg4);
6695 resultobj = SWIG_Py_Void();
6696 return resultobj;
6697 fail:
6698 return NULL;
6699 }
6700
6701
_wrap_writedataMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6702 SWIGINTERN PyObject *_wrap_writedataMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6703 PyObject *resultobj = 0;
6704 int arg1 ;
6705 NOsh *arg2 = (NOsh *) 0 ;
6706 PBEparm *arg3 = (PBEparm *) 0 ;
6707 Vpmg *arg4 = (Vpmg *) 0 ;
6708 int result;
6709 int val1 ;
6710 int ecode1 = 0 ;
6711 void *argp2 = 0 ;
6712 int res2 = 0 ;
6713 void *argp3 = 0 ;
6714 int res3 = 0 ;
6715 void *argp4 = 0 ;
6716 int res4 = 0 ;
6717 PyObject * obj0 = 0 ;
6718 PyObject * obj1 = 0 ;
6719 PyObject * obj2 = 0 ;
6720 PyObject * obj3 = 0 ;
6721
6722 if (!PyArg_ParseTuple(args,(char *)"OOOO:writedataMG",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6723 ecode1 = SWIG_AsVal_int(obj0, &val1);
6724 if (!SWIG_IsOK(ecode1)) {
6725 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "writedataMG" "', argument " "1"" of type '" "int""'");
6726 }
6727 arg1 = (int)(val1);
6728 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
6729 if (!SWIG_IsOK(res2)) {
6730 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "writedataMG" "', argument " "2"" of type '" "NOsh *""'");
6731 }
6732 arg2 = (NOsh *)(argp2);
6733 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_PBEparm, 0 | 0 );
6734 if (!SWIG_IsOK(res3)) {
6735 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "writedataMG" "', argument " "3"" of type '" "PBEparm *""'");
6736 }
6737 arg3 = (PBEparm *)(argp3);
6738 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_Vpmg, 0 | 0 );
6739 if (!SWIG_IsOK(res4)) {
6740 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "writedataMG" "', argument " "4"" of type '" "Vpmg *""'");
6741 }
6742 arg4 = (Vpmg *)(argp4);
6743 result = (int)writedataMG(arg1,arg2,arg3,arg4);
6744 resultobj = SWIG_From_int((int)(result));
6745 return resultobj;
6746 fail:
6747 return NULL;
6748 }
6749
6750
_wrap_writematMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6751 SWIGINTERN PyObject *_wrap_writematMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6752 PyObject *resultobj = 0;
6753 int arg1 ;
6754 NOsh *arg2 = (NOsh *) 0 ;
6755 PBEparm *arg3 = (PBEparm *) 0 ;
6756 Vpmg *arg4 = (Vpmg *) 0 ;
6757 int result;
6758 int val1 ;
6759 int ecode1 = 0 ;
6760 void *argp2 = 0 ;
6761 int res2 = 0 ;
6762 void *argp3 = 0 ;
6763 int res3 = 0 ;
6764 void *argp4 = 0 ;
6765 int res4 = 0 ;
6766 PyObject * obj0 = 0 ;
6767 PyObject * obj1 = 0 ;
6768 PyObject * obj2 = 0 ;
6769 PyObject * obj3 = 0 ;
6770
6771 if (!PyArg_ParseTuple(args,(char *)"OOOO:writematMG",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6772 ecode1 = SWIG_AsVal_int(obj0, &val1);
6773 if (!SWIG_IsOK(ecode1)) {
6774 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "writematMG" "', argument " "1"" of type '" "int""'");
6775 }
6776 arg1 = (int)(val1);
6777 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
6778 if (!SWIG_IsOK(res2)) {
6779 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "writematMG" "', argument " "2"" of type '" "NOsh *""'");
6780 }
6781 arg2 = (NOsh *)(argp2);
6782 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_PBEparm, 0 | 0 );
6783 if (!SWIG_IsOK(res3)) {
6784 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "writematMG" "', argument " "3"" of type '" "PBEparm *""'");
6785 }
6786 arg3 = (PBEparm *)(argp3);
6787 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_Vpmg, 0 | 0 );
6788 if (!SWIG_IsOK(res4)) {
6789 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "writematMG" "', argument " "4"" of type '" "Vpmg *""'");
6790 }
6791 arg4 = (Vpmg *)(argp4);
6792 result = (int)writematMG(arg1,arg2,arg3,arg4);
6793 resultobj = SWIG_From_int((int)(result));
6794 return resultobj;
6795 fail:
6796 return NULL;
6797 }
6798
6799
_wrap_printForce(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6800 SWIGINTERN PyObject *_wrap_printForce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6801 PyObject *resultobj = 0;
6802 Vcom *arg1 = (Vcom *) 0 ;
6803 NOsh *arg2 = (NOsh *) 0 ;
6804 int *arg3 ;
6805 AtomForce **arg4 ;
6806 int arg5 ;
6807 int result;
6808 void *argp1 = 0 ;
6809 int res1 = 0 ;
6810 void *argp2 = 0 ;
6811 int res2 = 0 ;
6812 void *argp3 = 0 ;
6813 int res3 = 0 ;
6814 void *argp4 = 0 ;
6815 int res4 = 0 ;
6816 int val5 ;
6817 int ecode5 = 0 ;
6818 PyObject * obj0 = 0 ;
6819 PyObject * obj1 = 0 ;
6820 PyObject * obj2 = 0 ;
6821 PyObject * obj3 = 0 ;
6822 PyObject * obj4 = 0 ;
6823
6824 if (!PyArg_ParseTuple(args,(char *)"OOOOO:printForce",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6825 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
6826 if (!SWIG_IsOK(res1)) {
6827 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printForce" "', argument " "1"" of type '" "Vcom *""'");
6828 }
6829 arg1 = (Vcom *)(argp1);
6830 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
6831 if (!SWIG_IsOK(res2)) {
6832 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "printForce" "', argument " "2"" of type '" "NOsh *""'");
6833 }
6834 arg2 = (NOsh *)(argp2);
6835 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
6836 if (!SWIG_IsOK(res3)) {
6837 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "printForce" "', argument " "3"" of type '" "int [NOSH_MAXCALC]""'");
6838 }
6839 arg3 = (int *)(argp3);
6840 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_AtomForce, 0 | 0 );
6841 if (!SWIG_IsOK(res4)) {
6842 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "printForce" "', argument " "4"" of type '" "AtomForce *[NOSH_MAXCALC]""'");
6843 }
6844 arg4 = (AtomForce **)(argp4);
6845 ecode5 = SWIG_AsVal_int(obj4, &val5);
6846 if (!SWIG_IsOK(ecode5)) {
6847 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "printForce" "', argument " "5"" of type '" "int""'");
6848 }
6849 arg5 = (int)(val5);
6850 result = (int)printForce(arg1,arg2,arg3,arg4,arg5);
6851 resultobj = SWIG_From_int((int)(result));
6852 return resultobj;
6853 fail:
6854 return NULL;
6855 }
6856
6857
_wrap_printElecForce(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6858 SWIGINTERN PyObject *_wrap_printElecForce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6859 PyObject *resultobj = 0;
6860 Vcom *arg1 = (Vcom *) 0 ;
6861 NOsh *arg2 = (NOsh *) 0 ;
6862 int *arg3 ;
6863 AtomForce **arg4 ;
6864 int arg5 ;
6865 int result;
6866 void *argp1 = 0 ;
6867 int res1 = 0 ;
6868 void *argp2 = 0 ;
6869 int res2 = 0 ;
6870 void *argp3 = 0 ;
6871 int res3 = 0 ;
6872 void *argp4 = 0 ;
6873 int res4 = 0 ;
6874 int val5 ;
6875 int ecode5 = 0 ;
6876 PyObject * obj0 = 0 ;
6877 PyObject * obj1 = 0 ;
6878 PyObject * obj2 = 0 ;
6879 PyObject * obj3 = 0 ;
6880 PyObject * obj4 = 0 ;
6881
6882 if (!PyArg_ParseTuple(args,(char *)"OOOOO:printElecForce",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6883 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
6884 if (!SWIG_IsOK(res1)) {
6885 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printElecForce" "', argument " "1"" of type '" "Vcom *""'");
6886 }
6887 arg1 = (Vcom *)(argp1);
6888 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
6889 if (!SWIG_IsOK(res2)) {
6890 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "printElecForce" "', argument " "2"" of type '" "NOsh *""'");
6891 }
6892 arg2 = (NOsh *)(argp2);
6893 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
6894 if (!SWIG_IsOK(res3)) {
6895 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "printElecForce" "', argument " "3"" of type '" "int [NOSH_MAXCALC]""'");
6896 }
6897 arg3 = (int *)(argp3);
6898 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_AtomForce, 0 | 0 );
6899 if (!SWIG_IsOK(res4)) {
6900 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "printElecForce" "', argument " "4"" of type '" "AtomForce *[NOSH_MAXCALC]""'");
6901 }
6902 arg4 = (AtomForce **)(argp4);
6903 ecode5 = SWIG_AsVal_int(obj4, &val5);
6904 if (!SWIG_IsOK(ecode5)) {
6905 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "printElecForce" "', argument " "5"" of type '" "int""'");
6906 }
6907 arg5 = (int)(val5);
6908 result = (int)printElecForce(arg1,arg2,arg3,arg4,arg5);
6909 resultobj = SWIG_From_int((int)(result));
6910 return resultobj;
6911 fail:
6912 return NULL;
6913 }
6914
6915
_wrap_printApolForce(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6916 SWIGINTERN PyObject *_wrap_printApolForce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6917 PyObject *resultobj = 0;
6918 Vcom *arg1 = (Vcom *) 0 ;
6919 NOsh *arg2 = (NOsh *) 0 ;
6920 int *arg3 ;
6921 AtomForce **arg4 ;
6922 int arg5 ;
6923 int result;
6924 void *argp1 = 0 ;
6925 int res1 = 0 ;
6926 void *argp2 = 0 ;
6927 int res2 = 0 ;
6928 void *argp3 = 0 ;
6929 int res3 = 0 ;
6930 void *argp4 = 0 ;
6931 int res4 = 0 ;
6932 int val5 ;
6933 int ecode5 = 0 ;
6934 PyObject * obj0 = 0 ;
6935 PyObject * obj1 = 0 ;
6936 PyObject * obj2 = 0 ;
6937 PyObject * obj3 = 0 ;
6938 PyObject * obj4 = 0 ;
6939
6940 if (!PyArg_ParseTuple(args,(char *)"OOOOO:printApolForce",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6941 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
6942 if (!SWIG_IsOK(res1)) {
6943 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printApolForce" "', argument " "1"" of type '" "Vcom *""'");
6944 }
6945 arg1 = (Vcom *)(argp1);
6946 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
6947 if (!SWIG_IsOK(res2)) {
6948 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "printApolForce" "', argument " "2"" of type '" "NOsh *""'");
6949 }
6950 arg2 = (NOsh *)(argp2);
6951 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
6952 if (!SWIG_IsOK(res3)) {
6953 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "printApolForce" "', argument " "3"" of type '" "int [NOSH_MAXCALC]""'");
6954 }
6955 arg3 = (int *)(argp3);
6956 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_AtomForce, 0 | 0 );
6957 if (!SWIG_IsOK(res4)) {
6958 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "printApolForce" "', argument " "4"" of type '" "AtomForce *[NOSH_MAXCALC]""'");
6959 }
6960 arg4 = (AtomForce **)(argp4);
6961 ecode5 = SWIG_AsVal_int(obj4, &val5);
6962 if (!SWIG_IsOK(ecode5)) {
6963 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "printApolForce" "', argument " "5"" of type '" "int""'");
6964 }
6965 arg5 = (int)(val5);
6966 result = (int)printApolForce(arg1,arg2,arg3,arg4,arg5);
6967 resultobj = SWIG_From_int((int)(result));
6968 return resultobj;
6969 fail:
6970 return NULL;
6971 }
6972
6973
_wrap_startVio(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6974 SWIGINTERN PyObject *_wrap_startVio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6975 PyObject *resultobj = 0;
6976
6977 if (!PyArg_ParseTuple(args,(char *)":startVio")) SWIG_fail;
6978 startVio();
6979 resultobj = SWIG_Py_Void();
6980 return resultobj;
6981 fail:
6982 return NULL;
6983 }
6984
6985
_wrap_Vacc_molAcc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)6986 SWIGINTERN PyObject *_wrap_Vacc_molAcc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6987 PyObject *resultobj = 0;
6988 Vacc *arg1 = (Vacc *) 0 ;
6989 double *arg2 ;
6990 double arg3 ;
6991 double result;
6992 void *argp1 = 0 ;
6993 int res1 = 0 ;
6994 void *argp2 = 0 ;
6995 int res2 = 0 ;
6996 double val3 ;
6997 int ecode3 = 0 ;
6998 PyObject * obj0 = 0 ;
6999 PyObject * obj1 = 0 ;
7000 PyObject * obj2 = 0 ;
7001
7002 if (!PyArg_ParseTuple(args,(char *)"OOO:Vacc_molAcc",&obj0,&obj1,&obj2)) SWIG_fail;
7003 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vacc, 0 | 0 );
7004 if (!SWIG_IsOK(res1)) {
7005 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vacc_molAcc" "', argument " "1"" of type '" "Vacc *""'");
7006 }
7007 arg1 = (Vacc *)(argp1);
7008 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 );
7009 if (!SWIG_IsOK(res2)) {
7010 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vacc_molAcc" "', argument " "2"" of type '" "double [3]""'");
7011 }
7012 arg2 = (double *)(argp2);
7013 ecode3 = SWIG_AsVal_double(obj2, &val3);
7014 if (!SWIG_IsOK(ecode3)) {
7015 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Vacc_molAcc" "', argument " "3"" of type '" "double""'");
7016 }
7017 arg3 = (double)(val3);
7018 result = (double)Vacc_molAcc(arg1,arg2,arg3);
7019 resultobj = SWIG_From_double((double)(result));
7020 return resultobj;
7021 fail:
7022 return NULL;
7023 }
7024
7025
_wrap_Vacc_vdwAcc(PyObject * SWIGUNUSEDPARM (self),PyObject * args)7026 SWIGINTERN PyObject *_wrap_Vacc_vdwAcc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7027 PyObject *resultobj = 0;
7028 Vacc *arg1 = (Vacc *) 0 ;
7029 double *arg2 ;
7030 double result;
7031 void *argp1 = 0 ;
7032 int res1 = 0 ;
7033 void *argp2 = 0 ;
7034 int res2 = 0 ;
7035 PyObject * obj0 = 0 ;
7036 PyObject * obj1 = 0 ;
7037
7038 if (!PyArg_ParseTuple(args,(char *)"OO:Vacc_vdwAcc",&obj0,&obj1)) SWIG_fail;
7039 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vacc, 0 | 0 );
7040 if (!SWIG_IsOK(res1)) {
7041 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vacc_vdwAcc" "', argument " "1"" of type '" "Vacc *""'");
7042 }
7043 arg1 = (Vacc *)(argp1);
7044 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 );
7045 if (!SWIG_IsOK(res2)) {
7046 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vacc_vdwAcc" "', argument " "2"" of type '" "double [3]""'");
7047 }
7048 arg2 = (double *)(argp2);
7049 result = (double)Vacc_vdwAcc(arg1,arg2);
7050 resultobj = SWIG_From_double((double)(result));
7051 return resultobj;
7052 fail:
7053 return NULL;
7054 }
7055
7056
_wrap_energyMG(PyObject * SWIGUNUSEDPARM (self),PyObject * args)7057 SWIGINTERN PyObject *_wrap_energyMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7058 PyObject *resultobj = 0;
7059 NOsh *arg1 = (NOsh *) 0 ;
7060 int arg2 ;
7061 Vpmg *arg3 = (Vpmg *) 0 ;
7062 int *arg4 = (int *) 0 ;
7063 double *arg5 = (double *) 0 ;
7064 double *arg6 = (double *) 0 ;
7065 double *arg7 = (double *) 0 ;
7066 double *arg8 = (double *) 0 ;
7067 int result;
7068 void *argp1 = 0 ;
7069 int res1 = 0 ;
7070 int val2 ;
7071 int ecode2 = 0 ;
7072 void *argp3 = 0 ;
7073 int res3 = 0 ;
7074 int temp4 ;
7075 int res4 = 0 ;
7076 double temp5 ;
7077 int res5 = 0 ;
7078 double temp6 ;
7079 int res6 = 0 ;
7080 double temp7 ;
7081 int res7 = 0 ;
7082 double temp8 ;
7083 int res8 = 0 ;
7084 PyObject * obj0 = 0 ;
7085 PyObject * obj1 = 0 ;
7086 PyObject * obj2 = 0 ;
7087 PyObject * obj3 = 0 ;
7088 PyObject * obj4 = 0 ;
7089 PyObject * obj5 = 0 ;
7090 PyObject * obj6 = 0 ;
7091 PyObject * obj7 = 0 ;
7092
7093 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:energyMG",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7094 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
7095 if (!SWIG_IsOK(res1)) {
7096 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "energyMG" "', argument " "1"" of type '" "NOsh *""'");
7097 }
7098 arg1 = (NOsh *)(argp1);
7099 ecode2 = SWIG_AsVal_int(obj1, &val2);
7100 if (!SWIG_IsOK(ecode2)) {
7101 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "energyMG" "', argument " "2"" of type '" "int""'");
7102 }
7103 arg2 = (int)(val2);
7104 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Vpmg, 0 | 0 );
7105 if (!SWIG_IsOK(res3)) {
7106 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "energyMG" "', argument " "3"" of type '" "Vpmg *""'");
7107 }
7108 arg3 = (Vpmg *)(argp3);
7109 if (!(SWIG_IsOK((res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4),SWIGTYPE_p_int,0))))) {
7110 int val;
7111 int ecode = SWIG_AsVal_int(obj3, &val);
7112 if (!SWIG_IsOK(ecode)) {
7113 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "energyMG" "', argument " "4"" of type '" "int""'");
7114 }
7115 temp4 = (int)(val);
7116 arg4 = &temp4;
7117 res4 = SWIG_AddTmpMask(ecode);
7118 }
7119 if (!(SWIG_IsOK((res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5),SWIGTYPE_p_double,0))))) {
7120 double val;
7121 int ecode = SWIG_AsVal_double(obj4, &val);
7122 if (!SWIG_IsOK(ecode)) {
7123 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "energyMG" "', argument " "5"" of type '" "double""'");
7124 }
7125 temp5 = (double)(val);
7126 arg5 = &temp5;
7127 res5 = SWIG_AddTmpMask(ecode);
7128 }
7129 if (!(SWIG_IsOK((res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6),SWIGTYPE_p_double,0))))) {
7130 double val;
7131 int ecode = SWIG_AsVal_double(obj5, &val);
7132 if (!SWIG_IsOK(ecode)) {
7133 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "energyMG" "', argument " "6"" of type '" "double""'");
7134 }
7135 temp6 = (double)(val);
7136 arg6 = &temp6;
7137 res6 = SWIG_AddTmpMask(ecode);
7138 }
7139 if (!(SWIG_IsOK((res7 = SWIG_ConvertPtr(obj6,SWIG_as_voidptrptr(&arg7),SWIGTYPE_p_double,0))))) {
7140 double val;
7141 int ecode = SWIG_AsVal_double(obj6, &val);
7142 if (!SWIG_IsOK(ecode)) {
7143 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "energyMG" "', argument " "7"" of type '" "double""'");
7144 }
7145 temp7 = (double)(val);
7146 arg7 = &temp7;
7147 res7 = SWIG_AddTmpMask(ecode);
7148 }
7149 if (!(SWIG_IsOK((res8 = SWIG_ConvertPtr(obj7,SWIG_as_voidptrptr(&arg8),SWIGTYPE_p_double,0))))) {
7150 double val;
7151 int ecode = SWIG_AsVal_double(obj7, &val);
7152 if (!SWIG_IsOK(ecode)) {
7153 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "energyMG" "', argument " "8"" of type '" "double""'");
7154 }
7155 temp8 = (double)(val);
7156 arg8 = &temp8;
7157 res8 = SWIG_AddTmpMask(ecode);
7158 }
7159 result = (int)energyMG(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7160 resultobj = SWIG_From_int((int)(result));
7161 if (SWIG_IsTmpObj(res5)) {
7162 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
7163 } else {
7164 int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7165 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
7166 }
7167 if (SWIG_IsNewObj(res4)) free((char*)arg4);
7168 if (SWIG_IsNewObj(res6)) free((char*)arg6);
7169 if (SWIG_IsNewObj(res7)) free((char*)arg7);
7170 if (SWIG_IsNewObj(res8)) free((char*)arg8);
7171 return resultobj;
7172 fail:
7173 if (SWIG_IsNewObj(res4)) free((char*)arg4);
7174 if (SWIG_IsNewObj(res6)) free((char*)arg6);
7175 if (SWIG_IsNewObj(res7)) free((char*)arg7);
7176 if (SWIG_IsNewObj(res8)) free((char*)arg8);
7177 return NULL;
7178 }
7179
7180
_wrap_printEnergy(PyObject * SWIGUNUSEDPARM (self),PyObject * args)7181 SWIGINTERN PyObject *_wrap_printEnergy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7182 PyObject *resultobj = 0;
7183 Vcom *arg1 = (Vcom *) 0 ;
7184 NOsh *arg2 = (NOsh *) 0 ;
7185 double *arg3 ;
7186 int arg4 ;
7187 int result;
7188 void *argp1 = 0 ;
7189 int res1 = 0 ;
7190 void *argp2 = 0 ;
7191 int res2 = 0 ;
7192 int val4 ;
7193 int ecode4 = 0 ;
7194 PyObject * obj0 = 0 ;
7195 PyObject * obj1 = 0 ;
7196 PyObject * obj2 = 0 ;
7197 PyObject * obj3 = 0 ;
7198
7199 if (!PyArg_ParseTuple(args,(char *)"OOOO:printEnergy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7200 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
7201 if (!SWIG_IsOK(res1)) {
7202 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printEnergy" "', argument " "1"" of type '" "Vcom *""'");
7203 }
7204 arg1 = (Vcom *)(argp1);
7205 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
7206 if (!SWIG_IsOK(res2)) {
7207 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "printEnergy" "', argument " "2"" of type '" "NOsh *""'");
7208 }
7209 arg2 = (NOsh *)(argp2);
7210 {
7211 /* Check if is a list */
7212 if (PyList_Check(obj2)) {
7213 int size = PyList_Size(obj2);
7214 int i = 0;
7215 arg3 = (double *) malloc((size+1)*sizeof(double));
7216 for (i = 0; i < size; i++) {
7217 PyObject *o = PyList_GetItem(obj2,i);
7218 if (PyFloat_Check(o))
7219 arg3[i] = PyFloat_AsDouble(PyList_GetItem(obj2,i));
7220 else {
7221 PyErr_SetString(PyExc_TypeError,"list must contain floats");
7222 free(arg3);
7223 return NULL;
7224 }
7225 }
7226 arg3[i] = 0;
7227 } else {
7228 PyErr_SetString(PyExc_TypeError,"not a list");
7229 return NULL;
7230 }
7231 }
7232 ecode4 = SWIG_AsVal_int(obj3, &val4);
7233 if (!SWIG_IsOK(ecode4)) {
7234 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "printEnergy" "', argument " "4"" of type '" "int""'");
7235 }
7236 arg4 = (int)(val4);
7237 result = (int)printEnergy(arg1,arg2,arg3,arg4);
7238 resultobj = SWIG_From_int((int)(result));
7239 return resultobj;
7240 fail:
7241 return NULL;
7242 }
7243
7244
_wrap_printElecEnergy(PyObject * SWIGUNUSEDPARM (self),PyObject * args)7245 SWIGINTERN PyObject *_wrap_printElecEnergy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7246 PyObject *resultobj = 0;
7247 Vcom *arg1 = (Vcom *) 0 ;
7248 NOsh *arg2 = (NOsh *) 0 ;
7249 double *arg3 ;
7250 int arg4 ;
7251 int result;
7252 void *argp1 = 0 ;
7253 int res1 = 0 ;
7254 void *argp2 = 0 ;
7255 int res2 = 0 ;
7256 int val4 ;
7257 int ecode4 = 0 ;
7258 PyObject * obj0 = 0 ;
7259 PyObject * obj1 = 0 ;
7260 PyObject * obj2 = 0 ;
7261 PyObject * obj3 = 0 ;
7262
7263 if (!PyArg_ParseTuple(args,(char *)"OOOO:printElecEnergy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7264 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
7265 if (!SWIG_IsOK(res1)) {
7266 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printElecEnergy" "', argument " "1"" of type '" "Vcom *""'");
7267 }
7268 arg1 = (Vcom *)(argp1);
7269 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
7270 if (!SWIG_IsOK(res2)) {
7271 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "printElecEnergy" "', argument " "2"" of type '" "NOsh *""'");
7272 }
7273 arg2 = (NOsh *)(argp2);
7274 {
7275 /* Check if is a list */
7276 if (PyList_Check(obj2)) {
7277 int size = PyList_Size(obj2);
7278 int i = 0;
7279 arg3 = (double *) malloc((size+1)*sizeof(double));
7280 for (i = 0; i < size; i++) {
7281 PyObject *o = PyList_GetItem(obj2,i);
7282 if (PyFloat_Check(o))
7283 arg3[i] = PyFloat_AsDouble(PyList_GetItem(obj2,i));
7284 else {
7285 PyErr_SetString(PyExc_TypeError,"list must contain floats");
7286 free(arg3);
7287 return NULL;
7288 }
7289 }
7290 arg3[i] = 0;
7291 } else {
7292 PyErr_SetString(PyExc_TypeError,"not a list");
7293 return NULL;
7294 }
7295 }
7296 ecode4 = SWIG_AsVal_int(obj3, &val4);
7297 if (!SWIG_IsOK(ecode4)) {
7298 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "printElecEnergy" "', argument " "4"" of type '" "int""'");
7299 }
7300 arg4 = (int)(val4);
7301 result = (int)printElecEnergy(arg1,arg2,arg3,arg4);
7302 resultobj = SWIG_From_int((int)(result));
7303 return resultobj;
7304 fail:
7305 return NULL;
7306 }
7307
7308
_wrap_printApolEnergy(PyObject * SWIGUNUSEDPARM (self),PyObject * args)7309 SWIGINTERN PyObject *_wrap_printApolEnergy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7310 PyObject *resultobj = 0;
7311 NOsh *arg1 = (NOsh *) 0 ;
7312 int arg2 ;
7313 int result;
7314 void *argp1 = 0 ;
7315 int res1 = 0 ;
7316 int val2 ;
7317 int ecode2 = 0 ;
7318 PyObject * obj0 = 0 ;
7319 PyObject * obj1 = 0 ;
7320
7321 if (!PyArg_ParseTuple(args,(char *)"OO:printApolEnergy",&obj0,&obj1)) SWIG_fail;
7322 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NOsh, 0 | 0 );
7323 if (!SWIG_IsOK(res1)) {
7324 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "printApolEnergy" "', argument " "1"" of type '" "NOsh *""'");
7325 }
7326 arg1 = (NOsh *)(argp1);
7327 ecode2 = SWIG_AsVal_int(obj1, &val2);
7328 if (!SWIG_IsOK(ecode2)) {
7329 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "printApolEnergy" "', argument " "2"" of type '" "int""'");
7330 }
7331 arg2 = (int)(val2);
7332 result = (int)printApolEnergy(arg1,arg2);
7333 resultobj = SWIG_From_int((int)(result));
7334 return resultobj;
7335 fail:
7336 return NULL;
7337 }
7338
7339
_wrap_returnEnergy(PyObject * SWIGUNUSEDPARM (self),PyObject * args)7340 SWIGINTERN PyObject *_wrap_returnEnergy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7341 PyObject *resultobj = 0;
7342 Vcom *arg1 = (Vcom *) 0 ;
7343 NOsh *arg2 = (NOsh *) 0 ;
7344 double *arg3 ;
7345 int arg4 ;
7346 double result;
7347 void *argp1 = 0 ;
7348 int res1 = 0 ;
7349 void *argp2 = 0 ;
7350 int res2 = 0 ;
7351 int val4 ;
7352 int ecode4 = 0 ;
7353 PyObject * obj0 = 0 ;
7354 PyObject * obj1 = 0 ;
7355 PyObject * obj2 = 0 ;
7356 PyObject * obj3 = 0 ;
7357
7358 if (!PyArg_ParseTuple(args,(char *)"OOOO:returnEnergy",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7359 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Vcom, 0 | 0 );
7360 if (!SWIG_IsOK(res1)) {
7361 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "returnEnergy" "', argument " "1"" of type '" "Vcom *""'");
7362 }
7363 arg1 = (Vcom *)(argp1);
7364 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_NOsh, 0 | 0 );
7365 if (!SWIG_IsOK(res2)) {
7366 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "returnEnergy" "', argument " "2"" of type '" "NOsh *""'");
7367 }
7368 arg2 = (NOsh *)(argp2);
7369 {
7370 /* Check if is a list */
7371 if (PyList_Check(obj2)) {
7372 int size = PyList_Size(obj2);
7373 int i = 0;
7374 arg3 = (double *) malloc((size+1)*sizeof(double));
7375 for (i = 0; i < size; i++) {
7376 PyObject *o = PyList_GetItem(obj2,i);
7377 if (PyFloat_Check(o))
7378 arg3[i] = PyFloat_AsDouble(PyList_GetItem(obj2,i));
7379 else {
7380 PyErr_SetString(PyExc_TypeError,"list must contain floats");
7381 free(arg3);
7382 return NULL;
7383 }
7384 }
7385 arg3[i] = 0;
7386 } else {
7387 PyErr_SetString(PyExc_TypeError,"not a list");
7388 return NULL;
7389 }
7390 }
7391 ecode4 = SWIG_AsVal_int(obj3, &val4);
7392 if (!SWIG_IsOK(ecode4)) {
7393 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "returnEnergy" "', argument " "4"" of type '" "int""'");
7394 }
7395 arg4 = (int)(val4);
7396 result = (double)returnEnergy(arg1,arg2,arg3,arg4);
7397 resultobj = SWIG_From_double((double)(result));
7398 return resultobj;
7399 fail:
7400 return NULL;
7401 }
7402
7403
7404 static PyMethodDef SwigMethods[] = {
7405 { (char *)"new_Valist", _wrap_new_Valist, METH_VARARGS, NULL},
7406 { (char *)"delete_Valist", _wrap_delete_Valist, METH_VARARGS, NULL},
7407 { (char *)"Valist_number_set", _wrap_Valist_number_set, METH_VARARGS, NULL},
7408 { (char *)"Valist_number_get", _wrap_Valist_number_get, METH_VARARGS, NULL},
7409 { (char *)"Valist_swigregister", Valist_swigregister, METH_VARARGS, NULL},
7410 { (char *)"Valist_getAtomList", _wrap_Valist_getAtomList, METH_VARARGS, NULL},
7411 { (char *)"Valist_getAtom", _wrap_Valist_getAtom, METH_VARARGS, NULL},
7412 { (char *)"new_Vatom", _wrap_new_Vatom, METH_VARARGS, NULL},
7413 { (char *)"delete_Vatom", _wrap_delete_Vatom, METH_VARARGS, NULL},
7414 { (char *)"Vatom_id_set", _wrap_Vatom_id_set, METH_VARARGS, NULL},
7415 { (char *)"Vatom_id_get", _wrap_Vatom_id_get, METH_VARARGS, NULL},
7416 { (char *)"Vatom_swigregister", Vatom_swigregister, METH_VARARGS, NULL},
7417 { (char *)"Vatom_getPosition", _wrap_Vatom_getPosition, METH_VARARGS, NULL},
7418 { (char *)"Vatom_setCharge", _wrap_Vatom_setCharge, METH_VARARGS, NULL},
7419 { (char *)"Vatom_getCharge", _wrap_Vatom_getCharge, METH_VARARGS, NULL},
7420 { (char *)"Vatom_getRadius", _wrap_Vatom_getRadius, METH_VARARGS, NULL},
7421 { (char *)"new_MGparm", _wrap_new_MGparm, METH_VARARGS, NULL},
7422 { (char *)"delete_MGparm", _wrap_delete_MGparm, METH_VARARGS, NULL},
7423 { (char *)"MGparm_type_set", _wrap_MGparm_type_set, METH_VARARGS, NULL},
7424 { (char *)"MGparm_type_get", _wrap_MGparm_type_get, METH_VARARGS, NULL},
7425 { (char *)"MGparm_swigregister", MGparm_swigregister, METH_VARARGS, NULL},
7426 { (char *)"MGparm_setCenterX", _wrap_MGparm_setCenterX, METH_VARARGS, NULL},
7427 { (char *)"MGparm_setCenterY", _wrap_MGparm_setCenterY, METH_VARARGS, NULL},
7428 { (char *)"MGparm_setCenterZ", _wrap_MGparm_setCenterZ, METH_VARARGS, NULL},
7429 { (char *)"new_PBEparm", _wrap_new_PBEparm, METH_VARARGS, NULL},
7430 { (char *)"delete_PBEparm", _wrap_delete_PBEparm, METH_VARARGS, NULL},
7431 { (char *)"PBEparm_temp_set", _wrap_PBEparm_temp_set, METH_VARARGS, NULL},
7432 { (char *)"PBEparm_temp_get", _wrap_PBEparm_temp_get, METH_VARARGS, NULL},
7433 { (char *)"PBEparm_pdie_set", _wrap_PBEparm_pdie_set, METH_VARARGS, NULL},
7434 { (char *)"PBEparm_pdie_get", _wrap_PBEparm_pdie_get, METH_VARARGS, NULL},
7435 { (char *)"PBEparm_sdie_set", _wrap_PBEparm_sdie_set, METH_VARARGS, NULL},
7436 { (char *)"PBEparm_sdie_get", _wrap_PBEparm_sdie_get, METH_VARARGS, NULL},
7437 { (char *)"PBEparm_molid_set", _wrap_PBEparm_molid_set, METH_VARARGS, NULL},
7438 { (char *)"PBEparm_molid_get", _wrap_PBEparm_molid_get, METH_VARARGS, NULL},
7439 { (char *)"PBEparm_swigregister", PBEparm_swigregister, METH_VARARGS, NULL},
7440 { (char *)"new_Vcom", _wrap_new_Vcom, METH_VARARGS, NULL},
7441 { (char *)"delete_Vcom", _wrap_delete_Vcom, METH_VARARGS, NULL},
7442 { (char *)"Vcom_swigregister", Vcom_swigregister, METH_VARARGS, NULL},
7443 { (char *)"Vcom_ctor", _wrap_Vcom_ctor, METH_VARARGS, NULL},
7444 { (char *)"Vcom_size", _wrap_Vcom_size, METH_VARARGS, NULL},
7445 { (char *)"Vcom_rank", _wrap_Vcom_rank, METH_VARARGS, NULL},
7446 { (char *)"new_Vmem", _wrap_new_Vmem, METH_VARARGS, NULL},
7447 { (char *)"delete_Vmem", _wrap_delete_Vmem, METH_VARARGS, NULL},
7448 { (char *)"Vmem_swigregister", Vmem_swigregister, METH_VARARGS, NULL},
7449 { (char *)"Vmem_ctor", _wrap_Vmem_ctor, METH_VARARGS, NULL},
7450 { (char *)"new_Vpmg", _wrap_new_Vpmg, METH_VARARGS, NULL},
7451 { (char *)"delete_Vpmg", _wrap_delete_Vpmg, METH_VARARGS, NULL},
7452 { (char *)"Vpmg_swigregister", Vpmg_swigregister, METH_VARARGS, NULL},
7453 { (char *)"new_Vpbe", _wrap_new_Vpbe, METH_VARARGS, NULL},
7454 { (char *)"delete_Vpbe", _wrap_delete_Vpbe, METH_VARARGS, NULL},
7455 { (char *)"Vpbe_acc_set", _wrap_Vpbe_acc_set, METH_VARARGS, NULL},
7456 { (char *)"Vpbe_acc_get", _wrap_Vpbe_acc_get, METH_VARARGS, NULL},
7457 { (char *)"Vpbe_swigregister", Vpbe_swigregister, METH_VARARGS, NULL},
7458 { (char *)"new_NOsh_calc", _wrap_new_NOsh_calc, METH_VARARGS, NULL},
7459 { (char *)"delete_NOsh_calc", _wrap_delete_NOsh_calc, METH_VARARGS, NULL},
7460 { (char *)"NOsh_calc_mgparm_set", _wrap_NOsh_calc_mgparm_set, METH_VARARGS, NULL},
7461 { (char *)"NOsh_calc_mgparm_get", _wrap_NOsh_calc_mgparm_get, METH_VARARGS, NULL},
7462 { (char *)"NOsh_calc_femparm_set", _wrap_NOsh_calc_femparm_set, METH_VARARGS, NULL},
7463 { (char *)"NOsh_calc_femparm_get", _wrap_NOsh_calc_femparm_get, METH_VARARGS, NULL},
7464 { (char *)"NOsh_calc_pbeparm_set", _wrap_NOsh_calc_pbeparm_set, METH_VARARGS, NULL},
7465 { (char *)"NOsh_calc_pbeparm_get", _wrap_NOsh_calc_pbeparm_get, METH_VARARGS, NULL},
7466 { (char *)"NOsh_calc_calctype_set", _wrap_NOsh_calc_calctype_set, METH_VARARGS, NULL},
7467 { (char *)"NOsh_calc_calctype_get", _wrap_NOsh_calc_calctype_get, METH_VARARGS, NULL},
7468 { (char *)"NOsh_calc_swigregister", NOsh_calc_swigregister, METH_VARARGS, NULL},
7469 { (char *)"new_NOsh", _wrap_new_NOsh, METH_VARARGS, NULL},
7470 { (char *)"delete_NOsh", _wrap_delete_NOsh, METH_VARARGS, NULL},
7471 { (char *)"NOsh_ncalc_set", _wrap_NOsh_ncalc_set, METH_VARARGS, NULL},
7472 { (char *)"NOsh_ncalc_get", _wrap_NOsh_ncalc_get, METH_VARARGS, NULL},
7473 { (char *)"NOsh_nprint_set", _wrap_NOsh_nprint_set, METH_VARARGS, NULL},
7474 { (char *)"NOsh_nprint_get", _wrap_NOsh_nprint_get, METH_VARARGS, NULL},
7475 { (char *)"NOsh_nelec_set", _wrap_NOsh_nelec_set, METH_VARARGS, NULL},
7476 { (char *)"NOsh_nelec_get", _wrap_NOsh_nelec_get, METH_VARARGS, NULL},
7477 { (char *)"NOsh_nmol_set", _wrap_NOsh_nmol_set, METH_VARARGS, NULL},
7478 { (char *)"NOsh_nmol_get", _wrap_NOsh_nmol_get, METH_VARARGS, NULL},
7479 { (char *)"NOsh_printwhat_set", _wrap_NOsh_printwhat_set, METH_VARARGS, NULL},
7480 { (char *)"NOsh_printwhat_get", _wrap_NOsh_printwhat_get, METH_VARARGS, NULL},
7481 { (char *)"NOsh_swigregister", NOsh_swigregister, METH_VARARGS, NULL},
7482 { (char *)"NOsh_getCalc", _wrap_NOsh_getCalc, METH_VARARGS, NULL},
7483 { (char *)"NOsh_elecname", _wrap_NOsh_elecname, METH_VARARGS, NULL},
7484 { (char *)"NOsh_elec2calc", _wrap_NOsh_elec2calc, METH_VARARGS, NULL},
7485 { (char *)"NOsh_printWhat", _wrap_NOsh_printWhat, METH_VARARGS, NULL},
7486 { (char *)"NOsh_parseInputFile", _wrap_NOsh_parseInputFile, METH_VARARGS, NULL},
7487 { (char *)"NOsh_ctor", _wrap_NOsh_ctor, METH_VARARGS, NULL},
7488 { (char *)"new_AtomForce", _wrap_new_AtomForce, METH_VARARGS, NULL},
7489 { (char *)"delete_AtomForce", _wrap_delete_AtomForce, METH_VARARGS, NULL},
7490 { (char *)"AtomForce_swigregister", AtomForce_swigregister, METH_VARARGS, NULL},
7491 { (char *)"new_valist", _wrap_new_valist, METH_VARARGS, NULL},
7492 { (char *)"get_Valist", _wrap_get_Valist, METH_VARARGS, NULL},
7493 { (char *)"new_gridlist", _wrap_new_gridlist, METH_VARARGS, NULL},
7494 { (char *)"new_pmglist", _wrap_new_pmglist, METH_VARARGS, NULL},
7495 { (char *)"get_Vpmg", _wrap_get_Vpmg, METH_VARARGS, NULL},
7496 { (char *)"new_pmgplist", _wrap_new_pmgplist, METH_VARARGS, NULL},
7497 { (char *)"new_pbelist", _wrap_new_pbelist, METH_VARARGS, NULL},
7498 { (char *)"get_Vpbe", _wrap_get_Vpbe, METH_VARARGS, NULL},
7499 { (char *)"new_atomforcelist", _wrap_new_atomforcelist, METH_VARARGS, NULL},
7500 { (char *)"delete_atomforcelist", _wrap_delete_atomforcelist, METH_VARARGS, NULL},
7501 { (char *)"delete_valist", _wrap_delete_valist, METH_VARARGS, NULL},
7502 { (char *)"delete_gridlist", _wrap_delete_gridlist, METH_VARARGS, NULL},
7503 { (char *)"delete_pmglist", _wrap_delete_pmglist, METH_VARARGS, NULL},
7504 { (char *)"delete_pmgplist", _wrap_delete_pmgplist, METH_VARARGS, NULL},
7505 { (char *)"delete_pbelist", _wrap_delete_pbelist, METH_VARARGS, NULL},
7506 { (char *)"delete_Nosh", _wrap_delete_Nosh, METH_VARARGS, NULL},
7507 { (char *)"delete_Com", _wrap_delete_Com, METH_VARARGS, NULL},
7508 { (char *)"delete_Mem", _wrap_delete_Mem, METH_VARARGS, NULL},
7509 { (char *)"get_AtomForce", _wrap_get_AtomForce, METH_VARARGS, NULL},
7510 { (char *)"make_Valist", _wrap_make_Valist, METH_VARARGS, NULL},
7511 { (char *)"remove_Valist", _wrap_remove_Valist, METH_VARARGS, NULL},
7512 { (char *)"double_array", _wrap_double_array, METH_VARARGS, NULL},
7513 { (char *)"int_array", _wrap_int_array, METH_VARARGS, NULL},
7514 { (char *)"delete_double_array", _wrap_delete_double_array, METH_VARARGS, NULL},
7515 { (char *)"delete_int_array", _wrap_delete_int_array, METH_VARARGS, NULL},
7516 { (char *)"get_entry", _wrap_get_entry, METH_VARARGS, NULL},
7517 { (char *)"set_entry", _wrap_set_entry, METH_VARARGS, NULL},
7518 { (char *)"parseInputFromString", _wrap_parseInputFromString, METH_VARARGS, NULL},
7519 { (char *)"Valist_load", _wrap_Valist_load, METH_VARARGS, NULL},
7520 { (char *)"NOsh_setupElecCalc", _wrap_NOsh_setupElecCalc, METH_VARARGS, NULL},
7521 { (char *)"NOsh_setupApolCalc", _wrap_NOsh_setupApolCalc, METH_VARARGS, NULL},
7522 { (char *)"wrap_forceMG", _wrap_wrap_forceMG, METH_VARARGS, NULL},
7523 { (char *)"getAtomPosition", _wrap_getAtomPosition, METH_VARARGS, NULL},
7524 { (char *)"getPotentials", _wrap_getPotentials, METH_VARARGS, NULL},
7525 { (char *)"getEnergies", _wrap_getEnergies, METH_VARARGS, NULL},
7526 { (char *)"getForces", _wrap_getForces, METH_VARARGS, NULL},
7527 { (char *)"loadMolecules", _wrap_loadMolecules, METH_VARARGS, NULL},
7528 { (char *)"killMolecules", _wrap_killMolecules, METH_VARARGS, NULL},
7529 { (char *)"loadDielMaps", _wrap_loadDielMaps, METH_VARARGS, NULL},
7530 { (char *)"killDielMaps", _wrap_killDielMaps, METH_VARARGS, NULL},
7531 { (char *)"loadKappaMaps", _wrap_loadKappaMaps, METH_VARARGS, NULL},
7532 { (char *)"killKappaMaps", _wrap_killKappaMaps, METH_VARARGS, NULL},
7533 { (char *)"loadPotMaps", _wrap_loadPotMaps, METH_VARARGS, NULL},
7534 { (char *)"killPotMaps", _wrap_killPotMaps, METH_VARARGS, NULL},
7535 { (char *)"loadChargeMaps", _wrap_loadChargeMaps, METH_VARARGS, NULL},
7536 { (char *)"killChargeMaps", _wrap_killChargeMaps, METH_VARARGS, NULL},
7537 { (char *)"printPBEPARM", _wrap_printPBEPARM, METH_VARARGS, NULL},
7538 { (char *)"printMGPARM", _wrap_printMGPARM, METH_VARARGS, NULL},
7539 { (char *)"initMG", _wrap_initMG, METH_VARARGS, NULL},
7540 { (char *)"killMG", _wrap_killMG, METH_VARARGS, NULL},
7541 { (char *)"solveMG", _wrap_solveMG, METH_VARARGS, NULL},
7542 { (char *)"setPartMG", _wrap_setPartMG, METH_VARARGS, NULL},
7543 { (char *)"killEnergy", _wrap_killEnergy, METH_VARARGS, NULL},
7544 { (char *)"killForce", _wrap_killForce, METH_VARARGS, NULL},
7545 { (char *)"writedataMG", _wrap_writedataMG, METH_VARARGS, NULL},
7546 { (char *)"writematMG", _wrap_writematMG, METH_VARARGS, NULL},
7547 { (char *)"printForce", _wrap_printForce, METH_VARARGS, NULL},
7548 { (char *)"printElecForce", _wrap_printElecForce, METH_VARARGS, NULL},
7549 { (char *)"printApolForce", _wrap_printApolForce, METH_VARARGS, NULL},
7550 { (char *)"startVio", _wrap_startVio, METH_VARARGS, NULL},
7551 { (char *)"Vacc_molAcc", _wrap_Vacc_molAcc, METH_VARARGS, NULL},
7552 { (char *)"Vacc_vdwAcc", _wrap_Vacc_vdwAcc, METH_VARARGS, NULL},
7553 { (char *)"energyMG", _wrap_energyMG, METH_VARARGS, NULL},
7554 { (char *)"printEnergy", _wrap_printEnergy, METH_VARARGS, NULL},
7555 { (char *)"printElecEnergy", _wrap_printElecEnergy, METH_VARARGS, NULL},
7556 { (char *)"printApolEnergy", _wrap_printApolEnergy, METH_VARARGS, NULL},
7557 { (char *)"returnEnergy", _wrap_returnEnergy, METH_VARARGS, NULL},
7558 { NULL, NULL, 0, NULL }
7559 };
7560
7561
7562 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7563
7564 static swig_type_info _swigt__p_AtomForce = {"_p_AtomForce", "AtomForce *", 0, 0, (void*)0, 0};
7565 static swig_type_info _swigt__p_FEMparm = {"_p_FEMparm", "FEMparm *", 0, 0, (void*)0, 0};
7566 static swig_type_info _swigt__p_MGparm = {"_p_MGparm", "MGparm *", 0, 0, (void*)0, 0};
7567 static swig_type_info _swigt__p_NOsh = {"_p_NOsh", "NOsh *", 0, 0, (void*)0, 0};
7568 static swig_type_info _swigt__p_NOsh_PrintType = {"_p_NOsh_PrintType", "enum NOsh_PrintType *|NOsh_PrintType *", 0, 0, (void*)0, 0};
7569 static swig_type_info _swigt__p_NOsh_calc = {"_p_NOsh_calc", "NOsh_calc *", 0, 0, (void*)0, 0};
7570 static swig_type_info _swigt__p_PBEparm = {"_p_PBEparm", "PBEparm *", 0, 0, (void*)0, 0};
7571 static swig_type_info _swigt__p_Vacc = {"_p_Vacc", "Vacc *", 0, 0, (void*)0, 0};
7572 static swig_type_info _swigt__p_Valist = {"_p_Valist", "Valist *", 0, 0, (void*)0, 0};
7573 static swig_type_info _swigt__p_Vatom = {"_p_Vatom", "Vatom *", 0, 0, (void*)0, 0};
7574 static swig_type_info _swigt__p_Vcom = {"_p_Vcom", "Vcom *", 0, 0, (void*)0, 0};
7575 static swig_type_info _swigt__p_Vmem = {"_p_Vmem", "Vmem *", 0, 0, (void*)0, 0};
7576 static swig_type_info _swigt__p_Vparam = {"_p_Vparam", "Vparam *", 0, 0, (void*)0, 0};
7577 static swig_type_info _swigt__p_Vpbe = {"_p_Vpbe", "Vpbe *", 0, 0, (void*)0, 0};
7578 static swig_type_info _swigt__p_Vpmg = {"_p_Vpmg", "Vpmg *", 0, 0, (void*)0, 0};
7579 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
7580 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
7581 static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
7582 static swig_type_info _swigt__p_p_AtomForce = {"_p_p_AtomForce", "AtomForce **", 0, 0, (void*)0, 0};
7583 static swig_type_info _swigt__p_p_Valist = {"_p_p_Valist", "Valist **", 0, 0, (void*)0, 0};
7584 static swig_type_info _swigt__p_p_Vgrid = {"_p_p_Vgrid", "Vgrid **", 0, 0, (void*)0, 0};
7585 static swig_type_info _swigt__p_p_Vpbe = {"_p_p_Vpbe", "Vpbe **", 0, 0, (void*)0, 0};
7586 static swig_type_info _swigt__p_p_Vpmg = {"_p_p_Vpmg", "Vpmg **", 0, 0, (void*)0, 0};
7587 static swig_type_info _swigt__p_p_Vpmgp = {"_p_p_Vpmgp", "Vpmgp **", 0, 0, (void*)0, 0};
7588
7589 static swig_type_info *swig_type_initial[] = {
7590 &_swigt__p_AtomForce,
7591 &_swigt__p_FEMparm,
7592 &_swigt__p_MGparm,
7593 &_swigt__p_NOsh,
7594 &_swigt__p_NOsh_PrintType,
7595 &_swigt__p_NOsh_calc,
7596 &_swigt__p_PBEparm,
7597 &_swigt__p_Vacc,
7598 &_swigt__p_Valist,
7599 &_swigt__p_Vatom,
7600 &_swigt__p_Vcom,
7601 &_swigt__p_Vmem,
7602 &_swigt__p_Vparam,
7603 &_swigt__p_Vpbe,
7604 &_swigt__p_Vpmg,
7605 &_swigt__p_char,
7606 &_swigt__p_double,
7607 &_swigt__p_int,
7608 &_swigt__p_p_AtomForce,
7609 &_swigt__p_p_Valist,
7610 &_swigt__p_p_Vgrid,
7611 &_swigt__p_p_Vpbe,
7612 &_swigt__p_p_Vpmg,
7613 &_swigt__p_p_Vpmgp,
7614 };
7615
7616 static swig_cast_info _swigc__p_AtomForce[] = { {&_swigt__p_AtomForce, 0, 0, 0},{0, 0, 0, 0}};
7617 static swig_cast_info _swigc__p_FEMparm[] = { {&_swigt__p_FEMparm, 0, 0, 0},{0, 0, 0, 0}};
7618 static swig_cast_info _swigc__p_MGparm[] = { {&_swigt__p_MGparm, 0, 0, 0},{0, 0, 0, 0}};
7619 static swig_cast_info _swigc__p_NOsh[] = { {&_swigt__p_NOsh, 0, 0, 0},{0, 0, 0, 0}};
7620 static swig_cast_info _swigc__p_NOsh_PrintType[] = { {&_swigt__p_NOsh_PrintType, 0, 0, 0},{0, 0, 0, 0}};
7621 static swig_cast_info _swigc__p_NOsh_calc[] = { {&_swigt__p_NOsh_calc, 0, 0, 0},{0, 0, 0, 0}};
7622 static swig_cast_info _swigc__p_PBEparm[] = { {&_swigt__p_PBEparm, 0, 0, 0},{0, 0, 0, 0}};
7623 static swig_cast_info _swigc__p_Vacc[] = { {&_swigt__p_Vacc, 0, 0, 0},{0, 0, 0, 0}};
7624 static swig_cast_info _swigc__p_Valist[] = { {&_swigt__p_Valist, 0, 0, 0},{0, 0, 0, 0}};
7625 static swig_cast_info _swigc__p_Vatom[] = { {&_swigt__p_Vatom, 0, 0, 0},{0, 0, 0, 0}};
7626 static swig_cast_info _swigc__p_Vcom[] = { {&_swigt__p_Vcom, 0, 0, 0},{0, 0, 0, 0}};
7627 static swig_cast_info _swigc__p_Vmem[] = { {&_swigt__p_Vmem, 0, 0, 0},{0, 0, 0, 0}};
7628 static swig_cast_info _swigc__p_Vparam[] = { {&_swigt__p_Vparam, 0, 0, 0},{0, 0, 0, 0}};
7629 static swig_cast_info _swigc__p_Vpbe[] = { {&_swigt__p_Vpbe, 0, 0, 0},{0, 0, 0, 0}};
7630 static swig_cast_info _swigc__p_Vpmg[] = { {&_swigt__p_Vpmg, 0, 0, 0},{0, 0, 0, 0}};
7631 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
7632 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
7633 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
7634 static swig_cast_info _swigc__p_p_AtomForce[] = { {&_swigt__p_p_AtomForce, 0, 0, 0},{0, 0, 0, 0}};
7635 static swig_cast_info _swigc__p_p_Valist[] = { {&_swigt__p_p_Valist, 0, 0, 0},{0, 0, 0, 0}};
7636 static swig_cast_info _swigc__p_p_Vgrid[] = { {&_swigt__p_p_Vgrid, 0, 0, 0},{0, 0, 0, 0}};
7637 static swig_cast_info _swigc__p_p_Vpbe[] = { {&_swigt__p_p_Vpbe, 0, 0, 0},{0, 0, 0, 0}};
7638 static swig_cast_info _swigc__p_p_Vpmg[] = { {&_swigt__p_p_Vpmg, 0, 0, 0},{0, 0, 0, 0}};
7639 static swig_cast_info _swigc__p_p_Vpmgp[] = { {&_swigt__p_p_Vpmgp, 0, 0, 0},{0, 0, 0, 0}};
7640
7641 static swig_cast_info *swig_cast_initial[] = {
7642 _swigc__p_AtomForce,
7643 _swigc__p_FEMparm,
7644 _swigc__p_MGparm,
7645 _swigc__p_NOsh,
7646 _swigc__p_NOsh_PrintType,
7647 _swigc__p_NOsh_calc,
7648 _swigc__p_PBEparm,
7649 _swigc__p_Vacc,
7650 _swigc__p_Valist,
7651 _swigc__p_Vatom,
7652 _swigc__p_Vcom,
7653 _swigc__p_Vmem,
7654 _swigc__p_Vparam,
7655 _swigc__p_Vpbe,
7656 _swigc__p_Vpmg,
7657 _swigc__p_char,
7658 _swigc__p_double,
7659 _swigc__p_int,
7660 _swigc__p_p_AtomForce,
7661 _swigc__p_p_Valist,
7662 _swigc__p_p_Vgrid,
7663 _swigc__p_p_Vpbe,
7664 _swigc__p_p_Vpmg,
7665 _swigc__p_p_Vpmgp,
7666 };
7667
7668
7669 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7670
7671 static swig_const_info swig_const_table[] = {
7672 {0, 0, 0, 0.0, 0, 0}};
7673
7674 #ifdef __cplusplus
7675 }
7676 #endif
7677 /* -----------------------------------------------------------------------------
7678 * Type initialization:
7679 * This problem is tough by the requirement that no dynamic
7680 * memory is used. Also, since swig_type_info structures store pointers to
7681 * swig_cast_info structures and swig_cast_info structures store pointers back
7682 * to swig_type_info structures, we need some lookup code at initialization.
7683 * The idea is that swig generates all the structures that are needed.
7684 * The runtime then collects these partially filled structures.
7685 * The SWIG_InitializeModule function takes these initial arrays out of
7686 * swig_module, and does all the lookup, filling in the swig_module.types
7687 * array with the correct data and linking the correct swig_cast_info
7688 * structures together.
7689 *
7690 * The generated swig_type_info structures are assigned staticly to an initial
7691 * array. We just loop through that array, and handle each type individually.
7692 * First we lookup if this type has been already loaded, and if so, use the
7693 * loaded structure instead of the generated one. Then we have to fill in the
7694 * cast linked list. The cast data is initially stored in something like a
7695 * two-dimensional array. Each row corresponds to a type (there are the same
7696 * number of rows as there are in the swig_type_initial array). Each entry in
7697 * a column is one of the swig_cast_info structures for that type.
7698 * The cast_initial array is actually an array of arrays, because each row has
7699 * a variable number of columns. So to actually build the cast linked list,
7700 * we find the array of casts associated with the type, and loop through it
7701 * adding the casts to the list. The one last trick we need to do is making
7702 * sure the type pointer in the swig_cast_info struct is correct.
7703 *
7704 * First off, we lookup the cast->type name to see if it is already loaded.
7705 * There are three cases to handle:
7706 * 1) If the cast->type has already been loaded AND the type we are adding
7707 * casting info to has not been loaded (it is in this module), THEN we
7708 * replace the cast->type pointer with the type pointer that has already
7709 * been loaded.
7710 * 2) If BOTH types (the one we are adding casting info to, and the
7711 * cast->type) are loaded, THEN the cast info has already been loaded by
7712 * the previous module so we just ignore it.
7713 * 3) Finally, if cast->type has not already been loaded, then we add that
7714 * swig_cast_info to the linked list (because the cast->type) pointer will
7715 * be correct.
7716 * ----------------------------------------------------------------------------- */
7717
7718 #ifdef __cplusplus
7719 extern "C" {
7720 #if 0
7721 } /* c-mode */
7722 #endif
7723 #endif
7724
7725 #if 0
7726 #define SWIGRUNTIME_DEBUG
7727 #endif
7728
7729
7730 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)7731 SWIG_InitializeModule(void *clientdata) {
7732 size_t i;
7733 swig_module_info *module_head, *iter;
7734 int found;
7735
7736 clientdata = clientdata;
7737
7738 /* check to see if the circular list has been setup, if not, set it up */
7739 if (swig_module.next==0) {
7740 /* Initialize the swig_module */
7741 swig_module.type_initial = swig_type_initial;
7742 swig_module.cast_initial = swig_cast_initial;
7743 swig_module.next = &swig_module;
7744 }
7745
7746 /* Try and load any already created modules */
7747 module_head = SWIG_GetModule(clientdata);
7748 if (!module_head) {
7749 /* This is the first module loaded for this interpreter */
7750 /* so set the swig module into the interpreter */
7751 SWIG_SetModule(clientdata, &swig_module);
7752 module_head = &swig_module;
7753 } else {
7754 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7755 found=0;
7756 iter=module_head;
7757 do {
7758 if (iter==&swig_module) {
7759 found=1;
7760 break;
7761 }
7762 iter=iter->next;
7763 } while (iter!= module_head);
7764
7765 /* if the is found in the list, then all is done and we may leave */
7766 if (found) return;
7767 /* otherwise we must add out module into the list */
7768 swig_module.next = module_head->next;
7769 module_head->next = &swig_module;
7770 }
7771
7772 /* Now work on filling in swig_module.types */
7773 #ifdef SWIGRUNTIME_DEBUG
7774 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
7775 #endif
7776 for (i = 0; i < swig_module.size; ++i) {
7777 swig_type_info *type = 0;
7778 swig_type_info *ret;
7779 swig_cast_info *cast;
7780
7781 #ifdef SWIGRUNTIME_DEBUG
7782 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7783 #endif
7784
7785 /* if there is another module already loaded */
7786 if (swig_module.next != &swig_module) {
7787 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
7788 }
7789 if (type) {
7790 /* Overwrite clientdata field */
7791 #ifdef SWIGRUNTIME_DEBUG
7792 printf("SWIG_InitializeModule: found type %s\n", type->name);
7793 #endif
7794 if (swig_module.type_initial[i]->clientdata) {
7795 type->clientdata = swig_module.type_initial[i]->clientdata;
7796 #ifdef SWIGRUNTIME_DEBUG
7797 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7798 #endif
7799 }
7800 } else {
7801 type = swig_module.type_initial[i];
7802 }
7803
7804 /* Insert casting types */
7805 cast = swig_module.cast_initial[i];
7806 while (cast->type) {
7807 /* Don't need to add information already in the list */
7808 ret = 0;
7809 #ifdef SWIGRUNTIME_DEBUG
7810 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7811 #endif
7812 if (swig_module.next != &swig_module) {
7813 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
7814 #ifdef SWIGRUNTIME_DEBUG
7815 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7816 #endif
7817 }
7818 if (ret) {
7819 if (type == swig_module.type_initial[i]) {
7820 #ifdef SWIGRUNTIME_DEBUG
7821 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7822 #endif
7823 cast->type = ret;
7824 ret = 0;
7825 } else {
7826 /* Check for casting already in the list */
7827 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7828 #ifdef SWIGRUNTIME_DEBUG
7829 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7830 #endif
7831 if (!ocast) ret = 0;
7832 }
7833 }
7834
7835 if (!ret) {
7836 #ifdef SWIGRUNTIME_DEBUG
7837 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7838 #endif
7839 if (type->cast) {
7840 type->cast->prev = cast;
7841 cast->next = type->cast;
7842 }
7843 type->cast = cast;
7844 }
7845 cast++;
7846 }
7847 /* Set entry in modules->types array equal to the type */
7848 swig_module.types[i] = type;
7849 }
7850 swig_module.types[i] = 0;
7851
7852 #ifdef SWIGRUNTIME_DEBUG
7853 printf("**** SWIG_InitializeModule: Cast List ******\n");
7854 for (i = 0; i < swig_module.size; ++i) {
7855 int j = 0;
7856 swig_cast_info *cast = swig_module.cast_initial[i];
7857 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7858 while (cast->type) {
7859 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7860 cast++;
7861 ++j;
7862 }
7863 printf("---- Total casts: %d\n",j);
7864 }
7865 printf("**** SWIG_InitializeModule: Cast List ******\n");
7866 #endif
7867 }
7868
7869 /* This function will propagate the clientdata field of type to
7870 * any new swig_type_info structures that have been added into the list
7871 * of equivalent types. It is like calling
7872 * SWIG_TypeClientData(type, clientdata) a second time.
7873 */
7874 SWIGRUNTIME void
SWIG_PropagateClientData(void)7875 SWIG_PropagateClientData(void) {
7876 size_t i;
7877 swig_cast_info *equiv;
7878 static int init_run = 0;
7879
7880 if (init_run) return;
7881 init_run = 1;
7882
7883 for (i = 0; i < swig_module.size; i++) {
7884 if (swig_module.types[i]->clientdata) {
7885 equiv = swig_module.types[i]->cast;
7886 while (equiv) {
7887 if (!equiv->converter) {
7888 if (equiv->type && !equiv->type->clientdata)
7889 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
7890 }
7891 equiv = equiv->next;
7892 }
7893 }
7894 }
7895 }
7896
7897 #ifdef __cplusplus
7898 #if 0
7899 {
7900 /* c-mode */
7901 #endif
7902 }
7903 #endif
7904
7905
7906
7907 #ifdef __cplusplus
7908 extern "C" {
7909 #endif
7910
7911 /* Python-specific SWIG API */
7912 #define SWIG_newvarlink() SWIG_Python_newvarlink()
7913 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
7914 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
7915
7916 /* -----------------------------------------------------------------------------
7917 * global variable support code.
7918 * ----------------------------------------------------------------------------- */
7919
7920 typedef struct swig_globalvar {
7921 char *name; /* Name of global variable */
7922 PyObject *(*get_attr)(void); /* Return the current value */
7923 int (*set_attr)(PyObject *); /* Set the value */
7924 struct swig_globalvar *next;
7925 } swig_globalvar;
7926
7927 typedef struct swig_varlinkobject {
7928 PyObject_HEAD
7929 swig_globalvar *vars;
7930 } swig_varlinkobject;
7931
7932 SWIGINTERN PyObject *
swig_varlink_repr(swig_varlinkobject * SWIGUNUSEDPARM (v))7933 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
7934 return PyString_FromString("<Swig global variables>");
7935 }
7936
7937 SWIGINTERN PyObject *
swig_varlink_str(swig_varlinkobject * v)7938 swig_varlink_str(swig_varlinkobject *v) {
7939 PyObject *str = PyString_FromString("(");
7940 swig_globalvar *var;
7941 for (var = v->vars; var; var=var->next) {
7942 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
7943 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
7944 }
7945 PyString_ConcatAndDel(&str,PyString_FromString(")"));
7946 return str;
7947 }
7948
7949 SWIGINTERN int
swig_varlink_print(swig_varlinkobject * v,FILE * fp,int SWIGUNUSEDPARM (flags))7950 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
7951 PyObject *str = swig_varlink_str(v);
7952 fprintf(fp,"Swig global variables ");
7953 fprintf(fp,"%s\n", PyString_AsString(str));
7954 Py_DECREF(str);
7955 return 0;
7956 }
7957
7958 SWIGINTERN void
swig_varlink_dealloc(swig_varlinkobject * v)7959 swig_varlink_dealloc(swig_varlinkobject *v) {
7960 swig_globalvar *var = v->vars;
7961 while (var) {
7962 swig_globalvar *n = var->next;
7963 free(var->name);
7964 free(var);
7965 var = n;
7966 }
7967 }
7968
7969 SWIGINTERN PyObject *
swig_varlink_getattr(swig_varlinkobject * v,char * n)7970 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
7971 PyObject *res = NULL;
7972 swig_globalvar *var = v->vars;
7973 while (var) {
7974 if (strcmp(var->name,n) == 0) {
7975 res = (*var->get_attr)();
7976 break;
7977 }
7978 var = var->next;
7979 }
7980 if (res == NULL && !PyErr_Occurred()) {
7981 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
7982 }
7983 return res;
7984 }
7985
7986 SWIGINTERN int
swig_varlink_setattr(swig_varlinkobject * v,char * n,PyObject * p)7987 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
7988 int res = 1;
7989 swig_globalvar *var = v->vars;
7990 while (var) {
7991 if (strcmp(var->name,n) == 0) {
7992 res = (*var->set_attr)(p);
7993 break;
7994 }
7995 var = var->next;
7996 }
7997 if (res == 1 && !PyErr_Occurred()) {
7998 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
7999 }
8000 return res;
8001 }
8002
8003 SWIGINTERN PyTypeObject*
swig_varlink_type(void)8004 swig_varlink_type(void) {
8005 static char varlink__doc__[] = "Swig var link object";
8006 static PyTypeObject varlink_type;
8007 static int type_init = 0;
8008 if (!type_init) {
8009 const PyTypeObject tmp
8010 = {
8011 PyObject_HEAD_INIT(NULL)
8012 0, /* Number of items in variable part (ob_size) */
8013 (char *)"swigvarlink", /* Type name (tp_name) */
8014 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
8015 0, /* Itemsize (tp_itemsize) */
8016 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
8017 (printfunc) swig_varlink_print, /* Print (tp_print) */
8018 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
8019 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
8020 0, /* tp_compare */
8021 (reprfunc) swig_varlink_repr, /* tp_repr */
8022 0, /* tp_as_number */
8023 0, /* tp_as_sequence */
8024 0, /* tp_as_mapping */
8025 0, /* tp_hash */
8026 0, /* tp_call */
8027 (reprfunc)swig_varlink_str, /* tp_str */
8028 0, /* tp_getattro */
8029 0, /* tp_setattro */
8030 0, /* tp_as_buffer */
8031 0, /* tp_flags */
8032 varlink__doc__, /* tp_doc */
8033 0, /* tp_traverse */
8034 0, /* tp_clear */
8035 0, /* tp_richcompare */
8036 0, /* tp_weaklistoffset */
8037 #if PY_VERSION_HEX >= 0x02020000
8038 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
8039 #endif
8040 #if PY_VERSION_HEX >= 0x02030000
8041 0, /* tp_del */
8042 #endif
8043 #ifdef COUNT_ALLOCS
8044 0,0,0,0 /* tp_alloc -> tp_next */
8045 #endif
8046 };
8047 varlink_type = tmp;
8048 varlink_type.ob_type = &PyType_Type;
8049 type_init = 1;
8050 }
8051 return &varlink_type;
8052 }
8053
8054 /* Create a variable linking object for use later */
8055 SWIGINTERN PyObject *
SWIG_Python_newvarlink(void)8056 SWIG_Python_newvarlink(void) {
8057 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
8058 if (result) {
8059 result->vars = 0;
8060 }
8061 return ((PyObject*) result);
8062 }
8063
8064 SWIGINTERN void
SWIG_Python_addvarlink(PyObject * p,char * name,PyObject * (* get_attr)(void),int (* set_attr)(PyObject * p))8065 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
8066 swig_varlinkobject *v = (swig_varlinkobject *) p;
8067 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
8068 if (gv) {
8069 size_t size = strlen(name)+1;
8070 gv->name = (char *)malloc(size);
8071 if (gv->name) {
8072 strncpy(gv->name,name,size);
8073 gv->get_attr = get_attr;
8074 gv->set_attr = set_attr;
8075 gv->next = v->vars;
8076 }
8077 }
8078 v->vars = gv;
8079 }
8080
8081 SWIGINTERN PyObject *
SWIG_globals(void)8082 SWIG_globals(void) {
8083 static PyObject *_SWIG_globals = 0;
8084 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
8085 return _SWIG_globals;
8086 }
8087
8088 /* -----------------------------------------------------------------------------
8089 * constants/methods manipulation
8090 * ----------------------------------------------------------------------------- */
8091
8092 /* Install Constants */
8093 SWIGINTERN void
SWIG_Python_InstallConstants(PyObject * d,swig_const_info constants[])8094 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
8095 PyObject *obj = 0;
8096 size_t i;
8097 for (i = 0; constants[i].type; ++i) {
8098 switch(constants[i].type) {
8099 case SWIG_PY_POINTER:
8100 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
8101 break;
8102 case SWIG_PY_BINARY:
8103 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
8104 break;
8105 default:
8106 obj = 0;
8107 break;
8108 }
8109 if (obj) {
8110 PyDict_SetItemString(d, constants[i].name, obj);
8111 Py_DECREF(obj);
8112 }
8113 }
8114 }
8115
8116 /* -----------------------------------------------------------------------------*/
8117 /* Fix SwigMethods to carry the callback ptrs when needed */
8118 /* -----------------------------------------------------------------------------*/
8119
8120 SWIGINTERN void
SWIG_Python_FixMethods(PyMethodDef * methods,swig_const_info * const_table,swig_type_info ** types,swig_type_info ** types_initial)8121 SWIG_Python_FixMethods(PyMethodDef *methods,
8122 swig_const_info *const_table,
8123 swig_type_info **types,
8124 swig_type_info **types_initial) {
8125 size_t i;
8126 for (i = 0; methods[i].ml_name; ++i) {
8127 const char *c = methods[i].ml_doc;
8128 if (c && (c = strstr(c, "swig_ptr: "))) {
8129 int j;
8130 swig_const_info *ci = 0;
8131 const char *name = c + 10;
8132 for (j = 0; const_table[j].type; ++j) {
8133 if (strncmp(const_table[j].name, name,
8134 strlen(const_table[j].name)) == 0) {
8135 ci = &(const_table[j]);
8136 break;
8137 }
8138 }
8139 if (ci) {
8140 size_t shift = (ci->ptype) - types;
8141 swig_type_info *ty = types_initial[shift];
8142 size_t ldoc = (c - methods[i].ml_doc);
8143 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
8144 char *ndoc = (char*)malloc(ldoc + lptr + 10);
8145 if (ndoc) {
8146 char *buff = ndoc;
8147 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
8148 if (ptr) {
8149 strncpy(buff, methods[i].ml_doc, ldoc);
8150 buff += ldoc;
8151 strncpy(buff, "swig_ptr: ", 10);
8152 buff += 10;
8153 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
8154 methods[i].ml_doc = ndoc;
8155 }
8156 }
8157 }
8158 }
8159 }
8160 }
8161
8162 #ifdef __cplusplus
8163 }
8164 #endif
8165
8166 /* -----------------------------------------------------------------------------*
8167 * Partial Init method
8168 * -----------------------------------------------------------------------------*/
8169
8170 #ifdef __cplusplus
8171 extern "C"
8172 #endif
SWIG_init(void)8173 SWIGEXPORT void SWIG_init(void) {
8174 PyObject *m, *d;
8175
8176 /* Fix SwigMethods to carry the callback ptrs when needed */
8177 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
8178
8179 m = Py_InitModule((char *) SWIG_name, SwigMethods);
8180 d = PyModule_GetDict(m);
8181
8182 SWIG_InitializeModule(0);
8183 SWIG_InstallConstants(d,swig_const_table);
8184
8185
8186 SWIG_Python_SetConstant(d, "NPT_ENERGY",SWIG_From_int((int)(NPT_ENERGY)));
8187 SWIG_Python_SetConstant(d, "NPT_FORCE",SWIG_From_int((int)(NPT_FORCE)));
8188 SWIG_Python_SetConstant(d, "NPT_ELECENERGY",SWIG_From_int((int)(NPT_ELECENERGY)));
8189 SWIG_Python_SetConstant(d, "NPT_ELECFORCE",SWIG_From_int((int)(NPT_ELECFORCE)));
8190 SWIG_Python_SetConstant(d, "NPT_APOLENERGY",SWIG_From_int((int)(NPT_APOLENERGY)));
8191 SWIG_Python_SetConstant(d, "NPT_APOLFORCE",SWIG_From_int((int)(NPT_APOLFORCE)));
8192 }
8193
8194