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