00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __TETRA4_H
00035 #define __TETRA4_H
00036
00037 #include <math.h>
00038 #include <float.h>
00039 #include <stdlib.h>
00040 #include <assert.h>
00041
00042 #include "OFELI_Config.h"
00043 #include "FEShape.h"
00044 #include "LocalMatrix.h"
00045
00046
00047 namespace OFELI {
00048
00053 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00054 struct ErrorInTetra4 {
00055 void Message(const char *file, size_t line, int code, int p1) const;
00056 };
00057 #endif
00058
00068 class Tetra4 : public FEShape
00069 {
00070
00071 public :
00072
00074 Tetra4();
00075
00077 Tetra4(const Element *element);
00078
00080 ~Tetra4()
00081 {
00082 #ifdef _OFELI_DEBUG
00083 std::clog << "An instance of class Tetra4 is constructed.\n";
00084 std::clog << "File : " << __FILE__ << ", Line : " << __LINE__ << endl;
00085 #endif
00086 }
00087
00090 double Sh(size_t i, Point<double> s) const;
00091
00094 Point<double> DSh(size_t i) const { return _dsh[i-1]; }
00095
00097 double getVolume() const { return OFELI_SIXTH*_det; }
00098
00100 double getMaxEdgeLength() const;
00101
00103 double getMinEdgeLength() const;
00104
00106 Point<double> getRefCoord(const Point<double> &x) const;
00107
00109 bool isIn(const Point<double> &x);
00110
00112 double getInterpolate(const Point<double> &x, const LocalVect<double,4> &v);
00113
00121 double check() const;
00122
00123 private :
00124
00125 void CalculateShape();
00126 const Element *_el;
00127 ErrorInTetra4 _e;
00128 };
00129
00130 }
00131
00132 #endif