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 __LINE2_H
00035 #define __LINE2_H
00036
00037 #include "FEShape.h"
00038
00039 namespace OFELI {
00040
00049 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00050 struct ErrorInLine2 {
00051 void Message(const char *file, size_t line, int code, int p1) const;
00052 };
00053 #endif
00054
00065 class Line2 : public FEShape
00066 {
00067
00068 public :
00069
00071 Line2();
00072
00074 Line2(const Element *el);
00075
00077 Line2(const Side *side);
00078
00080 ~Line2()
00081 {
00082 #ifdef _OFELI_DEBUG
00083 std::clog << "An instance of class Line2 is destructed.\n";
00084 std::clog << "File : " << __FILE__ << ", Line : " << __LINE__ << endl;
00085 #endif
00086 }
00087
00095 double check() const;
00096
00098 double getLength() const { return _length; }
00099
00101 Point<double> getNormal() const;
00102
00104 Point<double> getTangent() const;
00105
00110 double Sh(size_t i, double s) const;
00111
00112 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00115 double Sh(size_t i, Point<double> s) const { return Sh(i,s.x); }
00116 #endif
00117
00120 double DSh(size_t i) const;
00121
00124 Point<double> getRefCoord(const Point<double> &x);
00125
00127 bool isIn(const Point<double> &x);
00128
00133 double getInterpolate(const Point<double> &x, const LocalVect<double,2> &v);
00134
00135 private :
00136 double _length;
00137 const Element *_el;
00138 const Side *_sd;
00139 ErrorInLine2 _e;
00140 };
00141
00142 }
00143
00144 #endif