basics.hGo to the documentation of this file.00001 00002 // $Revision: 1.2 $ 00003 // $Date: 2004/06/01 21:19:12 $ 00004 // $Source: /usr/local/cvs/OpenSees/SRC/nDarray/basics.h,v $ 00005 00006 //############################################################################# 00007 // # 00008 // # 00009 // /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/~~\ # 00010 // | |____| # 00011 // | | # 00012 // | | # 00013 // | | # 00014 // | | # 00015 // | B A S E C L A S S E S | # 00016 // | | # 00017 // | | # 00018 // | | # 00019 // | | # 00020 // | C + + H E A D E R | # 00021 // | | # 00022 // | | # 00023 // | | # 00024 // | | # 00025 // /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/ | # 00026 // \_________________________________________\__/ # 00027 // # 00028 // # 00029 //############################################################################# 00030 //############################################################################# 00031 //## 00033 //################################################################################ 00034 //# COPY-YES (C): :-)) # 00035 //# PROJECT: Object Oriented Finite Element Program # 00036 //# PURPOSE: # 00037 //# CLASS: # 00038 //# # 00039 //# VERSION: # 00040 //# LANGUAGE: C++.ver >= 2.0 ( Borland C++ ver=3.10, SUN C++ ver=2.1 ) # 00041 //# TARGET OS: DOS || UNIX || . . . # 00042 //# DESIGNER(S): Boris Jeremic # 00043 //# PROGRAMMER(S): Boris Jeremic # 00044 //# # # 00045 //# DATE: November '92 # 00046 //# UPDATE HISTORY: 05 - __ avgust '93. redefined as derived class from # 00047 //# nDarray class # 00048 //# january 06 '93 added matrix2BJtensor_1, matrix2BJtensor_2 # 00049 //# matrix2BJtensor_3 # 00050 //# August 22-29 '94 choped to separate files and worked on # 00051 //# const and & issues # 00052 //# August 30-31 '94 added use_def_dim to full the CC # 00053 //# resolved problem with temoraries for # 00054 //# operators + and - ( +=, -= ) # 00055 //# # 00056 //################################################################################ 00057 //*/ 00058 #ifndef BASICS_HH 00059 #define BASICS_HH 00060 00061 #include <math.h> 00062 //#include <values.h> 00063 #include <stdio.h> 00064 #include <stdlib.h> 00065 #include <string.h> 00066 #include <stdarg.h> 00067 #include <time.h> 00068 00069 00070 // Define BJmatrix as matrix type 00071 #ifndef matrix 00072 #define matrix BJmatrix 00073 #endif 00074 // Define BJvector as vector type 00075 #ifndef vector 00076 #define vector BJvector 00077 #endif 00078 // Define BJtensor as tensor type 00079 #ifndef tensor 00080 #define tensor BJtensor 00081 #endif 00082 00083 #ifndef tensor 00084 #define Tensor BJtensor 00085 #endif 00086 00087 // redefine Pi from math.h M_PI 00088 #ifndef PI 00089 #define PI 3.14159265358979323846 00090 #endif 00091 //############################################################################## 00092 #ifndef TWOOVERTHREE 00093 #define TWOOVERTHREE 0.6666666666667 00094 #endif 00095 //############################################################################## 00096 #ifndef ONEOVERTHREE 00097 #define ONEOVERTHREE 0.3333333333333 00098 #endif 00099 //############################################################################## 00100 //############################################################################## 00101 // usefull arrays for constructors . . . 00102 //#ifdef SASA 00103 static const int def_dim_4_2[]={2,2,2,2}; // Sasa jan - 99 00104 //#endif 00105 00106 #ifndef DEF_DIM 00107 #define DEF_DIM 00108 static const int def_dim_1[] = {3}; 00109 static const int def_dim_2[] = {3, 3}; // static-> see ARM pp289-290 00110 static const int def_dim_3[] = {3, 3, 3}; // static-> see ARM pp289-290 00111 static const int def_dim_4[] = {3, 3, 3, 3}; // static-> see ARM pp289-290 00112 00113 // Cosserat 00114 static const int Cosserat_def_dim_2[] = {6, 6}; // static-> see ARM pp289-290 00115 static const int Cosserat_def_dim_4[] = {6, 6, 6, 6}; // static-> see ARM pp289-290 00116 00117 #endif 00118 00119 #ifndef TEST 00120 #define TEST 00121 const int tst = 3; 00122 #endif 00123 00124 00125 #ifndef DZERO 00126 #define DZERO 0.0 00127 // double ZERO = 0.0; 00128 #endif 00129 00130 float f_macheps(); 00131 double d_macheps(); 00132 long double ld_macheps(); 00133 00134 //double min(double , double ); 00135 //double max(double , double ); 00136 // 00137 //int min(int , int ); 00138 //int max(int , int ); 00139 00140 #endif 00141 |