Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

rectquad2d.hpp

Go to the documentation of this file.
00001 //************************************************************************************//
00002 // Module       : rectquad2d.hpp
00003 // Date         : 9/14/01 (DLR)
00004 // Copyright    : 2001-2006 Copyright University Corporation for Atmospheric
00005 //                Research
00006 // Description  : Encapsulates the methods and data associated with
00007 //                a single regular rectangular 2D spectral 
00008 //                element. The following is the ordering for the vertices (Vi)
00009 //                and segment midpoints (Mi):
00010 //
00011 //          V7 ________________ V6
00012 //            /|     M6       /|
00013 //       M7  / |             / |
00014 //          /  |        M5  /  |
00015 //         /M11|  M4       /   |
00016 //     V4 /____|___ ______/    | M10
00017 //        |    |         | V5  |
00018 //        |    |     M2  |     |
00019 //        | V3 |_________|_____| V2
00020 //    M8  |    /         |    /
00021 //        |   /       M9 |   /
00022 //        |  / M3        |  / M1
00023 //        | /            | /
00024 //        |______________|/
00025 //       V0       M0     V1
00026 //
00027 // [Note that in 2d, we use just the bottom plane.]
00028 //                  
00029 // Derived From : Elem2D.
00030 // Modifications:
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 //GINT           GetOrder(const GINT  idir);
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 //GMatrix       *GetBasisAtXi(GINT  i, GINT  j, GMatrix *B); // native ordering
00076 
00077 
00078 GBOOL            ComputeSpNodes();
00079 GBOOL            ComputeLaplacian();
00080 GBOOL            ComputeDealias();
00081 GBOOL            SetVertices(Point3D P[], GINT  num);
00082 //void             SetBasis(GNBasis *b1, GNBasis *b2);
00083 //void             SetBasis(GNBasis *b, GINT  idir);
00084 //void             SetOrder(GINT  iorder1, GINT  iorder2);
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 // Private methods:
00128 GBOOL             Initialize(GINT  order1, GINT  order2);
00129 void              DeleteDynamic();
00130 GBOOL             ComputeGeo();
00131 
00132 // Private data:
00133 
00134 
00135 };
00136 
00137 
00138 #endif

Generated on Wed Dec 21 16:00:48 2005 for Geophysics & Astrophysics Spectral Element Adaptive Refinement (GASpAR) 2D Code by  doxygen 1.4.4