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 petscvec.h
28: #ifdef MPI_BUILD_PROFILING
29: #ifdef PETSC_HAVE_FORTRAN_CAPS
30: #define vecsetblocksize_ PVECSETBLOCKSIZE
31: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
32: #define vecsetblocksize_ pvecsetblocksize
33: #else
34: #define vecsetblocksize_ pvecsetblocksize_
35: #endif
36: #else
37: #ifdef PETSC_HAVE_FORTRAN_CAPS
38: #define vecsetblocksize_ VECSETBLOCKSIZE
39: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
40: #define vecsetblocksize_ vecsetblocksize
41: #endif
42: #endif
44: #ifdef MPI_BUILD_PROFILING
45: #ifdef PETSC_HAVE_FORTRAN_CAPS
46: #define vecgetblocksize_ PVECGETBLOCKSIZE
47: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
48: #define vecgetblocksize_ pvecgetblocksize
49: #else
50: #define vecgetblocksize_ pvecgetblocksize_
51: #endif
52: #else
53: #ifdef PETSC_HAVE_FORTRAN_CAPS
54: #define vecgetblocksize_ VECGETBLOCKSIZE
55: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
56: #define vecgetblocksize_ vecgetblocksize
57: #endif
58: #endif
60: #ifdef MPI_BUILD_PROFILING
61: #ifdef PETSC_HAVE_FORTRAN_CAPS
62: #define vecvalid_ PVECVALID
63: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
64: #define vecvalid_ pvecvalid
65: #else
66: #define vecvalid_ pvecvalid_
67: #endif
68: #else
69: #ifdef PETSC_HAVE_FORTRAN_CAPS
70: #define vecvalid_ VECVALID
71: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
72: #define vecvalid_ vecvalid
73: #endif
74: #endif
76: #ifdef MPI_BUILD_PROFILING
77: #ifdef PETSC_HAVE_FORTRAN_CAPS
78: #define vecdot_ PVECDOT
79: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
80: #define vecdot_ pvecdot
81: #else
82: #define vecdot_ pvecdot_
83: #endif
84: #else
85: #ifdef PETSC_HAVE_FORTRAN_CAPS
86: #define vecdot_ VECDOT
87: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
88: #define vecdot_ vecdot
89: #endif
90: #endif
92: #ifdef MPI_BUILD_PROFILING
93: #ifdef PETSC_HAVE_FORTRAN_CAPS
94: #define vecnorm_ PVECNORM
95: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
96: #define vecnorm_ pvecnorm
97: #else
98: #define vecnorm_ pvecnorm_
99: #endif
100: #else
101: #ifdef PETSC_HAVE_FORTRAN_CAPS
102: #define vecnorm_ VECNORM
103: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
104: #define vecnorm_ vecnorm
105: #endif
106: #endif
108: #ifdef MPI_BUILD_PROFILING
109: #ifdef PETSC_HAVE_FORTRAN_CAPS
110: #define vecmin_ PVECMIN
111: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
112: #define vecmin_ pvecmin
113: #else
114: #define vecmin_ pvecmin_
115: #endif
116: #else
117: #ifdef PETSC_HAVE_FORTRAN_CAPS
118: #define vecmin_ VECMIN
119: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
120: #define vecmin_ vecmin
121: #endif
122: #endif
124: #ifdef MPI_BUILD_PROFILING
125: #ifdef PETSC_HAVE_FORTRAN_CAPS
126: #define vectdot_ PVECTDOT
127: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
128: #define vectdot_ pvectdot
129: #else
130: #define vectdot_ pvectdot_
131: #endif
132: #else
133: #ifdef PETSC_HAVE_FORTRAN_CAPS
134: #define vectdot_ VECTDOT
135: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
136: #define vectdot_ vectdot
137: #endif
138: #endif
140: #ifdef MPI_BUILD_PROFILING
141: #ifdef PETSC_HAVE_FORTRAN_CAPS
142: #define vecscale_ PVECSCALE
143: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
144: #define vecscale_ pvecscale
145: #else
146: #define vecscale_ pvecscale_
147: #endif
148: #else
149: #ifdef PETSC_HAVE_FORTRAN_CAPS
150: #define vecscale_ VECSCALE
151: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
152: #define vecscale_ vecscale
153: #endif
154: #endif
156: #ifdef MPI_BUILD_PROFILING
157: #ifdef PETSC_HAVE_FORTRAN_CAPS
158: #define veccopy_ PVECCOPY
159: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
160: #define veccopy_ pveccopy
161: #else
162: #define veccopy_ pveccopy_
163: #endif
164: #else
165: #ifdef PETSC_HAVE_FORTRAN_CAPS
166: #define veccopy_ VECCOPY
167: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
168: #define veccopy_ veccopy
169: #endif
170: #endif
172: #ifdef MPI_BUILD_PROFILING
173: #ifdef PETSC_HAVE_FORTRAN_CAPS
174: #define vecset_ PVECSET
175: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
176: #define vecset_ pvecset
177: #else
178: #define vecset_ pvecset_
179: #endif
180: #else
181: #ifdef PETSC_HAVE_FORTRAN_CAPS
182: #define vecset_ VECSET
183: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
184: #define vecset_ vecset
185: #endif
186: #endif
188: #ifdef MPI_BUILD_PROFILING
189: #ifdef PETSC_HAVE_FORTRAN_CAPS
190: #define vecaxpy_ PVECAXPY
191: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
192: #define vecaxpy_ pvecaxpy
193: #else
194: #define vecaxpy_ pvecaxpy_
195: #endif
196: #else
197: #ifdef PETSC_HAVE_FORTRAN_CAPS
198: #define vecaxpy_ VECAXPY
199: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
200: #define vecaxpy_ vecaxpy
201: #endif
202: #endif
204: #ifdef MPI_BUILD_PROFILING
205: #ifdef PETSC_HAVE_FORTRAN_CAPS
206: #define vecaxpby_ PVECAXPBY
207: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
208: #define vecaxpby_ pvecaxpby
209: #else
210: #define vecaxpby_ pvecaxpby_
211: #endif
212: #else
213: #ifdef PETSC_HAVE_FORTRAN_CAPS
214: #define vecaxpby_ VECAXPBY
215: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
216: #define vecaxpby_ vecaxpby
217: #endif
218: #endif
220: #ifdef MPI_BUILD_PROFILING
221: #ifdef PETSC_HAVE_FORTRAN_CAPS
222: #define vecaypx_ PVECAYPX
223: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
224: #define vecaypx_ pvecaypx
225: #else
226: #define vecaypx_ pvecaypx_
227: #endif
228: #else
229: #ifdef PETSC_HAVE_FORTRAN_CAPS
230: #define vecaypx_ VECAYPX
231: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
232: #define vecaypx_ vecaypx
233: #endif
234: #endif
236: #ifdef MPI_BUILD_PROFILING
237: #ifdef PETSC_HAVE_FORTRAN_CAPS
238: #define vecswap_ PVECSWAP
239: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
240: #define vecswap_ pvecswap
241: #else
242: #define vecswap_ pvecswap_
243: #endif
244: #else
245: #ifdef PETSC_HAVE_FORTRAN_CAPS
246: #define vecswap_ VECSWAP
247: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
248: #define vecswap_ vecswap
249: #endif
250: #endif
252: #ifdef MPI_BUILD_PROFILING
253: #ifdef PETSC_HAVE_FORTRAN_CAPS
254: #define vecwaxpy_ PVECWAXPY
255: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
256: #define vecwaxpy_ pvecwaxpy
257: #else
258: #define vecwaxpy_ pvecwaxpy_
259: #endif
260: #else
261: #ifdef PETSC_HAVE_FORTRAN_CAPS
262: #define vecwaxpy_ VECWAXPY
263: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
264: #define vecwaxpy_ vecwaxpy
265: #endif
266: #endif
268: #ifdef MPI_BUILD_PROFILING
269: #ifdef PETSC_HAVE_FORTRAN_CAPS
270: #define vecpointwisemult_ PVECPOINTWISEMULT
271: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
272: #define vecpointwisemult_ pvecpointwisemult
273: #else
274: #define vecpointwisemult_ pvecpointwisemult_
275: #endif
276: #else
277: #ifdef PETSC_HAVE_FORTRAN_CAPS
278: #define vecpointwisemult_ VECPOINTWISEMULT
279: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
280: #define vecpointwisemult_ vecpointwisemult
281: #endif
282: #endif
284: #ifdef MPI_BUILD_PROFILING
285: #ifdef PETSC_HAVE_FORTRAN_CAPS
286: #define vecpointwisedivide_ PVECPOINTWISEDIVIDE
287: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
288: #define vecpointwisedivide_ pvecpointwisedivide
289: #else
290: #define vecpointwisedivide_ pvecpointwisedivide_
291: #endif
292: #else
293: #ifdef PETSC_HAVE_FORTRAN_CAPS
294: #define vecpointwisedivide_ VECPOINTWISEDIVIDE
295: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
296: #define vecpointwisedivide_ vecpointwisedivide
297: #endif
298: #endif
300: #ifdef MPI_BUILD_PROFILING
301: #ifdef PETSC_HAVE_FORTRAN_CAPS
302: #define vecsetvalues_ PVECSETVALUES
303: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
304: #define vecsetvalues_ pvecsetvalues
305: #else
306: #define vecsetvalues_ pvecsetvalues_
307: #endif
308: #else
309: #ifdef PETSC_HAVE_FORTRAN_CAPS
310: #define vecsetvalues_ VECSETVALUES
311: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
312: #define vecsetvalues_ vecsetvalues
313: #endif
314: #endif
316: #ifdef MPI_BUILD_PROFILING
317: #ifdef PETSC_HAVE_FORTRAN_CAPS
318: #define vecsetvaluesblocked_ PVECSETVALUESBLOCKED
319: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
320: #define vecsetvaluesblocked_ pvecsetvaluesblocked
321: #else
322: #define vecsetvaluesblocked_ pvecsetvaluesblocked_
323: #endif
324: #else
325: #ifdef PETSC_HAVE_FORTRAN_CAPS
326: #define vecsetvaluesblocked_ VECSETVALUESBLOCKED
327: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
328: #define vecsetvaluesblocked_ vecsetvaluesblocked
329: #endif
330: #endif
332: #ifdef MPI_BUILD_PROFILING
333: #ifdef PETSC_HAVE_FORTRAN_CAPS
334: #define vecsetlocaltoglobalmapping_ PVECSETLOCALTOGLOBALMAPPING
335: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
336: #define vecsetlocaltoglobalmapping_ pvecsetlocaltoglobalmapping
337: #else
338: #define vecsetlocaltoglobalmapping_ pvecsetlocaltoglobalmapping_
339: #endif
340: #else
341: #ifdef PETSC_HAVE_FORTRAN_CAPS
342: #define vecsetlocaltoglobalmapping_ VECSETLOCALTOGLOBALMAPPING
343: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
344: #define vecsetlocaltoglobalmapping_ vecsetlocaltoglobalmapping
345: #endif
346: #endif
348: #ifdef MPI_BUILD_PROFILING
349: #ifdef PETSC_HAVE_FORTRAN_CAPS
350: #define vecsetlocaltoglobalmappingblock_ PVECSETLOCALTOGLOBALMAPPINGBLOCK
351: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
352: #define vecsetlocaltoglobalmappingblock_ pvecsetlocaltoglobalmappingblock
353: #else
354: #define vecsetlocaltoglobalmappingblock_ pvecsetlocaltoglobalmappingblock_
355: #endif
356: #else
357: #ifdef PETSC_HAVE_FORTRAN_CAPS
358: #define vecsetlocaltoglobalmappingblock_ VECSETLOCALTOGLOBALMAPPINGBLOCK
359: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
360: #define vecsetlocaltoglobalmappingblock_ vecsetlocaltoglobalmappingblock
361: #endif
362: #endif
364: #ifdef MPI_BUILD_PROFILING
365: #ifdef PETSC_HAVE_FORTRAN_CAPS
366: #define vecsetvalueslocal_ PVECSETVALUESLOCAL
367: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
368: #define vecsetvalueslocal_ pvecsetvalueslocal
369: #else
370: #define vecsetvalueslocal_ pvecsetvalueslocal_
371: #endif
372: #else
373: #ifdef PETSC_HAVE_FORTRAN_CAPS
374: #define vecsetvalueslocal_ VECSETVALUESLOCAL
375: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
376: #define vecsetvalueslocal_ vecsetvalueslocal
377: #endif
378: #endif
380: #ifdef MPI_BUILD_PROFILING
381: #ifdef PETSC_HAVE_FORTRAN_CAPS
382: #define vecsetvaluesblockedlocal_ PVECSETVALUESBLOCKEDLOCAL
383: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
384: #define vecsetvaluesblockedlocal_ pvecsetvaluesblockedlocal
385: #else
386: #define vecsetvaluesblockedlocal_ pvecsetvaluesblockedlocal_
387: #endif
388: #else
389: #ifdef PETSC_HAVE_FORTRAN_CAPS
390: #define vecsetvaluesblockedlocal_ VECSETVALUESBLOCKEDLOCAL
391: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
392: #define vecsetvaluesblockedlocal_ vecsetvaluesblockedlocal
393: #endif
394: #endif
396: #ifdef MPI_BUILD_PROFILING
397: #ifdef PETSC_HAVE_FORTRAN_CAPS
398: #define vecassemblybegin_ PVECASSEMBLYBEGIN
399: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
400: #define vecassemblybegin_ pvecassemblybegin
401: #else
402: #define vecassemblybegin_ pvecassemblybegin_
403: #endif
404: #else
405: #ifdef PETSC_HAVE_FORTRAN_CAPS
406: #define vecassemblybegin_ VECASSEMBLYBEGIN
407: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
408: #define vecassemblybegin_ vecassemblybegin
409: #endif
410: #endif
412: #ifdef MPI_BUILD_PROFILING
413: #ifdef PETSC_HAVE_FORTRAN_CAPS
414: #define vecassemblyend_ PVECASSEMBLYEND
415: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
416: #define vecassemblyend_ pvecassemblyend
417: #else
418: #define vecassemblyend_ pvecassemblyend_
419: #endif
420: #else
421: #ifdef PETSC_HAVE_FORTRAN_CAPS
422: #define vecassemblyend_ VECASSEMBLYEND
423: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
424: #define vecassemblyend_ vecassemblyend
425: #endif
426: #endif
428: #ifdef MPI_BUILD_PROFILING
429: #ifdef PETSC_HAVE_FORTRAN_CAPS
430: #define vecgetsize_ PVECGETSIZE
431: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
432: #define vecgetsize_ pvecgetsize
433: #else
434: #define vecgetsize_ pvecgetsize_
435: #endif
436: #else
437: #ifdef PETSC_HAVE_FORTRAN_CAPS
438: #define vecgetsize_ VECGETSIZE
439: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
440: #define vecgetsize_ vecgetsize
441: #endif
442: #endif
444: #ifdef MPI_BUILD_PROFILING
445: #ifdef PETSC_HAVE_FORTRAN_CAPS
446: #define vecgetlocalsize_ PVECGETLOCALSIZE
447: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
448: #define vecgetlocalsize_ pvecgetlocalsize
449: #else
450: #define vecgetlocalsize_ pvecgetlocalsize_
451: #endif
452: #else
453: #ifdef PETSC_HAVE_FORTRAN_CAPS
454: #define vecgetlocalsize_ VECGETLOCALSIZE
455: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
456: #define vecgetlocalsize_ vecgetlocalsize
457: #endif
458: #endif
460: #ifdef MPI_BUILD_PROFILING
461: #ifdef PETSC_HAVE_FORTRAN_CAPS
462: #define vecgetownershiprange_ PVECGETOWNERSHIPRANGE
463: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
464: #define vecgetownershiprange_ pvecgetownershiprange
465: #else
466: #define vecgetownershiprange_ pvecgetownershiprange_
467: #endif
468: #else
469: #ifdef PETSC_HAVE_FORTRAN_CAPS
470: #define vecgetownershiprange_ VECGETOWNERSHIPRANGE
471: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
472: #define vecgetownershiprange_ vecgetownershiprange
473: #endif
474: #endif
476: #ifdef MPI_BUILD_PROFILING
477: #ifdef PETSC_HAVE_FORTRAN_CAPS
478: #define vecsetoption_ PVECSETOPTION
479: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
480: #define vecsetoption_ pvecsetoption
481: #else
482: #define vecsetoption_ pvecsetoption_
483: #endif
484: #else
485: #ifdef PETSC_HAVE_FORTRAN_CAPS
486: #define vecsetoption_ VECSETOPTION
487: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
488: #define vecsetoption_ vecsetoption
489: #endif
490: #endif
492: #ifdef MPI_BUILD_PROFILING
493: #ifdef PETSC_HAVE_FORTRAN_CAPS
494: #define vecplacearray_ PVECPLACEARRAY
495: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
496: #define vecplacearray_ pvecplacearray
497: #else
498: #define vecplacearray_ pvecplacearray_
499: #endif
500: #else
501: #ifdef PETSC_HAVE_FORTRAN_CAPS
502: #define vecplacearray_ VECPLACEARRAY
503: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
504: #define vecplacearray_ vecplacearray
505: #endif
506: #endif
508: #ifdef MPI_BUILD_PROFILING
509: #ifdef PETSC_HAVE_FORTRAN_CAPS
510: #define vecresetarray_ PVECRESETARRAY
511: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
512: #define vecresetarray_ pvecresetarray
513: #else
514: #define vecresetarray_ pvecresetarray_
515: #endif
516: #else
517: #ifdef PETSC_HAVE_FORTRAN_CAPS
518: #define vecresetarray_ VECRESETARRAY
519: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
520: #define vecresetarray_ vecresetarray
521: #endif
522: #endif
524: #ifdef MPI_BUILD_PROFILING
525: #ifdef PETSC_HAVE_FORTRAN_CAPS
526: #define vecreciprocal_ PVECRECIPROCAL
527: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
528: #define vecreciprocal_ pvecreciprocal
529: #else
530: #define vecreciprocal_ pvecreciprocal_
531: #endif
532: #else
533: #ifdef PETSC_HAVE_FORTRAN_CAPS
534: #define vecreciprocal_ VECRECIPROCAL
535: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
536: #define vecreciprocal_ vecreciprocal
537: #endif
538: #endif
540: #ifdef MPI_BUILD_PROFILING
541: #ifdef PETSC_HAVE_FORTRAN_CAPS
542: #define vecsetstashinitialsize_ PVECSETSTASHINITIALSIZE
543: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
544: #define vecsetstashinitialsize_ pvecsetstashinitialsize
545: #else
546: #define vecsetstashinitialsize_ pvecsetstashinitialsize_
547: #endif
548: #else
549: #ifdef PETSC_HAVE_FORTRAN_CAPS
550: #define vecsetstashinitialsize_ VECSETSTASHINITIALSIZE
551: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
552: #define vecsetstashinitialsize_ vecsetstashinitialsize
553: #endif
554: #endif
556: #ifdef MPI_BUILD_PROFILING
557: #ifdef PETSC_HAVE_FORTRAN_CAPS
558: #define vecstashview_ PVECSTASHVIEW
559: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
560: #define vecstashview_ pvecstashview
561: #else
562: #define vecstashview_ pvecstashview_
563: #endif
564: #else
565: #ifdef PETSC_HAVE_FORTRAN_CAPS
566: #define vecstashview_ VECSTASHVIEW
567: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
568: #define vecstashview_ vecstashview
569: #endif
570: #endif
574: /* Definitions of Fortran Wrapper routines */
575: #if defined(__cplusplus)
576: extern "C" {
577: #endif
578: void PETSC_STDCALL vecsetblocksize_(Vec v,int *bs, int *__ierr ){
579: *__VecSetBlockSize(
580: (Vec)PetscToPointer( (v) ),*bs);
581: }
582: void PETSC_STDCALL vecgetblocksize_(Vec v,int *bs, int *__ierr ){
583: *__VecGetBlockSize(
584: (Vec)PetscToPointer( (v) ),bs);
585: }
586: void PETSC_STDCALL vecvalid_(Vec v,PetscTruth *flg, int *__ierr ){
587: *__VecValid(
588: (Vec)PetscToPointer( (v) ),flg);
589: }
590: void PETSC_STDCALL vecdot_(Vec x,Vec y,Scalar *val, int *__ierr ){
591: *__VecDot(
592: (Vec)PetscToPointer( (x) ),
593: (Vec)PetscToPointer( (y) ),val);
594: }
595: void PETSC_STDCALL vecnorm_(Vec x,NormType *type,PetscReal *val, int *__ierr ){
596: *__VecNorm(
597: (Vec)PetscToPointer( (x) ),*type,val);
598: }
599: void PETSC_STDCALL vecmin_(Vec x,int *p,PetscReal *val, int *__ierr ){
600: *__VecMin(
601: (Vec)PetscToPointer( (x) ),p,val);
602: }
603: void PETSC_STDCALL vectdot_(Vec x,Vec y,Scalar *val, int *__ierr ){
604: *__VecTDot(
605: (Vec)PetscToPointer( (x) ),
606: (Vec)PetscToPointer( (y) ),val);
607: }
608: void PETSC_STDCALL vecscale_( Scalar *alpha,Vec x, int *__ierr ){
609: *__VecScale(alpha,
610: (Vec)PetscToPointer( (x) ));
611: }
612: void PETSC_STDCALL veccopy_(Vec x,Vec y, int *__ierr ){
613: *__VecCopy(
614: (Vec)PetscToPointer( (x) ),
615: (Vec)PetscToPointer( (y) ));
616: }
617: void PETSC_STDCALL vecset_( Scalar *alpha,Vec x, int *__ierr ){
618: *__VecSet(alpha,
619: (Vec)PetscToPointer( (x) ));
620: }
621: void PETSC_STDCALL vecaxpy_( Scalar *alpha,Vec x,Vec y, int *__ierr ){
622: *__VecAXPY(alpha,
623: (Vec)PetscToPointer( (x) ),
624: (Vec)PetscToPointer( (y) ));
625: }
626: void PETSC_STDCALL vecaxpby_( Scalar *alpha, Scalar *beta,Vec x,Vec y, int *__ierr ){
627: *__VecAXPBY(alpha,beta,
628: (Vec)PetscToPointer( (x) ),
629: (Vec)PetscToPointer( (y) ));
630: }
631: void PETSC_STDCALL vecaypx_( Scalar *alpha,Vec x,Vec y, int *__ierr ){
632: *__VecAYPX(alpha,
633: (Vec)PetscToPointer( (x) ),
634: (Vec)PetscToPointer( (y) ));
635: }
636: void PETSC_STDCALL vecswap_(Vec x,Vec y, int *__ierr ){
637: *__VecSwap(
638: (Vec)PetscToPointer( (x) ),
639: (Vec)PetscToPointer( (y) ));
640: }
641: void PETSC_STDCALL vecwaxpy_( Scalar *alpha,Vec x,Vec y,Vec w, int *__ierr ){
642: *__VecWAXPY(alpha,
643: (Vec)PetscToPointer( (x) ),
644: (Vec)PetscToPointer( (y) ),
645: (Vec)PetscToPointer( (w) ));
646: }
647: void PETSC_STDCALL vecpointwisemult_(Vec x,Vec y,Vec w, int *__ierr ){
648: *__VecPointwiseMult(
649: (Vec)PetscToPointer( (x) ),
650: (Vec)PetscToPointer( (y) ),
651: (Vec)PetscToPointer( (w) ));
652: }
653: void PETSC_STDCALL vecpointwisedivide_(Vec x,Vec y,Vec w, int *__ierr ){
654: *__VecPointwiseDivide(
655: (Vec)PetscToPointer( (x) ),
656: (Vec)PetscToPointer( (y) ),
657: (Vec)PetscToPointer( (w) ));
658: }
659: void PETSC_STDCALL vecsetvalues_(Vec x,int *ni, int ix[], Scalar y[],InsertMode *iora, int *__ierr ){
660: *__VecSetValues(
661: (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
662: }
663: void PETSC_STDCALL vecsetvaluesblocked_(Vec x,int *ni, int ix[], Scalar y[],InsertMode *iora, int *__ierr ){
664: *__VecSetValuesBlocked(
665: (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
666: }
667: void PETSC_STDCALL vecsetlocaltoglobalmapping_(Vec x,ISLocalToGlobalMapping *mapping, int *__ierr ){
668: *__VecSetLocalToGlobalMapping(
669: (Vec)PetscToPointer( (x) ),*mapping);
670: }
671: void PETSC_STDCALL vecsetlocaltoglobalmappingblock_(Vec x,ISLocalToGlobalMapping *mapping, int *__ierr ){
672: *__VecSetLocalToGlobalMappingBlock(
673: (Vec)PetscToPointer( (x) ),*mapping);
674: }
675: void PETSC_STDCALL vecsetvalueslocal_(Vec x,int *ni, int ix[], Scalar y[],InsertMode *iora, int *__ierr ){
676: *__VecSetValuesLocal(
677: (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
678: }
679: void PETSC_STDCALL vecsetvaluesblockedlocal_(Vec x,int *ni, int ix[], Scalar y[],InsertMode *iora, int *__ierr ){
680: *__VecSetValuesBlockedLocal(
681: (Vec)PetscToPointer( (x) ),*ni,ix,y,*iora);
682: }
683: void PETSC_STDCALL vecassemblybegin_(Vec vec, int *__ierr ){
684: *__VecAssemblyBegin(
685: (Vec)PetscToPointer( (vec) ));
686: }
687: void PETSC_STDCALL vecassemblyend_(Vec vec, int *__ierr ){
688: *__VecAssemblyEnd(
689: (Vec)PetscToPointer( (vec) ));
690: }
691: void PETSC_STDCALL vecgetsize_(Vec x,int *size, int *__ierr ){
692: *__VecGetSize(
693: (Vec)PetscToPointer( (x) ),size);
694: }
695: void PETSC_STDCALL vecgetlocalsize_(Vec x,int *size, int *__ierr ){
696: *__VecGetLocalSize(
697: (Vec)PetscToPointer( (x) ),size);
698: }
699: void PETSC_STDCALL vecgetownershiprange_(Vec x,int *low,int *high, int *__ierr ){
700: *__VecGetOwnershipRange(
701: (Vec)PetscToPointer( (x) ),low,high);
702: }
703: void PETSC_STDCALL vecsetoption_(Vec x,VecOption *op, int *__ierr ){
704: *__VecSetOption(
705: (Vec)PetscToPointer( (x) ),*op);
706: }
707: void PETSC_STDCALL vecplacearray_(Vec vec, Scalar array[], int *__ierr ){
708: *__VecPlaceArray(
709: (Vec)PetscToPointer( (vec) ),array);
710: }
711: void PETSC_STDCALL vecresetarray_(Vec vec, int *__ierr ){
712: *__VecResetArray(
713: (Vec)PetscToPointer( (vec) ));
714: }
715: void PETSC_STDCALL vecreciprocal_(Vec vec, int *__ierr ){
716: *__VecReciprocal(
717: (Vec)PetscToPointer( (vec) ));
718: }
719: void PETSC_STDCALL vecsetstashinitialsize_(Vec vec,int *size,int *bsize, int *__ierr ){
720: *__VecSetStashInitialSize(
721: (Vec)PetscToPointer( (vec) ),*size,*bsize);
722: }
723: void PETSC_STDCALL vecstashview_(Vec v,PetscViewer *viewer, int *__ierr ){
724: *__VecStashView(
725: (Vec)PetscToPointer( (v) ),*viewer);
726: }
727: #if defined(__cplusplus)
728: }
729: #endif