vtf-logo

DAGHParams.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 #ifndef _included_DAGHParam_h
00004 #define _included_DAGHParam_h
00005 
00011 /* Default includes */
00012 #include "generic.h"
00013 
00014 /* DAGH True/False */
00015 #define DAGHTrue                (1)
00016 #define DAGHFalse               (0)
00017 
00018 /* DAGH Nulls */
00019 #define DAGHNull                (-1)
00020 #define DAGHNoBody              (DAGHNull)
00021 #define DAGHNullLevel           (DAGHNull)
00022 
00023 #define DAGHAll                 (9999)
00024 #define DAGHSmall               (-999999)
00025 #define DAGHLarge               ( 999999)
00026 
00027 /* Level Information */
00028 #define DAGHAllLevels           (DAGHAll)
00029 
00030 /* Time Information */
00031 #define DAGHAllTimes            (DAGHAll)
00032 #define DAGHCurrentTime         (0)
00033 #define DAGHNextTime            (1)
00034 #define DAGHPreviousTime        (2)
00035 
00036 /* Distribution Types */
00037 #define DAGHCompositeDistribution       (1)
00038 #define DAGHBlockXDistribution          (2)
00039 #define DAGHBlockYDistribution          (3)
00040 #define DAGHBlockZDistribution          (4)
00041 #define DAGHBlockXYDistribution         (5)
00042 #define DAGHBlockYZDistribution         (6)
00043 #define DAGHBlockXZDistribution         (7)
00044 #define DAGHBlockAllDistribution        (8)
00045 #define DAGHUserDefDistribution         (9)
00046 
00047 /* Interaction Types */
00048 #define DAGHNoInteraction               (DAGHNull)
00049 #define DAGHGhostInteraction            (1)
00050 
00051 /* GridFunction Flags */
00052 #define DAGHInitGFOnCreation            (DAGHFalse)
00053 
00054 /* Axis Information */
00055 #define DAGHMaxRank     (3)
00056 
00057 #define DAGH_X          (0)
00058 #define DAGH_Y          (1)
00059 #define DAGH_Z          (2)
00060 #define DAGH_All        (3)
00061 #define DAGHMaxAxis     (4)     /* 3 + 1 */
00062 #define DAGH_XY         (5)
00063 #define DAGH_XZ         (6)
00064 #define DAGH_YZ         (7)
00065 #define DAGH_Dim1ToTop  (8)
00066 #define DAGH_Dim2ToTop  (16)
00067 
00068 /* Direction Information */
00069 #define DAGH_Backward   (0)
00070 #define DAGH_Forward    (1)
00071 #define DAGH_Both       (2)
00072 #define DAGHMaxDirs     (3)     /* 2 + 1 */
00073 #define DAGHHisDir(d)   (((d) == DAGH_Both) ? (d) : (1 - (d)))
00074 #define DAGH_Inside     (4)
00075 
00076 /* DAGH Types */
00077 #define DAGHCellCentered        (1)
00078 #define DAGHNonCellCentered     (2)
00079 #define DAGHVertexCentered      (2)
00080 #define DAGHFaceCentered_X      (3)
00081 #define DAGHFaceCentered_Y      (4)
00082 #define DAGHFaceCentered_Z      (5)
00083 
00084 /* GF Comm Flag */
00085 #define DAGHNoComm              (DAGHNull)
00086 #define DAGHComm                (1)
00087 #define DAGHCommNoFace          (2)
00088 #define DAGHCommFaceOnly        (3)
00089 #define DAGHCommNoCorner        (4)
00090 #define DAGHCommNoEdge          (5)
00091 #define DAGHCommCurrentTimeOnly (6)
00092 //DAGHCommSimple =  DAGHCommFaceOnly + DAGHCommCurrentTimeOnly + DAGH_All + DAGH_Both
00093 #define DAGHCommSimple          (7) 
00094 #define DAGHTemplateComm        (20)
00095 
00096 /* GF Shadow Flag */
00097 #define DAGHShadowFactor        (2)
00098 
00099 /* GF External Ghost Flag */
00100 #define DAGHNoExternalGhost     (DAGHNull)
00101 #define DAGHHasExternalGhost    (DAGHTrue)
00102 
00103 /* GF Checkpoint Flag */
00104 #define DAGHNoCheckpoint        (DAGHNull)
00105 #define DAGHCheckpoint          (DAGHTrue)
00106 
00107 /* Return Types */
00108 #define DAGH_OK                 (0)
00109 #define DAGH_ERROR              (-1)
00110 #define DAGH_WARN               (-2)
00111 #define DAGH_FATAL              (-3)
00112 
00113 /* DAGH IO/Steering Data Types */
00114 #define DAGH_Integer            (1)
00115 #define DAGH_Real               (2)
00116 #define DAGH_Double             (3)
00117 #define DAGH_Character          (4)
00118 #define DAGH_Byte               (5)
00119 
00120 /* Coordinate Types */
00121 #define DAGHWorldCoords         (1)
00122 #define DAGHLocalCoords         (2)
00123 
00124 /* DAGHViz Types */
00125 #define DAGHViz_NONE            (DAGHNull)
00126 #define DAGHViz_XGRAPH          (1)
00127 #define DAGHViz_FILE            (2)
00128 
00129 /* Message Classes */
00130 #define DAGHGhost           0
00131 #define DAGHData            1
00132 #define DAGHIO              2
00133 #define DAGHService         3
00134 
00135 /* Message Tag Shifts */
00136 #define DAGHTypeShift       (12)
00137 #define DAGHTimeShift       (10)
00138 #define DAGHLevelShift      (4)
00139 #define DAGHDirShift        (0)
00140 
00141 /* Message Tags */
00142 #define DAGHGhostTag        (DAGHGhost << DAGHTypeShift)
00143 #define DAGHDataTag         (DAGHData << DAGHTypeShift)
00144 #define DAGHIOTag           (DAGHIO << DAGHTypeShift)
00145 #define DAGHServiceTag      (DAGHService << DAGHTypeShift)
00146 
00147 /* DAGH Boundary Which */
00148 #define DAGH_ExternalBoundary           (1)
00149 #define DAGH_AdaptiveBoundary           (2)
00150 #define DAGH_InternalBoundary           (3)
00151 
00152 /* DAGH External Boundary Types */
00153 #define DAGHNoBoundary                  (0)
00154 #define DAGHBoundaryConst               (1)
00155 #define DAGHBoundaryRegular             (1)
00156 #define DAGHBoundaryShift               (2)
00157 #define DAGHBoundaryUserDef             (3)
00158 
00159 /* DAGH Adaptive Boundary Types */
00160 #define DAGHNoAdaptBoundary             (0)
00161 #define DAGHAdaptBoundaryInterp         (1)
00162 #define DAGHAdaptBoundaryUserDef        (2)
00163 #define DAGHAdaptBoundaryBoth           (3)
00164 
00165 /* Norms defined for GridFunctions */
00166 #define DAGHNoNorm                      (0)
00167 #define DAGHNormL1                      (1)
00168 #define DAGHNormL2                      (2)
00169 #define DAGHNormMax                     (3)
00170 
00171 /* Emulating fortran types */
00172 /* Emulating fortran types */
00173 #if (defined(CRAYC90) || defined(CRAYT3D) || defined(CRAYT3E))
00174 typedef int INTEGER;
00175 typedef float REAL;
00176 typedef double DOUBLE;
00177 typedef char CHARACTER;
00178 #else
00179 typedef int INTEGER;
00180 #ifndef REAL
00181 typedef float REAL;
00182 #endif
00183 typedef double DOUBLE;
00184 typedef char CHARACTER;
00185 #endif
00186 
00187 /* Emulating fortran types */
00188 #ifndef MAXLIM
00189 #define MAXLIM(T) ((T)(((unsigned long)(-1))))
00190 // # define MAXLIM(T) ((T)((~(unsigned long)0 >> 1)))
00191 // # define MAXLIM(T) ((T)((unsigned) 1 << (8*sizeof(T))))
00192 #endif
00193 
00194 /* Fortran interface generation macros */
00195 #include "DAGHFortranInterfaces.h"
00196 
00197 #define Global_Min_Max(Type)                             \
00198   inline const Type& Min(const Type& a, const Type& b)      \
00199     { return((a < b) ? a : b); }                         \
00200   inline const Type& Max(const Type& a, const Type& b)      \
00201     { return((a > b) ? a : b); }                   
00202 
00203   Global_Min_Max(int)
00204   Global_Min_Max(unsigned int)
00205   Global_Min_Max(long)
00206   Global_Min_Max(unsigned long)
00207   Global_Min_Max(float)
00208   Global_Min_Max(double)
00209 #undef Global_Min_Max
00210 
00211 #include <cstdlib>
00212 #include <cmath>
00213 
00214 inline int Abs(int x) { return std::abs(x); }
00215 inline long Abs(long x) { return std::labs(x); }
00216 inline float Abs(float x) { return std::fabs(x); }
00217 inline double Abs(double x) { return std::fabs(x); }
00218 
00219 // ---------------------------------------------------------------------
00220 
00221 #endif

Generated on Fri Aug 24 13:00:29 2007 for AMROC's Hierachical Data Structures - by  doxygen 1.4.7