Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FORT_PROTO.H

Go to the documentation of this file.
00001 /* _______              __
00002   / ___/ /  ___  __ _  / /  ___
00003  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004  \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 //
00007 // This software is copyright (C) by the Lawrence Berkeley
00008 // National Laboratory.  Permission is granted to reproduce
00009 // this software for non-commercial purposes provided that
00010 // this notice is left intact.
00011 // 
00012 // It is acknowledged that the U.S. Government has rights to
00013 // this software under Contract DE-AC03-765F00098 between
00014 // the U.S.  Department of Energy and the University of
00015 // California.
00016 //
00017 // This software is provided as a professional and academic
00018 // contribution for joint exchange. Thus it is experimental,
00019 // is provided ``as is'', with no warranties of any kind
00020 // whatsoever, no support, no promise of updates, or printed
00021 // documentation. By using this software, you acknowledge
00022 // that the Lawrence Berkeley National Laboratory and
00023 // Regents of the University of California shall have no
00024 // liability with respect to the infringement of other
00025 // copyrights by any part of this software.
00026 //
00027 
00028 #ifndef _FORT_PROTO_H_
00029 #define _FORT_PROTO_H_
00030 
00031 #include "REAL.H"
00032 #include "SPACE.H"
00033 
00034 #ifdef CH_FORT_UPPERCASE
00035   #ifdef CH_FORT_UNDERSCORE
00036      #define FORTRAN_NAME( NAME ,name ) NAME ## _
00037   #else
00038      #define FORTRAN_NAME( NAME ,name ) NAME
00039   #endif
00040 #else
00041   #ifdef CH_FORT_UNDERSCORE
00042      #define FORTRAN_NAME( NAME ,name ) name ## _
00043   #else
00044      #define FORTRAN_NAME( NAME ,name ) name
00045   #endif
00046 #endif
00047 
00048 
00049 // ChomboFortran declaration macros for Application code
00050 
00051 // primitive data types
00052 
00053 #define CHF_INT( i ) &i
00054 #define CHF_REAL( r ) &r
00055 #define CHF_CONST_INT( i ) &i
00056 #define CHF_CONST_REAL( r ) &r
00057 
00058 // Chombo data types
00059 
00060 #define CHF_BOX( b ) D_DECL( &b.loVect()[0] \
00061                             ,&b.loVect()[1] \
00062                             ,&b.loVect()[2] ) \
00063                     ,D_DECL( &b.hiVect()[0] \
00064                             ,&b.hiVect()[1] \
00065                             ,&b.hiVect()[2] ) 
00066 
00067 #define CHF_FIA( a ) a.dataPtr( 0 ) \
00068                      ,D_DECL( &a.loVect()[0] \
00069                              ,&a.loVect()[1] \
00070                              ,&a.loVect()[2] ) \
00071                      ,D_DECL( &a.hiVect()[0] \
00072                              ,&a.hiVect()[1] \
00073                              ,&a.hiVect()[2] ) \
00074                      ,a.nCompPtr()
00075 
00076 #define CHF_FRA( a ) a.dataPtr( 0 ) \
00077                      ,D_DECL( &a.loVect()[0] \
00078                              ,&a.loVect()[1] \
00079                              ,&a.loVect()[2] ) \
00080                      ,D_DECL( &a.hiVect()[0] \
00081                              ,&a.hiVect()[1] \
00082                              ,&a.hiVect()[2] ) \
00083                      ,a.nCompPtr()
00084 
00085 #define CHF_CONST_FIA( a ) a.dataPtr( 0 ) \
00086                      ,D_DECL( &a.loVect()[0] \
00087                              ,&a.loVect()[1] \
00088                              ,&a.loVect()[2] ) \
00089                      ,D_DECL( &a.hiVect()[0] \
00090                              ,&a.hiVect()[1] \
00091                              ,&a.hiVect()[2] ) \
00092                      ,a.nCompPtr()
00093 
00094 #define CHF_CONST_FRA( a ) a.dataPtr( 0 ) \
00095                      ,D_DECL( &a.loVect()[0] \
00096                              ,&a.loVect()[1] \
00097                              ,&a.loVect()[2] ) \
00098                      ,D_DECL( &a.hiVect()[0] \
00099                              ,&a.hiVect()[1] \
00100                              ,&a.hiVect()[2] ) \
00101                      ,a.nCompPtr()
00102 
00103 #define CHF_FIA1( a,n ) a.dataPtr( n ) \
00104                      ,D_DECL( &a.loVect()[0] \
00105                              ,&a.loVect()[1] \
00106                              ,&a.loVect()[2] ) \
00107                      ,D_DECL( &a.hiVect()[0] \
00108                              ,&a.hiVect()[1] \
00109                              ,&a.hiVect()[2] )
00110 
00111 #define CHF_INTVECT( a ) a.dataPtr( ) 
00112 #define CHF_CONST_INTVECT( a ) a.dataPtr( ) 
00113 #define CHF_REALVECT( a ) a.dataPtr( ) 
00114 #define CHF_CONST_REALVECT( a ) a.dataPtr( ) 
00115 
00116 #define CHF_FRA1( a,n ) a.dataPtr( n ) \
00117                      ,D_DECL( &a.loVect()[0] \
00118                              ,&a.loVect()[1] \
00119                              ,&a.loVect()[2] ) \
00120                      ,D_DECL( &a.hiVect()[0] \
00121                              ,&a.hiVect()[1] \
00122                              ,&a.hiVect()[2] )
00123 
00124 #define CHF_CONST_FIA1( a,n ) a.dataPtr( n ) \
00125                      ,D_DECL( &a.loVect()[0] \
00126                              ,&a.loVect()[1] \
00127                              ,&a.loVect()[2] ) \
00128                      ,D_DECL( &a.hiVect()[0] \
00129                              ,&a.hiVect()[1] \
00130                              ,&a.hiVect()[2] )
00131 
00132 #define CHF_CONST_FRA1( a,n ) a.dataPtr( n ) \
00133                      ,D_DECL( &a.loVect()[0] \
00134                              ,&a.loVect()[1] \
00135                              ,&a.loVect()[2] ) \
00136                      ,D_DECL( &a.hiVect()[0] \
00137                              ,&a.hiVect()[1] \
00138                              ,&a.hiVect()[2] )
00139 
00140 
00141 // Macros used in automatically-generated Chombo Fortran prototypes
00142 
00143 #define CHFp_INT( i ) int* const i
00144 #define CHFp_CONST_INT( i ) const int* const i
00145 #define CHFp_REAL( r ) Real* const r
00146 #define CHFp_CONST_REAL( r ) const Real* const r
00147 #define CHFp_CONST_REALVECT( r ) const Real* const r
00148 #define CHFp_REALVECT( r )  Real* const r
00149 #define CHFp_CONST_INTVECT( r ) const int* const r
00150 #define CHFp_INTVECT( r ) int* const r
00151 
00152 #define CHFp_BOX( b ) D_DECL( const int* const i ## b ## lo0 \
00153                              ,const int* const i ## b ## lo1 \
00154                              ,const int* const i ## b ## lo2 ) \
00155                      ,D_DECL( const int* const i ## b ## hi0 \
00156                              ,const int* const i ## b ## hi1 \
00157                              ,const int* const i ## b ## hi2 ) 
00158 
00159 #define CHFp_FIA( a ) int *const a \
00160                      ,D_DECL( const int* const i ## a ## lo0 \
00161                              ,const int* const i ## a ## lo1 \
00162                              ,const int* const i ## a ## lo2 ) \
00163                      ,D_DECL( const int* const i ## a ## hi0 \
00164                              ,const int* const i ## a ## hi1 \
00165                              ,const int* const i ## a ## hi2 ) \
00166                              ,const int* const n ## a ## comp
00167 #define CHFp_FRA( a ) Real *const a \
00168                      ,D_DECL( const int* const i ## a ## lo0 \
00169                              ,const int* const i ## a ## lo1 \
00170                              ,const int* const i ## a ## lo2 ) \
00171                      ,D_DECL( const int* const i ## a ## hi0 \
00172                              ,const int* const i ## a ## hi1 \
00173                              ,const int* const i ## a ## hi2 ) \
00174                              ,const int* const n ## a ## comp
00175 #define CHFp_CONST_FIA( a ) const int *const a \
00176                      ,D_DECL( const int* const i ## a ## lo0 \
00177                              ,const int* const i ## a ## lo1 \
00178                              ,const int* const i ## a ## lo2 ) \
00179                      ,D_DECL( const int* const i ## a ## hi0 \
00180                              ,const int* const i ## a ## hi1 \
00181                              ,const int* const i ## a ## hi2 ) \
00182                              ,const int* const n ## a ## comp
00183 #define CHFp_CONST_FRA( a ) const Real *const a \
00184                      ,D_DECL( const int* const i ## a ## lo0 \
00185                              ,const int* const i ## a ## lo1 \
00186                              ,const int* const i ## a ## lo2 ) \
00187                      ,D_DECL( const int* const i ## a ## hi0 \
00188                              ,const int* const i ## a ## hi1 \
00189                              ,const int* const i ## a ## hi2 ) \
00190                              ,const int* const n ## a ## comp
00191 #define CHFp_FIA1( a ) int *const a \
00192                      ,D_DECL( const int* const i ## a ## lo0 \
00193                              ,const int* const i ## a ## lo1 \
00194                              ,const int* const i ## a ## lo2 ) \
00195                      ,D_DECL( const int* const i ## a ## hi0 \
00196                              ,const int* const i ## a ## hi1 \
00197                              ,const int* const i ## a ## hi2 )
00198 #define CHFp_FRA1( a ) Real *const a \
00199                      ,D_DECL( const int* const i ## a ## lo0 \
00200                              ,const int* const i ## a ## lo1 \
00201                              ,const int* const i ## a ## lo2 ) \
00202                      ,D_DECL( const int* const i ## a ## hi0 \
00203                              ,const int* const i ## a ## hi1 \
00204                              ,const int* const i ## a ## hi2 )
00205 #define CHFp_CONST_FIA1( a ) const int *const a \
00206                      ,D_DECL( const int* const i ## a ## lo0 \
00207                              ,const int* const i ## a ## lo1 \
00208                              ,const int* const i ## a ## lo2 ) \
00209                      ,D_DECL( const int* const i ## a ## hi0 \
00210                              ,const int* const i ## a ## hi1 \
00211                              ,const int* const i ## a ## hi2 )
00212 #define CHFp_CONST_FRA1( a ) const Real *const a \
00213                      ,D_DECL( const int* const i ## a ## lo0 \
00214                              ,const int* const i ## a ## lo1 \
00215                              ,const int* const i ## a ## lo2 ) \
00216                      ,D_DECL( const int* const i ## a ## hi0 \
00217                              ,const int* const i ## a ## hi1 \
00218                              ,const int* const i ## a ## hi2 )
00219 
00220 #endif

Generated on Wed Apr 16 14:31:04 2003 for EBChombo by doxygen1.2.16