Blockstructured Adaptive Mesh Refinement in object-oriented C++
00001 #ifndef _included_FortranInterfaces_h 00002 #define _included_FortranInterfaces_h 00003 00016 #if (defined(RS6000) || defined(SPX)) 00017 #define FORTRAN_NAME(x,y,z) x 00018 #else 00019 #if (defined(nCUBE2) || defined(CRAYC90) || defined(CRAYT3D) || defined(CRAYT3E)) 00020 #define FORTRAN_NAME(x,y,z) y 00021 #else 00022 #define FORTRAN_NAME(x,y,z) x 00023 #endif 00024 #endif 00025 00026 /* Fortran interface generation macros */ 00027 /* Interfaces with local coordinates */ 00028 #ifndef DATA_ARGS1 00029 #define DATA_ARGS1(X) &((X).extents()(0)) 00030 #endif 00031 #ifndef DATA_ARGS2 00032 #define DATA_ARGS2(X) &((X).extents()(0)), &((X).extents()(1)) 00033 #endif 00034 #ifndef DATA_ARGS3 00035 #define DATA_ARGS3(X) &((X).extents()(0)), &((X).extents()(1)), &((X).extents()(2)) 00036 #endif 00037 00038 #ifndef ARRAY_ARGS1 00039 #define ARRAY_ARGS1(X) (X)[0] 00040 #endif 00041 #ifndef ARRAY_ARGS2 00042 #define ARRAY_ARGS2(X) (X)[0], (X)[1] 00043 #endif 00044 #ifndef ARRAY_ARGS3 00045 #define ARRAY_ARGS3(X) (X)[0], (X)[1], (X)[2] 00046 #endif 00047 00048 #ifndef DATA_INFS1 00049 #define DATA_INFS1 INTEGER * 00050 #endif 00051 #ifndef DATA_INFS2 00052 #define DATA_INFS2 INTEGER *, INTEGER * 00053 #endif 00054 #ifndef DATA_INFS3 00055 #define DATA_INFS3 INTEGER *, INTEGER *, INTEGER * 00056 #endif 00057 00058 #ifndef LOCAL_FORTRAN_ARGS 00059 #define LOCAL_FORTRAN_ARGS(D,X) (X).data(), name2(DATA_ARGS,D)(X),\ 00060 (X).lower()/(X).stepsize(), \ 00061 (X).upper()/(X).stepsize() 00062 #endif 00063 #define LFA LOCAL_FORTRAN_ARGS 00064 00065 #ifndef LOCAL_FORTRAN_INTERFACE 00066 #define LOCAL_FORTRAN_INTERFACE(D,T) T *, name2(DATA_INFS,D), \ 00067 INTEGER *, INTEGER * 00068 #endif 00069 #define LFI LOCAL_FORTRAN_INTERFACE 00070 00071 #ifndef LOCAL_BBOX_ARGS 00072 #define LOCAL_BBOX_ARGS(X) (X).lower()/(X).stepsize(), \ 00073 (X).upper()/(X).stepsize(), \ 00074 (X).extents() 00075 #endif 00076 #define LBA LOCAL_BBOX_ARGS 00077 00078 #ifndef LOCAL_BBOX_INTERFACE 00079 #define LOCAL_BBOX_INTERFACE INTEGER *, INTEGER *, INTEGER * 00080 #endif 00081 #define LBI LOCAL_BBOX_INTERFACE 00082 00083 /* Interfaces with global coordinates */ 00084 #ifndef GLOBAL_FORTRAN_ARGS 00085 #define GLOBAL_FORTRAN_ARGS(D,X) (X).data(), name2(DATA_ARGS,D)(X), \ 00086 (X).lower(), \ 00087 (X).upper(), \ 00088 (X).stepsize() 00089 #endif 00090 #define GFA GLOBAL_FORTRAN_ARGS 00091 00092 #ifndef GLOBAL_FORTRAN_INTERFACE 00093 #define GLOBAL_FORTRAN_INTERFACE(D,T) T *, name2(DATA_INFS,D), \ 00094 INTEGER *, INTEGER *, INTEGER * 00095 #endif 00096 #define GFI GLOBAL_FORTRAN_INTERFACE 00097 00098 #ifndef GLOBAL_BBOX_ARGS 00099 #define GLOBAL_BBOX_ARGS(X) (X).lower(), \ 00100 (X).upper(), \ 00101 (X).stepsize(), \ 00102 (X).extents() 00103 #endif 00104 #define GBA GLOBAL_BBOX_ARGS 00105 00106 #ifndef GLOBAL_BBOX_INTERFACE 00107 #define GLOBAL_BBOX_INTERFACE INTEGER *, INTEGER *, INTEGER *, INTEGER * 00108 #endif 00109 #define GBI GLOBAL_BBOX_INTERFACE 00110 00111 /* Interfaces with world coordinates */ 00112 #ifndef WORLD_FORTRAN_ARGS 00113 #define WORLD_FORTRAN_ARGS(D,GH,X) (X).data(), name2(DATA_ARGS,D)(X), \ 00114 (GH).worldCoordsLower((X).lower(),(X).stepsize()), \ 00115 (GH).worldCoordsUpper((X).upper(),(X).stepsize()), \ 00116 (GH).worldStep((X).stepsize()) 00117 #endif 00118 #define WFA WORLD_FORTRAN_ARGS 00119 00120 #ifndef WORLD_FORTRAN_INTERFACE 00121 #define WORLD_FORTRAN_INTERFACE(T) T *, name2(DATA_INFS,D), \ 00122 DOUBLE *, DOUBLE *, DOUBLE * 00123 #endif 00124 #define WFI WORLD_FORTRAN_INTERFACE 00125 00126 #ifndef WORLD_BBOX_ARGS 00127 #define WORLD_BBOX_ARGS(GH,X) (GH).worldCoordsLower((X).lower(),(X).stepsize()), \ 00128 (GH).worldCoordsUpper((X).upper(),(X).stepsize()), \ 00129 (GH).worldStep((X).stepsize()) 00130 #endif 00131 #define WBA WORLD_BBOX_ARGS 00132 00133 #ifndef WORLD_BBOX_INTERFACE 00134 #define WORLD_BBOX_INTERFACE DOUBLE *, DOUBLE *, DOUBLE *, INTEGER * 00135 #endif 00136 #define WBI WORLD_BBOX_INTERFACE 00137 00138 /* The data only */ 00139 #ifndef DATA_ARGUMENT 00140 #define DATA_ARGUMENT(X) (X).data() 00141 #endif 00142 #define DA DATA_ARGUMENT 00143 00144 #ifndef DATA_INTERFACE 00145 #define DATA_INTERFACE(T) T * 00146 #endif 00147 #define DI DATA_INTERFACE 00148 00149 /* Original interfaces */ 00150 #ifndef FORTRAN_ARGS 00151 #define FORTRAN_ARGS(D,X) (X).data(), name2(DATA_ARGS,D)(X), \ 00152 (X).lower(), \ 00153 (X).upper() 00154 #endif 00155 #define FA FORTRAN_ARGS 00156 00157 #ifndef FORTRAN_INTERFACE 00158 #define FORTRAN_INTERFACE(D,T) T *, name2(DATA_INFS,D), \ 00159 INTEGER *, INTEGER * 00160 #endif 00161 #define FI FORTRAN_INTERFACE 00162 00163 #ifndef BOUNDING_BOX 00164 #define BOUNDING_BOX(X) (X).lower(), \ 00165 (X).upper(), \ 00166 (X).extents() 00167 #endif 00168 #define BB BOUNDING_BOX 00169 00170 #ifndef BBOX_INTERFACE 00171 #define BBOX_INTERFACE INTEGER *, INTEGER *, INTEGER * 00172 #endif 00173 #define BI BBOX_INTERFACE 00174 00175 #ifndef FORTRAN_DATA_INTERFACE 00176 #define FORTRAN_DATA_INTERFACE(T) T * 00177 #endif 00178 #define FDI FORTRAN_DATA_INTERFACE 00179 00180 #ifndef FDA 00181 #define FDA(X) (X).data() 00182 #endif 00183 00184 #ifndef FBA 00185 #define FBA BOUNDING_BOX 00186 #endif 00187 00188 #ifndef FA 00189 #define FA FORTRAN_ARGS 00190 #endif 00191 00192 #ifndef ARRAY_ARGUMENTS 00193 #define ARRAY_ARGUMENTS(D,X) name2(ARRAY_ARGS,D)(X) 00194 #endif 00195 00196 #ifndef AA 00197 #define AA ARRAY_ARGUMENTS 00198 #endif 00199 00200 #endif
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04