Actual source code: ztao_startf.c
1: /*$Id: ztao_startf.c 1.4 03/02/05 14:42:41-06:00 benson@rockies.mcs.anl.gov $*/
3: #include "src/fortran/custom/zpetsc.h"
4: /* #include "sys.h" */
5: #include "petscsys.h"
7: #ifdef PETSC_HAVE_FORTRAN_CAPS
8: #define taoinitializefortran_ TAOINITIALIZEFORTRAN
9: #define taosetcommonblock_ TAOSETCOMMONBLOCK
10: #define tao_null_function_ TAO_NULL_FUNCTION
11: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
12: #define taoinitializefortran_ taoinitializefortran
13: #define taosetcommonblock_ taosetcommonblock
14: #define tao_null_function_ tao_null_function
15: #endif
17: #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE_UNDERSCORE)
18: #define tao_null_function_ tao_null_function__
19: #endif
25: /*@C
26: TaoInitializeFortran - Routine that should be called from C after
27: the call to TaoInitialize() if one is using a C main program
28: that calls Fortran routines that in turn call TAO routines.
30: Collective on MPI_COMM_WORLD
32: Level: intermediate
34: Notes:
35: TaoInitializeFortran() initializes some of the default TAO variables
36: for use in Fortran if a user's main program is written in C.
37: TaoInitializeFortran() is NOT needed if a user's main
38: program is written in Fortran; in this case, just calling
39: TaoInitialize() in the main (Fortran) program is sufficient.
41: .seealso: TaoInitialize()
43: .keywords: Mixing C and Fortran, passing TAO objects to Fortran
44: @*/
46: int TaoInitializeFortran(void)
47: {
48: taosetcommonblock_();
49: return 0;
50: }
51:
54: void PETSC_STDCALL taoinitializefortran_(int *info)
55: {
56: *info = TaoInitializeFortran();
57: }
59: /*
60: A valid address for the Fortran variable TAO_NULL_FUNCTION
61: */
62: void tao_null_function_(void)
63: {
64: return;
65: }