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 #if !defined(DEFQUAD2D_HPP)
00034 #define DEFQUAD2D_HPP
00035 #include "elem2d.hpp"
00036
00037 class DefQuad2D : public Elem2D
00038 {
00039 public:
00040 DefQuad2D(GSHORT ntmp=2);
00041 DefQuad2D(GINT n1, GINT n2, GSHORT ntmp=2 );
00042 DefQuad2D(GNBasis *b1, GNBasis *b2, GSHORT ntmp=2 );
00043 ~DefQuad2D();
00044 void operator=(const DefQuad2D &);
00045
00046
00047 GDOUBLE Integrate(GVector *v, GDOUBLE *multiplicity=NULL);
00048 GDOUBLE PIntegrate(GVector *v, GDOUBLE *multiplicity=NULL);
00049 GBOOL Differentiate(GVector *dv, GVector *v, GINT idir);
00050 GBOOL DifferentiateWithMass(GVector *dv, GVector *v, GVector* tmp, GINT idir);
00051 GBOOL DifferentiateWeak(GVector *dv, GVector *v,GVector* tmp, GINT idir);
00052 GBOOL Assemble();
00053 GNBasis *GetBasisObj(GINT idir);
00054 GVector *GetXiNodes(GINT idir);
00055 GVector *Get1DWeights(GINT idir);
00056 GMatrix *Get1DDerivMatrix(GINT idir, GBOOL bTranspose);
00057 GMatrix *Get1DStiffMatrix(GINT idir, GBOOL bTranspose);
00058 GMatrix *Get1DDerivMatrixWithMass(GINT idir, GBOOL bTranspose);
00059 GMatrix *Get1DDerivMatrixWeak(GINT idir, GBOOL bTranspose);
00060 GVector *Get2DWeights();
00061 GVector *GetJacobian();
00062 GVector *GetMassMatrix();
00063 GVector *GetiMass();
00064 GVector *GetgMass();
00065 #if 0
00066 GDOUBLE &TensorD1(GINT i, GINT j);
00067 GDOUBLE &TensorD2(GINT i, GINT j);
00068 #endif
00069 GVector *GetSpNodes(GINT idir);
00070 GVector *GetdXidX(GVector **, GINT );
00071 GVector *GetdXidX (const GINT i, const GINT j );
00072 GVector *GetMetric (const GINT i, const GINT j );
00073 GVector *GetWJMetric(const GINT i, const GINT j );
00074 GMatrix *GetInterpOp(GINT idir, GBOOL Transpose);
00075 GMatrix *GetInterpDeriv(GINT idir, GBOOL Transpose);
00076
00077
00078 GBOOL XToXi(Point3D pX[], Point3D pXi[], const GINT n);
00079
00080
00081
00082 GBOOL ComputeSpNodes();
00083 GBOOL ComputeLaplacian();
00084 GBOOL SetVertices(Point3D P[], GINT num);
00085
00086
00087
00088 void SetInterpBasis(GNBasis *b1, GNBasis *b2);
00089 GBOOL Resize(GINT order1, GINT order2);
00090 GINT SolveFE();
00091
00092
00093 protected:
00094
00095 GDOUBLE fRet;
00096 GVector *xiNodes1;
00097 GVector *xiNodes2;
00098 GVector *Weights1;
00099 GVector *Weights2;
00100 GVector *Weights2D;
00101 GVector *MassMatrix;
00102 GVector *gMassMatrix;
00103 GVector *iMassMatrix;
00104 GMatrix *StiffMat1;
00105 GMatrix *StiffMat2;
00106 GMatrix *StiffMat1T;
00107 GMatrix *StiffMat2T;
00108 GMatrix *D1;
00109 GMatrix *D2;
00110 GMatrix *D1T;
00111 GMatrix *D2T;
00112 GMatrix *opInterp1;
00113 GMatrix *opInterp2;
00114 GMatrix *opInterpT1;
00115 GMatrix *opInterpT2;
00116 GMatrix *dInterp1;
00117 GMatrix *dInterp2;
00118 GMatrix *dInterpT1;
00119 GMatrix *dInterpT2;
00120 GVector *Jac;
00121 GVector *d11;
00122 GVector *d12;
00123 GVector *d21;
00124 GVector *d22;
00125 GVector *g11;
00126 GVector *g12;
00127 GVector *g22;
00128 GVector *gWJ11;
00129 GVector *gWJ12;
00130 GVector *gWJ22;
00131 GDOUBLE *xi1p;
00132 GDOUBLE *xi1m;
00133 GDOUBLE *xi2p;
00134 GDOUBLE *xi2m;
00135
00136 private:
00137
00138
00139 GBOOL Initialize(GINT order1, GINT order2);
00140 void DeleteDynamic();
00141 GBOOL ComputeGeo();
00142
00143
00144
00145
00146 };
00147
00148
00149 #endif