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
00035 #ifndef __LAPLACE_2DT3_H
00036 #define __LAPLACE_2DT3_H
00037
00038 #include "Equa_Laplace.h"
00039 #include "Assembly.h"
00040 #include "UserData.h"
00041 #include "Triang3.h"
00042 #include "Line2.h"
00043
00044 namespace OFELI {
00045
00057 class Laplace2DT3 : virtual public Equa_Laplace<double,3,3,2,2> {
00058
00059 public :
00060
00068 Laplace2DT3(Mesh &ms, SpMatrix<double> &A, Vect<double> &b);
00069
00071 Laplace2DT3(Element *el);
00072
00074 Laplace2DT3(Side *sd);
00075
00077 ~Laplace2DT3()
00078 {
00079 if (_tr)
00080 delete _tr;
00081 if (_ln)
00082 delete _ln;
00083 #ifdef _OFELI_DEBUG
00084 std::clog << "An instance of class Laplace2DT3 is destructed.\n";
00085 std::clog << "File : " << __FILE__ << ", Line : " << __LINE__ << endl;
00086 #endif
00087 }
00088
00091 void LHS(double coef=1.);
00092
00095 void BodyRHS(const Vect<double> &f);
00096
00099 void BoundaryRHS(const Vect<double> &h);
00100
00106 void setDiffusivity(const LocalMatrix<double,2,2> &K);
00107
00112 void setSource(const Vect<double> &f);
00113
00118 void build();
00119
00124 void Post(const Vect<double> &u, Vect<Point<double> > &p);
00125
00134 int solve(Vect<double> &u);
00135
00136 private :
00137
00138 Triang3 *_tr;
00139 Line2 *_ln;
00140 LocalMatrix<double,2,2> _K;
00141 void ElementSet(const Element *el);
00142 };
00143
00144 }
00145
00146 #endif