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

CONSTANTS.H

Go to the documentation of this file.
00001 #ifndef CH_CONSTANTS_H
00002 #define CH_CONSTANTS_H
00003 
00004 #ifdef CH_LANG_CC
00005 /* _______              __
00006   / ___/ /  ___  __ _  / /  ___
00007  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00008  \___/_//_/\___/_/_/_/_.__/\___/ 
00009 */
00010 //
00011 // This software is copyright (C) by the Lawrence Berkeley
00012 // National Laboratory.  Permission is granted to reproduce
00013 // this software for non-commercial purposes provided that
00014 // this notice is left intact.
00015 // 
00016 // It is acknowledged that the U.S. Government has rights to
00017 // this software under Contract DE-AC03-765F00098 between
00018 // the U.S.  Department of Energy and the University of
00019 // California.
00020 //
00021 // This software is provided as a professional and academic
00022 // contribution for joint exchange. Thus it is experimental,
00023 // is provided ``as is'', with no warranties of any kind
00024 // whatsoever, no support, no promise of updates, or printed
00025 // documentation. By using this software, you acknowledge
00026 // that the Lawrence Berkeley National Laboratory and
00027 // Regents of the University of California shall have no
00028 // liability with respect to the infringement of other
00029 // copyrights by any part of this software.
00030 //
00031 /* CH_COPYRIGHT_NOTICE */
00032 
00033 /*
00034 ** $Id: CONSTANTS.H,v 1.6 2002/03/19 23:21:18 ligocki Exp $
00035 */
00036 #endif
00037 
00038 #if defined(CH_LANG_FORT) || defined(CH_CRAY)
00039 
00040 /* use single-precision constants on the T3E regardless of whether
00041  * USE_FLOAT or USE_DOUBLE is defined
00042 */
00043 #if defined(CH_USE_FLOAT)
00044 
00045 #define zero     (0.0e0)
00046 #define one      (1.0e0)
00047 #define two      (2.0e0)
00048 #define three    (3.0e0)
00049 #define four     (4.0e0)
00050 #define five     (5.0e0)
00051 #define six      (6.0e0)
00052 #define seven    (7.0e0)
00053 #define eight    (8.0e0)
00054 #define nine     (9.0e0)
00055 #define ten     (10.0e0)
00056 #define twelve  (12.0e0)
00057 #define fifteen (15.0e0)
00058 #define sixteen (16.0e0)
00059 #define twenty  (20.0e0)
00060 #define tenth   (0.100e0)
00061 #define eighth  (0.125e0)
00062 #define sixth   (1.000e0 /  6.000e0)
00063 #define fourth  (0.250e0)
00064 #define third   (1.000e0 /  3.000e0)
00065 #define half    (0.500e0)
00066 #define two3rd  (2.000e0 /  3.000e0)
00067 #define Pi      (3.14159265358979323846e0)
00068 
00069 #define ZERO     (0.0E0)
00070 #define ONE      (1.0E0)
00071 #define TWO      (2.0E0)
00072 #define THREE    (3.0E0)
00073 #define FOUR     (4.0E0)
00074 #define FIVE     (5.0E0)
00075 #define SIX      (6.0E0)
00076 #define SEVEN    (7.0E0)
00077 #define EIGHT    (8.0E0)
00078 #define NINE     (9.0E0)
00079 #define TEN     (10.0E0)
00080 #define TWELVE  (12.0E0)
00081 #define FIFTEEN (15.0E0)
00082 #define SIXTEEN (16.0E0)
00083 #define TWENTY  (20.0E0)
00084 #define TENTH   (0.100E0)
00085 #define EIGHTH  (0.125E0)
00086 #define SIXTH   (1.000E0 / 6.000E0)
00087 #define FOURTH  (0.250E0)
00088 #define THIRD   (1.000E0 / 3.000E0)
00089 #define HALF    (0.500E0)
00090 #define TWO3RD  (2.000E0 / 3.000E0)
00091 #define PI      (3.14159265358979323846E0)
00092 
00093 #elif defined(CH_USE_DOUBLE)
00094 
00095 #define zero     (0.0d0)
00096 #define one      (1.0d0)
00097 #define two      (2.0d0)
00098 #define three    (3.0d0)
00099 #define four     (4.0d0)
00100 #define five     (5.0d0)
00101 #define six      (6.0d0)
00102 #define seven    (7.0d0)
00103 #define eight    (8.0d0)
00104 #define nine     (9.0d0)
00105 #define ten     (10.0d0)
00106 #define twelve  (12.0d0)
00107 #define fifteen (15.0d0)
00108 #define sixteen (16.0d0)
00109 #define twenty  (20.0d0)
00110 #define tenth   (0.100d0)
00111 #define eighth  (0.125d0)
00112 #define sixth   (1.000d0 / 6.000d0)
00113 #define fourth  (0.250d0)
00114 #define third   (1.000d0 / 3.000d0)
00115 #define half    (0.500d0)
00116 #define two3rd  (2.000d0 / 3.000d0)
00117 #define Pi      (3.14159265358979323846264338327950288d0)
00118 
00119 #define ZERO    (0.0D0)
00120 #define ONE     (1.0D0)
00121 #define TWO     (2.0D0)
00122 #define THREE   (3.0D0)
00123 #define FOUR    (4.0D0)
00124 #define FIVE    (5.0D0)
00125 #define SIX     (6.0D0)
00126 #define SEVEN   (7.0D0)
00127 #define EIGHT   (8.0D0)
00128 #define NINE    (9.0D0)
00129 #define TEN     (10.0D0)
00130 #define TWELVE  (12.0D0)
00131 #define FIFTEEN (15.0D0)
00132 #define SIXTEEN (16.0D0)
00133 #define TWENTY  (20.0D0)
00134 #define TENTH   (0.100D0)
00135 #define EIGHTH  (0.125D0)
00136 #define SIXTH   (1.000D0 / 6.000D0)
00137 #define FOURTH  (0.250D0)
00138 #define THIRD   (1.000D0 / 3.000D0)
00139 #define HALF    (0.500D0)
00140 #define TWO3RD  (2.000D0 / 3.000D0)
00141 #define PI      (3.14159265358979323846264338327950288D0)
00142 
00143 #else
00144 
00145 #error One of CH_USE_{FLOAT,DOUBLE} must be defined
00146 
00147 #endif
00148 
00149 #endif /*CH_LANG_FORT*/
00150 
00151 #endif /*CH_CONSTANTS_H*/

Generated on Wed Jun 2 13:53:32 2004 for Chombo&INSwithParticles by doxygen 1.3.2