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