00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #if !defined(G_MORTAR1D_HPP)
00015 #define G_MORTAR1D_HPP
00016
00017 #include "gtypes.h"
00018 #include "gnbasis.hpp"
00019 #include "gtvector.hpp"
00020 #include "gtmatrix.hpp"
00021 #include "gtbuffer.hpp"
00022 #include "elem2d.hpp"
00023 #include "point.hpp"
00024
00025 class Elem2D;
00026 class GMortar1D
00027 {
00028 public:
00029 GMatrix *IH2M_;
00030 GMatrix *IM2H_;
00031
00032 GMortar1D(GNBasis *b=NULL);
00033 ~GMortar1D();
00034
00035 void SetBasis(GNBasis *b);
00036 void SetBdyPoints(Point3D &p_orig, Point3D &p_end);
00037 void SetNodeIDs(GINT n, GINT *ids);
00038 void SetHostGrid(GVector **xhost, GINT nc,
00039 GINT *indices, GINT ni);
00040 GNBasis *GetBasis();
00041 Point3D *GetBdyPoints(GINT &nbdy);
00042 GVector *GetNodeIDs();
00043 GVector *GetSpGrid(GINT idir);
00044 GVector *GetArcPoints();
00045 GVector *GetMortarField();
00046 void Mortar2Host(GVector *uout, GINT *indices, GINT ni,
00047 GINT istart, GBOOL bAdd=FALSE);
00048 void Mortar2Host(GDOUBLE *uout, GINT nu, GINT *indices, GINT ni,
00049 GINT istart, GBOOL bAdd=FALSE);
00050 void Host2Mortar(Elem2D *ehost, GVector *uhost, GINT &istart, GINT &iend);
00051
00052 void Host2Mortar(GVector *uin, GINT *indices, GINT ni, GINT istart);
00053 void Host2Mortar(GDOUBLE *uin, GINT nu, GINT *indices, GINT ni, GINT istart);
00054
00055 GBOOL &isConforming();
00056
00057 private:
00058
00059 void DeleteDynamic();
00060 void Resize(GINT newN);
00061
00062
00063 GINT nBdy_;
00064 GINT NN_;
00065 GINT istart_;
00066 GINT *iorder_;
00067 GBOOL bConforming_;
00068 GBOOL bHostGrid_;
00069 GQUAD len_;
00070 GQUAD ilen_;
00071 GQUAD smin_;
00072 GQUAD smax_;
00073 GDOUBLE *xBdy_[GDIM];
00074 Point3D *pBdy_;
00075 GIBuffer *node_ids_;
00076 GNBasis *mtr_basis_;
00077 GNBasis *hst_basis_;
00078 GVector *u_mtr_;
00079 GVector *u_mtr1_;
00080 GVector *xi_mtr_;
00081 GVector *s_mtr_;
00082 GVector *x_mtr_[GDIM];
00083 GVector *u_hst_;
00084 GVector *xi_hst_;
00085 GVector *x_hst_[GDIM];
00086 };
00087
00088 #endif