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 #ifdef CH_LANG_CC
00002 /*   _______              __
00003     / ___/ /  ___  __ _  / /  ___
00004    / /__/ _ \/ _ \/  V \/ _ \/ _ \
00005    \___/_//_/\___/_/_/_/_.__/\___/
00006 */
00007 // CHOMBO Copyright (c) 2000-2004, The Regents of the University of
00008 // California, through Lawrence Berkeley National Laboratory (subject to
00009 // receipt of any required approvals from U.S. Dept. of Energy).  All
00010 // rights reserved.
00011 //
00012 // Redistribution and use in source and binary forms, with or without
00013 // modification, are permitted provided that the following conditions are met:
00014 //
00015 // (1) Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 // (2) Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 // (3) Neither the name of Lawrence Berkeley National Laboratory, U.S.
00021 // Dept. of Energy nor the names of its contributors may be used to endorse
00022 // or promote products derived from this software without specific prior
00023 // written permission.
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00026 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
00027 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00028 // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
00029 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // You are under no obligation whatsoever to provide any bug fixes,
00038 // patches, or upgrades to the features, functionality or performance of
00039 // the source code ("Enhancements") to anyone; however, if you choose to
00040 // make your Enhancements available either publicly, or directly to
00041 // Lawrence Berkeley National Laboratory, without imposing a separate
00042 // written license agreement for such Enhancements, then you hereby grant
00043 // the following license: a non-exclusive, royalty-free perpetual license
00044 // to install, use, modify, prepare derivative works, incorporate into
00045 // other computer software, distribute, and sublicense such Enhancements or
00046 // derivative works thereof, in binary and source code form.
00047 //
00048 // TRADEMARKS. Product and company names mentioned herein may be the
00049 // trademarks of their respective owners.  Any rights not expressly granted
00050 // herein are reserved.
00051 //
00052 #endif
00053 
00054 #ifndef _CONSTANTS_H_
00055 #define _CONSTANTS_H_
00056 
00057 #if defined(CH_LANG_FORT) || defined(CH_CRAY)
00058 
00059 /* use single-precision constants on the T3E regardless of whether
00060  * USE_FLOAT or USE_DOUBLE is defined
00061 */
00062 #if defined(CH_USE_FLOAT)
00063 
00064 #define zero     (0.0e0)
00065 #define one      (1.0e0)
00066 #define two      (2.0e0)
00067 #define three    (3.0e0)
00068 #define four     (4.0e0)
00069 #define five     (5.0e0)
00070 #define six      (6.0e0)
00071 #define seven    (7.0e0)
00072 #define eight    (8.0e0)
00073 #define nine     (9.0e0)
00074 #define ten     (10.0e0)
00075 #define twelve  (12.0e0)
00076 #define fifteen (15.0e0)
00077 #define sixteen (16.0e0)
00078 #define twenty  (20.0e0)
00079 #define tenth   (0.100e0)
00080 #define eighth  (0.125e0)
00081 #define sixth   (1.000e0 /  6.000e0)
00082 #define fourth  (0.250e0)
00083 #define third   (1.000e0 /  3.000e0)
00084 #define half    (0.500e0)
00085 #define two3rd  (2.000e0 /  3.000e0)
00086 #define Pi      (3.14159265358979323846e0)
00087 
00088 #define ZERO     (0.0E0)
00089 #define ONE      (1.0E0)
00090 #define TWO      (2.0E0)
00091 #define THREE    (3.0E0)
00092 #define FOUR     (4.0E0)
00093 #define FIVE     (5.0E0)
00094 #define SIX      (6.0E0)
00095 #define SEVEN    (7.0E0)
00096 #define EIGHT    (8.0E0)
00097 #define NINE     (9.0E0)
00098 #define TEN     (10.0E0)
00099 #define TWELVE  (12.0E0)
00100 #define FIFTEEN (15.0E0)
00101 #define SIXTEEN (16.0E0)
00102 #define TWENTY  (20.0E0)
00103 #define TENTH   (0.100E0)
00104 #define EIGHTH  (0.125E0)
00105 #define SIXTH   (1.000E0 / 6.000E0)
00106 #define FOURTH  (0.250E0)
00107 #define THIRD   (1.000E0 / 3.000E0)
00108 #define HALF    (0.500E0)
00109 #define TWO3RD  (2.000E0 / 3.000E0)
00110 #define PI      (3.14159265358979323846E0)
00111 
00112 #elif defined(CH_USE_DOUBLE)
00113 
00114 #define zero     (0.0d0)
00115 #define one      (1.0d0)
00116 #define two      (2.0d0)
00117 #define three    (3.0d0)
00118 #define four     (4.0d0)
00119 #define five     (5.0d0)
00120 #define six      (6.0d0)
00121 #define seven    (7.0d0)
00122 #define eight    (8.0d0)
00123 #define nine     (9.0d0)
00124 #define ten     (10.0d0)
00125 #define twelve  (12.0d0)
00126 #define fifteen (15.0d0)
00127 #define sixteen (16.0d0)
00128 #define twenty  (20.0d0)
00129 #define tenth   (0.100d0)
00130 #define eighth  (0.125d0)
00131 #define sixth   (1.000d0 / 6.000d0)
00132 #define fourth  (0.250d0)
00133 #define third   (1.000d0 / 3.000d0)
00134 #define half    (0.500d0)
00135 #define two3rd  (2.000d0 / 3.000d0)
00136 #define Pi      (3.14159265358979323846264338327950288d0)
00137 
00138 #define ZERO    (0.0D0)
00139 #define ONE     (1.0D0)
00140 #define TWO     (2.0D0)
00141 #define THREE   (3.0D0)
00142 #define FOUR    (4.0D0)
00143 #define FIVE    (5.0D0)
00144 #define SIX     (6.0D0)
00145 #define SEVEN   (7.0D0)
00146 #define EIGHT   (8.0D0)
00147 #define NINE    (9.0D0)
00148 #define TEN     (10.0D0)
00149 #define TWELVE  (12.0D0)
00150 #define FIFTEEN (15.0D0)
00151 #define SIXTEEN (16.0D0)
00152 #define TWENTY  (20.0D0)
00153 #define TENTH   (0.100D0)
00154 #define EIGHTH  (0.125D0)
00155 #define SIXTH   (1.000D0 / 6.000D0)
00156 #define FOURTH  (0.250D0)
00157 #define THIRD   (1.000D0 / 3.000D0)
00158 #define HALF    (0.500D0)
00159 #define TWO3RD  (2.000D0 / 3.000D0)
00160 #define PI      (3.14159265358979323846264338327950288D0)
00161 
00162 #else
00163 
00164 #error One of CH_USE_{FLOAT,DOUBLE} must be defined
00165 
00166 #endif
00167 
00168 #endif /*CH_LANG_FORT*/
00169 
00170 #endif /*CH_CONSTANTS_H*/

Generated on Wed Jan 19 17:51:23 2005 for Chombo&INSwithParticles by doxygen1.2.16