Actual source code: f90_fwrap.F

petsc-3.6.1 2015-08-06
Report Typos and Errors
  1: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  2: !XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX!
  3: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4:       subroutine F90Array1dCreateScalar(array,start,len1,ptr)
  5:       implicit none
  6: #include <petsc/finclude/petscsys.h>
  7:       PetscInt start,len1
  8:       PetscScalar, target ::                                                      &
  9:      &     array(start:start+len1-1)
 10:       PetscScalar, pointer :: ptr(:)

 12:       ptr => array
 13:       end subroutine

 15:       subroutine F90Array1dCreateReal(array,start,len1,ptr)
 16:       implicit none
 17: #include <petsc/finclude/petscsys.h>
 18:       PetscInt start,len1
 19:       PetscReal, target ::                                                        &
 20:      &     array(start:start+len1-1)
 21:       PetscReal, pointer :: ptr(:)

 23:       ptr => array
 24:       end subroutine

 26:       subroutine F90Array1dCreateInt(array,start,len1,ptr)
 27:       implicit none
 28: #include <petsc/finclude/petscsys.h>
 29:       PetscInt start,len1
 30:       PetscInt, target ::                                                         &
 31:      &     array(start:start+len1-1)
 32:       PetscInt, pointer :: ptr(:)

 34:       ptr => array
 35:       end subroutine

 37:       subroutine F90Array1dCreateFortranAddr(array,start,len1,ptr)
 38:       implicit none
 39: #include <petsc/finclude/petscsys.h>
 40:       PetscInt start,len1
 41:       PetscFortranAddr, target ::                                                 &
 42:      &     array(start:start+len1-1)
 43:       PetscFortranAddr, pointer :: ptr(:)

 45:       ptr => array
 46:       end subroutine

 48: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 49:       subroutine F90Array1dAccessScalar(ptr,address)
 50:       implicit none
 51: #include <petsc/finclude/petscsys.h>
 52:       PetscScalar, pointer :: ptr(:)
 53:       PetscFortranAddr address
 54:       PetscInt start

 56:       start = lbound(ptr,1)
 57:       call F90Array1dGetAddrScalar(ptr(start),address)
 58:       end subroutine

 60:       subroutine F90Array1dAccessReal(ptr,address)
 61:       implicit none
 62: #include <petsc/finclude/petscsys.h>
 63:       PetscReal, pointer :: ptr(:)
 64:       PetscFortranAddr address
 65:       PetscInt start

 67:       start = lbound(ptr,1)
 68:       call F90Array1dGetAddrReal(ptr(start),address)
 69:       end subroutine

 71:       subroutine F90Array1dAccessInt(ptr,address)
 72:       implicit none
 73: #include <petsc/finclude/petscsys.h>
 74:       PetscInt, pointer :: ptr(:)
 75:       PetscFortranAddr address
 76:       PetscInt start

 78:       start = lbound(ptr,1)
 79:       call F90Array1dGetAddrInt(ptr(start),address)
 80:       end subroutine

 82:       subroutine F90Array1dAccessFortranAddr(ptr,address)
 83:       implicit none
 84: #include <petsc/finclude/petscsys.h>
 85:       PetscFortranAddr, pointer :: ptr(:)
 86:       PetscFortranAddr address
 87:       PetscInt start

 89:       start = lbound(ptr,1)
 90:       call F90Array1dGetAddrFortranAddr(ptr(start),address)
 91:       end subroutine

 93: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 94:       subroutine F90Array1dDestroyScalar(ptr)
 95:       implicit none
 96: #include <petsc/finclude/petscsys.h>
 97:       PetscScalar, pointer :: ptr(:)

 99:       nullify(ptr)
100:       end subroutine

102:       subroutine F90Array1dDestroyReal(ptr)
103:       implicit none
104: #include <petsc/finclude/petscsys.h>
105:       PetscReal, pointer :: ptr(:)

107:       nullify(ptr)
108:       end subroutine

110:       subroutine F90Array1dDestroyInt(ptr)
111:       implicit none
112: #include <petsc/finclude/petscsys.h>
113:       PetscInt, pointer :: ptr(:)

115:       nullify(ptr)
116:       end subroutine

118:       subroutine F90Array1dDestroyFortranAddr(ptr)
119:       implicit none
120: #include <petsc/finclude/petscsys.h>
121:       PetscFortranAddr, pointer :: ptr(:)

123:       nullify(ptr)
124:       end subroutine
125: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
126: !XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX!
127: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
128:       subroutine F90Array2dCreateScalar(array,start1,len1,                        &
129:      &     start2,len2,ptr)
130:       implicit none
131: #include <petsc/finclude/petscsys.h>
132:       PetscInt start1,len1
133:       PetscInt start2,len2
134:       PetscScalar, target ::                                                      &
135:      &     array(start1:start1+len1-1,start2:start2+len2-1)
136:       PetscScalar, pointer :: ptr(:,:)

138:       ptr => array
139:       end subroutine

141:       subroutine F90Array2dCreateReal(array,start1,len1,                          &
142:      &     start2,len2,ptr)
143:       implicit none
144: #include <petsc/finclude/petscsys.h>
145:       PetscInt start1,len1
146:       PetscInt start2,len2
147:       PetscReal, target ::                                                        &
148:      &     array(start1:start1+len1-1,start2:start2+len2-1)
149:       PetscReal, pointer :: ptr(:,:)

151:       ptr => array
152:       end subroutine

154:       subroutine F90Array2dCreateInt(array,start1,len1,                           &
155:      &     start2,len2,ptr)
156:       implicit none
157: #include <petsc/finclude/petscsys.h>
158:       PetscInt start1,len1
159:       PetscInt start2,len2
160:       PetscInt, target ::                                                         &
161:      &     array(start1:start1+len1-1,start2:start2+len2-1)
162:       PetscInt, pointer :: ptr(:,:)

164:       ptr => array
165:       end subroutine

167:       subroutine F90Array2dCreateFortranAddr(array,start1,len1,                   &
168:      &     start2,len2,ptr)
169:       implicit none
170: #include <petsc/finclude/petscsys.h>
171:       PetscInt start1,len1
172:       PetscInt start2,len2
173:       PetscFortranAddr, target ::                                                 &
174:      &     array(start1:start1+len1-1,start2:start2+len2-1)
175:       PetscFortranAddr, pointer :: ptr(:,:)

177:       ptr => array
178:       end subroutine

180: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
181:       subroutine F90Array2dAccessScalar(ptr,address)
182:       implicit none
183: #include <petsc/finclude/petscsys.h>
184:       PetscScalar, pointer :: ptr(:,:)
185:       PetscFortranAddr address
186:       PetscInt start1,start2

188:       start1 = lbound(ptr,1)
189:       start2 = lbound(ptr,2)
190:       call F90Array2dGetAddrScalar(ptr(start1,start2),address)
191:       end subroutine

193:       subroutine F90Array2dAccessReal(ptr,address)
194:       implicit none
195: #include <petsc/finclude/petscsys.h>
196:       PetscReal, pointer :: ptr(:,:)
197:       PetscFortranAddr address
198:       PetscInt start1,start2

200:       start1 = lbound(ptr,1)
201:       start2 = lbound(ptr,2)
202:       call F90Array2dGetAddrReal(ptr(start1,start2),address)
203:       end subroutine

205:       subroutine F90Array2dAccessInt(ptr,address)
206:       implicit none
207: #include <petsc/finclude/petscsys.h>
208:       PetscInt, pointer :: ptr(:,:)
209:       PetscFortranAddr address
210:       PetscInt start1,start2

212:       start1 = lbound(ptr,1)
213:       start2 = lbound(ptr,2)
214:       call F90Array2dGetAddrInt(ptr(start1,start2),address)
215:       end subroutine

217:       subroutine F90Array2dAccessFortranAddr(ptr,address)
218:       implicit none
219: #include <petsc/finclude/petscsys.h>
220:       PetscFortranAddr, pointer :: ptr(:,:)
221:       PetscFortranAddr address
222:       PetscInt start1,start2

224:       start1 = lbound(ptr,1)
225:       start2 = lbound(ptr,2)
226:       call F90Array2dGetAddrFortranAddr(ptr(start1,start2),address)
227:       end subroutine

229: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
230:       subroutine F90Array2dDestroyScalar(ptr)
231:       implicit none
232: #include <petsc/finclude/petscsys.h>
233:       PetscScalar, pointer :: ptr(:,:)

235:       nullify(ptr)
236:       end subroutine

238:       subroutine F90Array2dDestroyReal(ptr)
239:       implicit none
240: #include <petsc/finclude/petscsys.h>
241:       PetscReal, pointer :: ptr(:,:)

243:       nullify(ptr)
244:       end subroutine

246:       subroutine F90Array2dDestroyInt(ptr)
247:       implicit none
248: #include <petsc/finclude/petscsys.h>
249:       PetscInt, pointer :: ptr(:,:)

251:       nullify(ptr)
252:       end subroutine

254:       subroutine F90Array2dDestroyFortranAddr(ptr)
255:       implicit none
256: #include <petsc/finclude/petscsys.h>
257:       PetscFortranAddr, pointer :: ptr(:,:)

259:       nullify(ptr)
260:       end subroutine
261: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
262: !XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX!
263: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
264:       subroutine F90Array3dCreateScalar(array,start1,len1,                        &
265:      &     start2,len2,start3,len3,ptr)
266:       implicit none
267: #include <petsc/finclude/petscsys.h>
268:       PetscInt start1,len1
269:       PetscInt start2,len2
270:       PetscInt start3,len3
271:       PetscScalar, target ::                                                      &
272:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
273:      &           start3:start3+len3-1)
274:       PetscScalar, pointer :: ptr(:,:,:)

276:       ptr => array
277:       end subroutine

279:       subroutine F90Array3dCreateReal(array,start1,len1,                          &
280:      &     start2,len2,start3,len3,ptr)
281:       implicit none
282: #include <petsc/finclude/petscsys.h>
283:       PetscInt start1,len1
284:       PetscInt start2,len2
285:       PetscInt start3,len3
286:       PetscReal, target ::                                                        &
287:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
288:      &           start3:start3+len3-1)
289:       PetscReal, pointer :: ptr(:,:,:)

291:       ptr => array
292:       end subroutine

294:       subroutine F90Array3dCreateInt(array,start1,len1,                           &
295:      &     start2,len2,start3,len3,ptr)
296:       implicit none
297: #include <petsc/finclude/petscsys.h>
298:       PetscInt start1,len1
299:       PetscInt start2,len2
300:       PetscInt start3,len3
301:       PetscInt, target ::                                                         &
302:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
303:      &           start3:start3+len3-1)
304:       PetscInt, pointer :: ptr(:,:,:)

306:       ptr => array
307:       end subroutine

309:       subroutine F90Array3dCreateFortranAddr(array,start1,len1,                   &
310:      &     start2,len2,start3,len3,ptr)
311:       implicit none
312: #include <petsc/finclude/petscsys.h>
313:       PetscInt start1,len1
314:       PetscInt start2,len2
315:       PetscInt start3,len3
316:       PetscFortranAddr, target ::                                                 &
317:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
318:      &           start3:start3+len3-1)
319:       PetscFortranAddr, pointer :: ptr(:,:,:)

321:       ptr => array
322:       end subroutine

324: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
325:       subroutine F90Array3dAccessScalar(ptr,address)
326:       implicit none
327: #include <petsc/finclude/petscsys.h>
328:       PetscScalar, pointer :: ptr(:,:,:)
329:       PetscFortranAddr address
330:       PetscInt start1,start2,start3

332:       start1 = lbound(ptr,1)
333:       start2 = lbound(ptr,2)
334:       start3 = lbound(ptr,3)
335:       call F90Array3dGetAddrScalar(ptr(start1,start2,start3),address)
336:       end subroutine

338:       subroutine F90Array3dAccessReal(ptr,address)
339:       implicit none
340: #include <petsc/finclude/petscsys.h>
341:       PetscReal, pointer :: ptr(:,:,:)
342:       PetscFortranAddr address
343:       PetscInt start1,start2,start3

345:       start1 = lbound(ptr,1)
346:       start2 = lbound(ptr,2)
347:       start3 = lbound(ptr,3)
348:       call F90Array3dGetAddrReal(ptr(start1,start2,start3),address)
349:       end subroutine

351:       subroutine F90Array3dAccessInt(ptr,address)
352:       implicit none
353: #include <petsc/finclude/petscsys.h>
354:       PetscInt, pointer :: ptr(:,:,:)
355:       PetscFortranAddr address
356:       PetscInt start1,start2,start3

358:       start1 = lbound(ptr,1)
359:       start2 = lbound(ptr,2)
360:       start3 = lbound(ptr,3)
361:       call F90Array3dGetAddrInt(ptr(start1,start2,start3),address)
362:       end subroutine

364:       subroutine F90Array3dAccessFortranAddr(ptr,address)
365:       implicit none
366: #include <petsc/finclude/petscsys.h>
367:       PetscFortranAddr, pointer :: ptr(:,:,:)
368:       PetscFortranAddr address
369:       PetscInt start1,start2,start3

371:       start1 = lbound(ptr,1)
372:       start2 = lbound(ptr,2)
373:       start3 = lbound(ptr,3)
374:       call F90Array3dGetAddrFortranAddr(ptr(start1,start2,start3),        &
375:      &                                  address)
376:       end subroutine

378: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
379:       subroutine F90Array3dDestroyScalar(ptr)
380:       implicit none
381: #include <petsc/finclude/petscsys.h>
382:       PetscScalar, pointer :: ptr(:,:,:)

384:       nullify(ptr)
385:       end subroutine

387:       subroutine F90Array3dDestroyReal(ptr)
388:       implicit none
389: #include <petsc/finclude/petscsys.h>
390:       PetscReal, pointer :: ptr(:,:,:)

392:       nullify(ptr)
393:       end subroutine

395:       subroutine F90Array3dDestroyInt(ptr)
396:       implicit none
397: #include <petsc/finclude/petscsys.h>
398:       PetscInt, pointer :: ptr(:,:,:)

400:       nullify(ptr)
401:       end subroutine

403:       subroutine F90Array3dDestroyFortranAddr(ptr)
404:       implicit none
405: #include <petsc/finclude/petscsys.h>
406:       PetscFortranAddr, pointer :: ptr(:,:,:)

408:       nullify(ptr)
409:       end subroutine

411: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
412:       subroutine F90Array4dCreateScalar(array,start1,len1,                        &
413:      &     start2,len2,start3,len3,start4,len4,ptr)
414:       implicit none
415: #include <petsc/finclude/petscsys.h>
416:       PetscInt start1,len1
417:       PetscInt start2,len2
418:       PetscInt start3,len3
419:       PetscInt start4,len4
420:       PetscScalar, target ::                                                      &
421:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
422:      &           start3:start3+len3-1,start4:start4+len4-1)
423:       PetscScalar, pointer :: ptr(:,:,:,:)

425:       ptr => array
426:       end subroutine

428:       subroutine F90Array4dCreateReal(array,start1,len1,                          &
429:      &     start2,len2,start3,len3,start4,len4,ptr)
430:       implicit none
431: #include <petsc/finclude/petscsys.h>
432:       PetscInt start1,len1
433:       PetscInt start2,len2
434:       PetscInt start3,len3
435:       PetscInt start4,len4
436:       PetscReal, target ::                                                        &
437:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
438:      &           start3:start3+len3-1,start4:start4+len4-1)
439:       PetscReal, pointer :: ptr(:,:,:,:)

441:       ptr => array
442:       end subroutine

444:       subroutine F90Array4dCreateInt(array,start1,len1,                           &
445:      &     start2,len2,start3,len3,start4,len4,ptr)
446:       implicit none
447: #include <petsc/finclude/petscsys.h>
448:       PetscInt start1,len1
449:       PetscInt start2,len2
450:       PetscInt start3,len3
451:       PetscInt start4,len4
452:       PetscInt, target ::                                                         &
453:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
454:      &           start3:start3+len3-1,start4:start4+len4-1)
455:       PetscInt, pointer :: ptr(:,:,:,:)

457:       ptr => array
458:       end subroutine

460:       subroutine F90Array4dCreateFortranAddr(array,start1,len1,                   &
461:      &     start2,len2,start3,len3,start4,len4,ptr)
462:       implicit none
463: #include <petsc/finclude/petscsys.h>
464:       PetscInt start1,len1
465:       PetscInt start2,len2
466:       PetscInt start3,len3
467:       PetscInt start4,len4
468:       PetscFortranAddr, target ::                                                 &
469:      &     array(start1:start1+len1-1,start2:start2+len2-1,                       &
470:      &           start3:start3+len3-1,start4:start4+len4-1)
471:       PetscFortranAddr, pointer :: ptr(:,:,:,:)

473:       ptr => array
474:       end subroutine

476:       subroutine F90Array4dAccessScalar(ptr,address)
477:       implicit none
478: #include <petsc/finclude/petscsys.h>
479:       PetscScalar, pointer :: ptr(:,:,:,:)
480:       PetscFortranAddr address
481:       PetscInt start1,start2,start3,start4

483:       start1 = lbound(ptr,1)
484:       start2 = lbound(ptr,2)
485:       start3 = lbound(ptr,3)
486:       start4 = lbound(ptr,4)
487:       call F90Array4dGetAddrScalar(ptr(start1,start2,start3,start4),              &
488:      &                             address)
489:       end subroutine

491:       subroutine F90Array4dAccessReal(ptr,address)
492:       implicit none
493: #include <petsc/finclude/petscsys.h>
494:       PetscReal, pointer :: ptr(:,:,:,:)
495:       PetscFortranAddr address
496:       PetscInt start1,start2,start3,start4

498:       start1 = lbound(ptr,1)
499:       start2 = lbound(ptr,2)
500:       start3 = lbound(ptr,3)
501:       start4 = lbound(ptr,4)
502:       call F90Array4dGetAddrReal(ptr(start1,start2,start3,start4),                &
503:      &                             address)
504:       end subroutine

506:       subroutine F90Array4dAccessInt(ptr,address)
507:       implicit none
508: #include <petsc/finclude/petscsys.h>
509:       PetscInt, pointer :: ptr(:,:,:,:)
510:       PetscFortranAddr address
511:       PetscInt start1,start2,start3,start4

513:       start1 = lbound(ptr,1)
514:       start2 = lbound(ptr,2)
515:       start3 = lbound(ptr,3)
516:       start4 = lbound(ptr,4)
517:       call F90Array4dGetAddrInt(ptr(start1,start2,start3,start4),                 &
518:      &                             address)
519:       end subroutine

521:       subroutine F90Array4dAccessFortranAddr(ptr,address)
522:       implicit none
523: #include <petsc/finclude/petscsys.h>
524:       PetscScalar, pointer :: ptr(:,:,:,:)
525:       PetscFortranAddr address
526:       PetscFortranAddr start1,start2,start3,start4

528:       start1 = lbound(ptr,1)
529:       start2 = lbound(ptr,2)
530:       start3 = lbound(ptr,3)
531:       start4 = lbound(ptr,4)
532:       call F90Array4dGetAddrFortranAddr(ptr(start1,start2,start3,                 &
533:      &                                      start4),address)
534:       end subroutine

536:       subroutine F90Array4dDestroyScalar(ptr)
537:       implicit none
538: #include <petsc/finclude/petscsys.h>
539:       PetscScalar, pointer :: ptr(:,:,:,:)

541:       nullify(ptr)
542:       end subroutine

544:       subroutine F90Array4dDestroyReal(ptr)
545:       implicit none
546: #include <petsc/finclude/petscsys.h>
547:       PetscReal, pointer :: ptr(:,:,:,:)

549:       nullify(ptr)
550:       end subroutine

552:       subroutine F90Array4dDestroyInt(ptr)
553:       implicit none
554: #include <petsc/finclude/petscsys.h>
555:       PetscInt, pointer :: ptr(:,:,:,:)

557:       nullify(ptr)
558:       end subroutine

560:       subroutine F90Array4dDestroyFortranAddr(ptr)
561:       implicit none
562: #include <petsc/finclude/petscsys.h>
563:       PetscFortranAddr, pointer :: ptr(:,:,:,:)

565:       nullify(ptr)
566:       end subroutine

568: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
569: !XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX!
570: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!