Actual source code: vectorf.c

  1: /* vector.c */
  2: /* Fortran interface file */

  4: /*
  5: * This file was generated automatically by bfort from the C source
  6: * file.  
  7:  */

  9: #ifdef PETSC_USE_POINTER_CONVERSION
 10: #if defined(__cplusplus)
 11: extern "C" {
 12: #endif 
 13: extern void *PetscToPointer(void *);
 14: extern int PetscFromPointer(void *);
 15: extern void PetscRmPointer(void *);
 16: #if defined(__cplusplus)
 17: }
 18: #endif 

 20: #else

 22: #define PetscToPointer(a) (*(long *)(a))
 23: #define PetscFromPointer(a) (long)(a)
 24: #define PetscRmPointer(a)
 25: #endif

 27: #include "petscfix.h"
 28:  #include petscvec.h
 29: #ifdef MPI_BUILD_PROFILING
 30: #ifdef PETSC_HAVE_FORTRAN_CAPS
 31: #define vecprinthelp_ PVECPRINTHELP
 32: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 33: #define vecprinthelp_ pvecprinthelp
 34: #else
 35: #define vecprinthelp_ pvecprinthelp_
 36: #endif
 37: #else
 38: #ifdef PETSC_HAVE_FORTRAN_CAPS
 39: #define vecprinthelp_ VECPRINTHELP
 40: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 41: #define vecprinthelp_ vecprinthelp
 42: #endif
 43: #endif

 45: #ifdef MPI_BUILD_PROFILING
 46: #ifdef PETSC_HAVE_FORTRAN_CAPS
 47: #define vecsetsizes_ PVECSETSIZES
 48: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 49: #define vecsetsizes_ pvecsetsizes
 50: #else
 51: #define vecsetsizes_ pvecsetsizes_
 52: #endif
 53: #else
 54: #ifdef PETSC_HAVE_FORTRAN_CAPS
 55: #define vecsetsizes_ VECSETSIZES
 56: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 57: #define vecsetsizes_ vecsetsizes
 58: #endif
 59: #endif

 61: #ifdef MPI_BUILD_PROFILING
 62: #ifdef PETSC_HAVE_FORTRAN_CAPS
 63: #define vecsetblocksize_ PVECSETBLOCKSIZE
 64: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 65: #define vecsetblocksize_ pvecsetblocksize
 66: #else
 67: #define vecsetblocksize_ pvecsetblocksize_
 68: #endif
 69: #else
 70: #ifdef PETSC_HAVE_FORTRAN_CAPS
 71: #define vecsetblocksize_ VECSETBLOCKSIZE
 72: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 73: #define vecsetblocksize_ vecsetblocksize
 74: #endif
 75: #endif

 77: #ifdef MPI_BUILD_PROFILING
 78: #ifdef PETSC_HAVE_FORTRAN_CAPS
 79: #define vecgetblocksize_ PVECGETBLOCKSIZE
 80: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 81: #define vecgetblocksize_ pvecgetblocksize
 82: #else
 83: #define vecgetblocksize_ pvecgetblocksize_
 84: #endif
 85: #else
 86: #ifdef PETSC_HAVE_FORTRAN_CAPS
 87: #define vecgetblocksize_ VECGETBLOCKSIZE
 88: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 89: #define vecgetblocksize_ vecgetblocksize
 90: #endif
 91: #endif

 93: #ifdef MPI_BUILD_PROFILING
 94: #ifdef PETSC_HAVE_FORTRAN_CAPS
 95: #define vecvalid_ PVECVALID
 96: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
 97: #define vecvalid_ pvecvalid
 98: #else
 99: #define vecvalid_ pvecvalid_
100: #endif
101: #else
102: #ifdef PETSC_HAVE_FORTRAN_CAPS
103: #define vecvalid_ VECVALID
104: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
105: #define vecvalid_ vecvalid
106: #endif
107: #endif

109: #ifdef MPI_BUILD_PROFILING
110: #ifdef PETSC_HAVE_FORTRAN_CAPS
111: #define vecdot_ PVECDOT
112: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
113: #define vecdot_ pvecdot
114: #else
115: #define vecdot_ pvecdot_
116: #endif
117: #else
118: #ifdef PETSC_HAVE_FORTRAN_CAPS
119: #define vecdot_ VECDOT
120: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
121: #define vecdot_ vecdot
122: #endif
123: #endif

125: #ifdef MPI_BUILD_PROFILING
126: #ifdef PETSC_HAVE_FORTRAN_CAPS
127: #define vecnorm_ PVECNORM
128: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
129: #define vecnorm_ pvecnorm
130: #else
131: #define vecnorm_ pvecnorm_
132: #endif
133: #else
134: #ifdef PETSC_HAVE_FORTRAN_CAPS
135: #define vecnorm_ VECNORM
136: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
137: #define vecnorm_ vecnorm
138: #endif
139: #endif

141: #ifdef MPI_BUILD_PROFILING
142: #ifdef PETSC_HAVE_FORTRAN_CAPS
143: #define vecmin_ PVECMIN
144: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
145: #define vecmin_ pvecmin
146: #else
147: #define vecmin_ pvecmin_
148: #endif
149: #else
150: #ifdef PETSC_HAVE_FORTRAN_CAPS
151: #define vecmin_ VECMIN
152: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
153: #define vecmin_ vecmin
154: #endif
155: #endif

157: #ifdef MPI_BUILD_PROFILING
158: #ifdef PETSC_HAVE_FORTRAN_CAPS
159: #define vectdot_ PVECTDOT
160: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
161: #define vectdot_ pvectdot
162: #else
163: #define vectdot_ pvectdot_
164: #endif
165: #else
166: #ifdef PETSC_HAVE_FORTRAN_CAPS
167: #define vectdot_ VECTDOT
168: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
169: #define vectdot_ vectdot
170: #endif
171: #endif

173: #ifdef MPI_BUILD_PROFILING
174: #ifdef PETSC_HAVE_FORTRAN_CAPS
175: #define vecscale_ PVECSCALE
176: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
177: #define vecscale_ pvecscale
178: #else
179: #define vecscale_ pvecscale_
180: #endif
181: #else
182: #ifdef PETSC_HAVE_FORTRAN_CAPS
183: #define vecscale_ VECSCALE
184: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
185: #define vecscale_ vecscale
186: #endif
187: #endif

189: #ifdef MPI_BUILD_PROFILING
190: #ifdef PETSC_HAVE_FORTRAN_CAPS
191: #define veccopy_ PVECCOPY
192: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
193: #define veccopy_ pveccopy
194: #else
195: #define veccopy_ pveccopy_
196: #endif
197: #else
198: #ifdef PETSC_HAVE_FORTRAN_CAPS
199: #define veccopy_ VECCOPY
200: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
201: #define veccopy_ veccopy
202: #endif
203: #endif

205: #ifdef MPI_BUILD_PROFILING
206: #ifdef PETSC_HAVE_FORTRAN_CAPS
207: #define vecset_ PVECSET
208: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
209: #define vecset_ pvecset
210: #else
211: #define vecset_ pvecset_
212: #endif
213: #else
214: #ifdef PETSC_HAVE_FORTRAN_CAPS
215: #define vecset_ VECSET
216: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
217: #define vecset_ vecset
218: #endif
219: #endif

221: #ifdef MPI_BUILD_PROFILING
222: #ifdef PETSC_HAVE_FORTRAN_CAPS
223: #define vecaxpy_ PVECAXPY
224: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
225: #define vecaxpy_ pvecaxpy
226: #else
227: #define vecaxpy_ pvecaxpy_
228: #endif
229: #else
230: #ifdef PETSC_HAVE_FORTRAN_CAPS
231: #define vecaxpy_ VECAXPY
232: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
233: #define vecaxpy_ vecaxpy
234: #endif
235: #endif

237: #ifdef MPI_BUILD_PROFILING
238: #ifdef PETSC_HAVE_FORTRAN_CAPS
239: #define vecaxpby_ PVECAXPBY
240: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
241: #define vecaxpby_ pvecaxpby
242: #else
243: #define vecaxpby_ pvecaxpby_
244: #endif
245: #else
246: #ifdef PETSC_HAVE_FORTRAN_CAPS
247: #define vecaxpby_ VECAXPBY
248: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
249: #define vecaxpby_ vecaxpby
250: #endif
251: #endif

253: #ifdef MPI_BUILD_PROFILING
254: #ifdef PETSC_HAVE_FORTRAN_CAPS
255: #define vecaypx_ PVECAYPX
256: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
257: #define vecaypx_ pvecaypx
258: #else
259: #define vecaypx_ pvecaypx_
260: #endif
261: #else
262: #ifdef PETSC_HAVE_FORTRAN_CAPS
263: #define vecaypx_ VECAYPX
264: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
265: #define vecaypx_ vecaypx
266: #endif
267: #endif

269: #ifdef MPI_BUILD_PROFILING
270: #ifdef PETSC_HAVE_FORTRAN_CAPS
271: #define vecswap_ PVECSWAP
272: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
273: #define vecswap_ pvecswap
274: #else
275: #define vecswap_ pvecswap_
276: #endif
277: #else
278: #ifdef PETSC_HAVE_FORTRAN_CAPS
279: #define vecswap_ VECSWAP
280: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
281: #define vecswap_ vecswap
282: #endif
283: #endif

285: #ifdef MPI_BUILD_PROFILING
286: #ifdef PETSC_HAVE_FORTRAN_CAPS
287: #define vecwaxpy_ PVECWAXPY
288: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
289: #define vecwaxpy_ pvecwaxpy
290: #else
291: #define vecwaxpy_ pvecwaxpy_
292: #endif
293: #else
294: #ifdef PETSC_HAVE_FORTRAN_CAPS
295: #define vecwaxpy_ VECWAXPY
296: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
297: #define vecwaxpy_ vecwaxpy
298: #endif
299: #endif

301: #ifdef MPI_BUILD_PROFILING
302: #ifdef PETSC_HAVE_FORTRAN_CAPS
303: #define vecpointwisemult_ PVECPOINTWISEMULT
304: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
305: #define vecpointwisemult_ pvecpointwisemult
306: #else
307: #define vecpointwisemult_ pvecpointwisemult_
308: #endif
309: #else
310: #ifdef PETSC_HAVE_FORTRAN_CAPS
311: #define vecpointwisemult_ VECPOINTWISEMULT
312: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
313: #define vecpointwisemult_ vecpointwisemult
314: #endif
315: #endif

317: #ifdef MPI_BUILD_PROFILING
318: #ifdef PETSC_HAVE_FORTRAN_CAPS
319: #define vecpointwisedivide_ PVECPOINTWISEDIVIDE
320: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
321: #define vecpointwisedivide_ pvecpointwisedivide
322: #else
323: #define vecpointwisedivide_ pvecpointwisedivide_
324: #endif
325: #else
326: #ifdef PETSC_HAVE_FORTRAN_CAPS
327: #define vecpointwisedivide_ VECPOINTWISEDIVIDE
328: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
329: #define vecpointwisedivide_ vecpointwisedivide
330: #endif
331: #endif

333: #ifdef MPI_BUILD_PROFILING
334: #ifdef PETSC_HAVE_FORTRAN_CAPS
335: #define vecsetvalues_ PVECSETVALUES
336: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
337: #define vecsetvalues_ pvecsetvalues
338: #else
339: #define vecsetvalues_ pvecsetvalues_
340: #endif
341: #else
342: #ifdef PETSC_HAVE_FORTRAN_CAPS
343: #define vecsetvalues_ VECSETVALUES
344: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
345: #define vecsetvalues_ vecsetvalues
346: #endif
347: #endif

349: #ifdef MPI_BUILD_PROFILING
350: #ifdef PETSC_HAVE_FORTRAN_CAPS
351: #define vecsetvaluesblocked_ PVECSETVALUESBLOCKED
352: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
353: #define vecsetvaluesblocked_ pvecsetvaluesblocked
354: #else
355: #define vecsetvaluesblocked_ pvecsetvaluesblocked_
356: #endif
357: #else
358: #ifdef PETSC_HAVE_FORTRAN_CAPS
359: #define vecsetvaluesblocked_ VECSETVALUESBLOCKED
360: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
361: #define vecsetvaluesblocked_ vecsetvaluesblocked
362: #endif
363: #endif

365: #ifdef MPI_BUILD_PROFILING
366: #ifdef PETSC_HAVE_FORTRAN_CAPS
367: #define vecsetlocaltoglobalmapping_ PVECSETLOCALTOGLOBALMAPPING
368: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
369: #define vecsetlocaltoglobalmapping_ pvecsetlocaltoglobalmapping
370: #else
371: #define vecsetlocaltoglobalmapping_ pvecsetlocaltoglobalmapping_
372: #endif
373: #else
374: #ifdef PETSC_HAVE_FORTRAN_CAPS
375: #define vecsetlocaltoglobalmapping_ VECSETLOCALTOGLOBALMAPPING
376: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
377: #define vecsetlocaltoglobalmapping_ vecsetlocaltoglobalmapping
378: #endif
379: #endif

381: #ifdef MPI_BUILD_PROFILING
382: #ifdef PETSC_HAVE_FORTRAN_CAPS
383: #define vecsetlocaltoglobalmappingblock_ PVECSETLOCALTOGLOBALMAPPINGBLOCK
384: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
385: #define vecsetlocaltoglobalmappingblock_ pvecsetlocaltoglobalmappingblock
386: #else
387: #define vecsetlocaltoglobalmappingblock_ pvecsetlocaltoglobalmappingblock_
388: #endif
389: #else
390: #ifdef PETSC_HAVE_FORTRAN_CAPS
391: #define vecsetlocaltoglobalmappingblock_ VECSETLOCALTOGLOBALMAPPINGBLOCK
392: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
393: #define vecsetlocaltoglobalmappingblock_ vecsetlocaltoglobalmappingblock
394: #endif
395: #endif

397: #ifdef MPI_BUILD_PROFILING
398: #ifdef PETSC_HAVE_FORTRAN_CAPS
399: #define vecsetvalueslocal_ PVECSETVALUESLOCAL
400: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
401: #define vecsetvalueslocal_ pvecsetvalueslocal
402: #else
403: #define vecsetvalueslocal_ pvecsetvalueslocal_
404: #endif
405: #else
406: #ifdef PETSC_HAVE_FORTRAN_CAPS
407: #define vecsetvalueslocal_ VECSETVALUESLOCAL
408: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
409: #define vecsetvalueslocal_ vecsetvalueslocal
410: #endif
411: #endif

413: #ifdef MPI_BUILD_PROFILING
414: #ifdef PETSC_HAVE_FORTRAN_CAPS
415: #define vecsetvaluesblockedlocal_ PVECSETVALUESBLOCKEDLOCAL
416: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
417: #define vecsetvaluesblockedlocal_ pvecsetvaluesblockedlocal
418: #else
419: #define vecsetvaluesblockedlocal_ pvecsetvaluesblockedlocal_
420: #endif
421: #else
422: #ifdef PETSC_HAVE_FORTRAN_CAPS
423: #define vecsetvaluesblockedlocal_ VECSETVALUESBLOCKEDLOCAL
424: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
425: #define vecsetvaluesblockedlocal_ vecsetvaluesblockedlocal
426: #endif
427: #endif

429: #ifdef MPI_BUILD_PROFILING
430: #ifdef PETSC_HAVE_FORTRAN_CAPS
431: #define vecassemblybegin_ PVECASSEMBLYBEGIN
432: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
433: #define vecassemblybegin_ pvecassemblybegin
434: #else
435: #define vecassemblybegin_ pvecassemblybegin_
436: #endif
437: #else
438: #ifdef PETSC_HAVE_FORTRAN_CAPS
439: #define vecassemblybegin_ VECASSEMBLYBEGIN
440: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
441: #define vecassemblybegin_ vecassemblybegin
442: #endif
443: #endif

445: #ifdef MPI_BUILD_PROFILING
446: #ifdef PETSC_HAVE_FORTRAN_CAPS
447: #define vecassemblyend_ PVECASSEMBLYEND
448: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
449: #define vecassemblyend_ pvecassemblyend
450: #else
451: #define vecassemblyend_ pvecassemblyend_
452: #endif
453: #else
454: #ifdef PETSC_HAVE_FORTRAN_CAPS
455: #define vecassemblyend_ VECASSEMBLYEND
456: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
457: #define vecassemblyend_ vecassemblyend
458: #endif
459: #endif

461: #ifdef MPI_BUILD_PROFILING
462: #ifdef PETSC_HAVE_FORTRAN_CAPS
463: #define vecviewfromoptions_ PVECVIEWFROMOPTIONS
464: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
465: #define vecviewfromoptions_ pvecviewfromoptions
466: #else
467: #define vecviewfromoptions_ pvecviewfromoptions_
468: #endif
469: #else
470: #ifdef PETSC_HAVE_FORTRAN_CAPS
471: #define vecviewfromoptions_ VECVIEWFROMOPTIONS
472: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
473: #define vecviewfromoptions_ vecviewfromoptions
474: #endif
475: #endif

477: #ifdef MPI_BUILD_PROFILING
478: #ifdef PETSC_HAVE_FORTRAN_CAPS
479: #define vecgetsize_ PVECGETSIZE
480: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
481: #define vecgetsize_ pvecgetsize
482: #else
483: #define vecgetsize_ pvecgetsize_
484: #endif
485: #else
486: #ifdef PETSC_HAVE_FORTRAN_CAPS
487: #define vecgetsize_ VECGETSIZE
488: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
489: #define vecgetsize_ vecgetsize
490: #endif
491: #endif

493: #ifdef MPI_BUILD_PROFILING
494: #ifdef PETSC_HAVE_FORTRAN_CAPS
495: #define vecgetlocalsize_ PVECGETLOCALSIZE
496: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
497: #define vecgetlocalsize_ pvecgetlocalsize
498: #else
499: #define vecgetlocalsize_ pvecgetlocalsize_
500: #endif
501: #else
502: #ifdef PETSC_HAVE_FORTRAN_CAPS
503: #define vecgetlocalsize_ VECGETLOCALSIZE
504: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
505: #define vecgetlocalsize_ vecgetlocalsize
506: #endif
507: #endif

509: #ifdef MPI_BUILD_PROFILING
510: #ifdef PETSC_HAVE_FORTRAN_CAPS
511: #define vecsetoption_ PVECSETOPTION
512: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
513: #define vecsetoption_ pvecsetoption
514: #else
515: #define vecsetoption_ pvecsetoption_
516: #endif
517: #else
518: #ifdef PETSC_HAVE_FORTRAN_CAPS
519: #define vecsetoption_ VECSETOPTION
520: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
521: #define vecsetoption_ vecsetoption
522: #endif
523: #endif

525: #ifdef MPI_BUILD_PROFILING
526: #ifdef PETSC_HAVE_FORTRAN_CAPS
527: #define vecplacearray_ PVECPLACEARRAY
528: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
529: #define vecplacearray_ pvecplacearray
530: #else
531: #define vecplacearray_ pvecplacearray_
532: #endif
533: #else
534: #ifdef PETSC_HAVE_FORTRAN_CAPS
535: #define vecplacearray_ VECPLACEARRAY
536: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
537: #define vecplacearray_ vecplacearray
538: #endif
539: #endif

541: #ifdef MPI_BUILD_PROFILING
542: #ifdef PETSC_HAVE_FORTRAN_CAPS
543: #define vecresetarray_ PVECRESETARRAY
544: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
545: #define vecresetarray_ pvecresetarray
546: #else
547: #define vecresetarray_ pvecresetarray_
548: #endif
549: #else
550: #ifdef PETSC_HAVE_FORTRAN_CAPS
551: #define vecresetarray_ VECRESETARRAY
552: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
553: #define vecresetarray_ vecresetarray
554: #endif
555: #endif

557: #ifdef MPI_BUILD_PROFILING
558: #ifdef PETSC_HAVE_FORTRAN_CAPS
559: #define vecreciprocal_ PVECRECIPROCAL
560: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
561: #define vecreciprocal_ pvecreciprocal
562: #else
563: #define vecreciprocal_ pvecreciprocal_
564: #endif
565: #else
566: #ifdef PETSC_HAVE_FORTRAN_CAPS
567: #define vecreciprocal_ VECRECIPROCAL
568: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
569: #define vecreciprocal_ vecreciprocal
570: #endif
571: #endif

573: #ifdef MPI_BUILD_PROFILING
574: #ifdef PETSC_HAVE_FORTRAN_CAPS
575: #define vecsetstashinitialsize_ PVECSETSTASHINITIALSIZE
576: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
577: #define vecsetstashinitialsize_ pvecsetstashinitialsize
578: #else
579: #define vecsetstashinitialsize_ pvecsetstashinitialsize_
580: #endif
581: #else
582: #ifdef PETSC_HAVE_FORTRAN_CAPS
583: #define vecsetstashinitialsize_ VECSETSTASHINITIALSIZE
584: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
585: #define vecsetstashinitialsize_ vecsetstashinitialsize
586: #endif
587: #endif

589: #ifdef MPI_BUILD_PROFILING
590: #ifdef PETSC_HAVE_FORTRAN_CAPS
591: #define vecstashview_ PVECSTASHVIEW
592: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
593: #define vecstashview_ pvecstashview
594: #else
595: #define vecstashview_ pvecstashview_
596: #endif
597: #else
598: #ifdef PETSC_HAVE_FORTRAN_CAPS
599: #define vecstashview_ VECSTASHVIEW
600: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
601: #define vecstashview_ vecstashview
602: #endif
603: #endif



607: /* Definitions of Fortran Wrapper routines */
608: #if defined(__cplusplus)
609: extern "C" {
610: #endif
611: void PETSC_STDCALL vecprinthelp_(Vec vec, int *ierr ){
612: *VecPrintHelp(
613:         (Vec)PetscToPointer( (vec) ));
614: }
615: void PETSC_STDCALL vecsetsizes_(Vec v,int *n,int *N, int *ierr ){
616: *VecSetSizes(
617:         (Vec)PetscToPointer( (v) ),*n,*N);
618: }
619: void PETSC_STDCALL vecsetblocksize_(Vec v,int *bs, int *ierr ){
620: *VecSetBlockSize(
621:         (Vec)PetscToPointer( (v) ),*bs);
622: }
623: void PETSC_STDCALL vecgetblocksize_(Vec v,int *bs, int *ierr ){
624: *VecGetBlockSize(
625:         (Vec)PetscToPointer( (v) ),bs);
626: }
627: void PETSC_STDCALL vecvalid_(Vec v,PetscTruth *flg, int *ierr ){
628: *VecValid(
629:         (Vec)PetscToPointer( (v) ),flg);
630: }
631: void PETSC_STDCALL vecdot_(Vec x,Vec y,PetscScalar *val, int *ierr ){
632: *VecDot(
633:         (Vec)PetscToPointer( (x) ),
634:         (Vec)PetscToPointer( (y) ),val);
635: }
636: void PETSC_STDCALL vecnorm_(Vec x,NormType *type,PetscReal *val, int *ierr ){
637: *VecNorm(
638:         (Vec)PetscToPointer( (x) ),*type,val);
639: }
640: void PETSC_STDCALL vecmin_(Vec x,int *p,PetscReal *val, int *ierr ){
641: *VecMin(
642:         (Vec)PetscToPointer( (x) ),p,val);
643: }
644: void PETSC_STDCALL vectdot_(Vec x,Vec y,PetscScalar *val, int *ierr ){
645: *VecTDot(
646:         (Vec)PetscToPointer( (x) ),
647:         (Vec)PetscToPointer( (y) ),val);
648: }
649: void PETSC_STDCALL vecscale_( PetscScalar *alpha,Vec x, int *ierr ){
650: *VecScale(alpha,
651:         (Vec)PetscToPointer( (x) ));
652: }
653: void PETSC_STDCALL veccopy_(Vec x,Vec y, int *ierr ){
654: *VecCopy(
655:         (Vec)PetscToPointer( (x) ),
656:         (Vec)PetscToPointer( (y) ));
657: }
658: void PETSC_STDCALL vecset_( PetscScalar *alpha,Vec x, int *ierr ){
659: *VecSet(alpha,
660:         (Vec)PetscToPointer( (x) ));
661: }
662: void PETSC_STDCALL vecaxpy_( PetscScalar *alpha,Vec x,Vec y, int *ierr ){
663: *VecAXPY(alpha,
664:         (Vec)PetscToPointer( (x) ),
665:         (Vec)PetscToPointer( (y) ));
666: }
667: void PETSC_STDCALL vecaxpby_( PetscScalar *alpha, PetscScalar *beta,Vec x,Vec y, int *ierr ){
668: *VecAXPBY(alpha,beta,
669:         (Vec)PetscToPointer( (x) ),
670:         (Vec)PetscToPointer( (y) ));
671: }
672: void PETSC_STDCALL vecaypx_( PetscScalar *alpha,Vec x,Vec y, int *ierr ){
673: *VecAYPX(alpha,
674:         (Vec)PetscToPointer( (x) ),
675:         (Vec)PetscToPointer( (y) ));
676: }
677: void PETSC_STDCALL vecswap_(Vec x,Vec y, int *ierr ){
678: *VecSwap(
679:         (Vec)PetscToPointer( (x) ),
680:         (Vec)PetscToPointer( (y) ));
681: }
682: void PETSC_STDCALL vecwaxpy_( PetscScalar *alpha,Vec x,Vec y,Vec w, int *ierr ){
683: *VecWAXPY(alpha,
684:         (Vec)PetscToPointer( (x) ),
685:         (Vec)PetscToPointer( (y) ),
686:         (Vec)PetscToPointer( (w) ));
687: }
688: void PETSC_STDCALL vecpointwisemult_(Vec x,Vec y,Vec w, int *ierr ){
689: *VecPointwiseMult(
690:         (Vec)PetscToPointer( (x) ),
691:         (Vec)PetscToPointer( (y) ),
692:         (Vec)PetscToPointer( (w) ));
693: }
694: void PETSC_STDCALL vecpointwisedivide_(Vec x,Vec y,Vec w, int *ierr ){
695: *VecPointwiseDivide(
696:         (Vec)PetscToPointer( (x) ),
697:         (Vec)PetscToPointer( (y) ),
698:         (Vec)PetscToPointer( (w) ));
699: }
700: void PETSC_STDCALL vecsetvalues_(Vec x,int *ni, int ix[], PetscScalar y[],InsertMode *iora, int *ierr ){
701: *VecSetValues(
702:         (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
703: }
704: void PETSC_STDCALL vecsetvaluesblocked_(Vec x,int *ni, int ix[], PetscScalar y[],InsertMode *iora, int *ierr ){
705: *VecSetValuesBlocked(
706:         (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
707: }
708: void PETSC_STDCALL vecsetlocaltoglobalmapping_(Vec x,ISLocalToGlobalMapping *mapping, int *ierr ){
709: *VecSetLocalToGlobalMapping(
710:         (Vec)PetscToPointer( (x) ),*mapping);
711: }
712: void PETSC_STDCALL vecsetlocaltoglobalmappingblock_(Vec x,ISLocalToGlobalMapping *mapping, int *ierr ){
713: *VecSetLocalToGlobalMappingBlock(
714:         (Vec)PetscToPointer( (x) ),*mapping);
715: }
716: void PETSC_STDCALL vecsetvalueslocal_(Vec x,int *ni, int ix[], PetscScalar y[],InsertMode *iora, int *ierr ){
717: *VecSetValuesLocal(
718:         (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
719: }
720: void PETSC_STDCALL vecsetvaluesblockedlocal_(Vec x,int *ni, int ix[], PetscScalar y[],InsertMode *iora, int *ierr ){
721: *VecSetValuesBlockedLocal(
722:         (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
723: }
724: void PETSC_STDCALL vecassemblybegin_(Vec vec, int *ierr ){
725: *VecAssemblyBegin(
726:         (Vec)PetscToPointer( (vec) ));
727: }
728: void PETSC_STDCALL vecassemblyend_(Vec vec, int *ierr ){
729: *VecAssemblyEnd(
730:         (Vec)PetscToPointer( (vec) ));
731: }
732: void PETSC_STDCALL vecviewfromoptions_(Vec vec,char *title, int *ierr ){
733: *VecViewFromOptions(
734:         (Vec)PetscToPointer( (vec) ),title);
735: }
736: void PETSC_STDCALL vecgetsize_(Vec x,int *size, int *ierr ){
737: *VecGetSize(
738:         (Vec)PetscToPointer( (x) ),size);
739: }
740: void PETSC_STDCALL vecgetlocalsize_(Vec x,int *size, int *ierr ){
741: *VecGetLocalSize(
742:         (Vec)PetscToPointer( (x) ),size);
743: }
744: void PETSC_STDCALL vecsetoption_(Vec x,VecOption *op, int *ierr ){
745: *VecSetOption(
746:         (Vec)PetscToPointer( (x) ),*op);
747: }
748: void PETSC_STDCALL vecplacearray_(Vec vec, PetscScalar array[], int *ierr ){
749: *VecPlaceArray(
750:         (Vec)PetscToPointer( (vec) ),array);
751: }
752: void PETSC_STDCALL vecresetarray_(Vec vec, int *ierr ){
753: *VecResetArray(
754:         (Vec)PetscToPointer( (vec) ));
755: }
756: void PETSC_STDCALL vecreciprocal_(Vec vec, int *ierr ){
757: *VecReciprocal(
758:         (Vec)PetscToPointer( (vec) ));
759: }
760: void PETSC_STDCALL vecsetstashinitialsize_(Vec vec,int *size,int *bsize, int *ierr ){
761: *VecSetStashInitialSize(
762:         (Vec)PetscToPointer( (vec) ),*size,*bsize);
763: }
764: void PETSC_STDCALL vecstashview_(Vec v,PetscViewer *viewer, int *ierr ){
765: *VecStashView(
766:         (Vec)PetscToPointer( (v) ),*viewer);
767: }
768: #if defined(__cplusplus)
769: }
770: #endif