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

field2d.hpp

Go to the documentation of this file.
00001 //************************************************************************************//
00002 // Module       : field2d.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 2D spectral element field
00008 // Derived From : none.
00009 // Modifications:
00010 //************************************************************************************//
00011 #if !defined(FIELD2D_HPP)
00012 #define FIELD2D_HPP
00013 #include "elem2d.hpp"
00014 #include "siforcelist.hpp"
00015 #include "gmemmgr.hpp"
00016 
00017 class Field2D 
00018 {
00019 public:
00020                   Field2D(GINT  Num_TimeLevels, Elem2D *e, GSHORT ntmp=2);
00021                  ~Field2D();
00022 void              operator=(Field2D &);
00023 void              operator=(GVector &);
00024 void              operator=(GDOUBLE a);
00025                    
00026 GBOOL             ResetOrder(const GSHORT  n1, const GSHORT  n2);      // Reset exp. order; re-interp all time levels
00027 GBOOL             SetExpCoeffs (const GINT  iLevel,  GVector *);       // Set expansion coeffs for specified time level
00028 GBOOL             SetExpCoeffs (GVector *);                            // Set expansion coeffs for 0-level; rotate others
00029 void              SetTimeLevel(GINT ilevel);                           // Set time level for gets
00030 void              ShiftLevels ();                                      // Shift time levels of exp coeffs
00031 SIForceList       *GetSIForceList();                                   // Get state-indep force list for field element
00032 GINT              GetNumTimeLevels();                                  // How many time levels being stored?
00033 GVector           *GetExpCoeffs (const GINT  iLevel);                  // Get expansion coeffs for specified time level
00034 GVector           **GetExpCoeffs ();                                   // Get expansion coeffs for all time levels 
00035 GDOUBLE           GetTime(const GINT  iLevel);                         // Get evolution time at specified time level
00036 void              SetTime(const GINT  iLevel, GDOUBLE t);              // Set evolution time corresp to specified time level
00037 GVector           *GetTemp();                                          // Get temp space vector
00038 GVector           *GetTemp(GSHORT i);                                  // Get specified temp space vector
00039 GMemMgr           *GetTempMgr();                                       // Get temp vector mgr
00040 GBOOL             TempLock(GVector *vec);                              // Lock temp vector
00041 GBOOL             TempUnlock(GVector *vec);                            // Unlock temp vector
00042 Elem2D            *GetElement  ();                                     // Get element
00043 GVector           *GetBdyValues();                                     // Get bc info from (current) field
00044 
00045 GDOUBLE           Interp(const GSHORT  iLevel, const GDOUBLE x, const GDOUBLE y);
00046 
00047 GBOOL             Map2NewCoords(GVector *newX, GVector *newY, GIBuffer  *inew, GVector *newU,
00048                                 const GINT  iLevel, GIBuffer  *iremap);  
00049                                                                        // Map from current elem to specified coords
00050 GBOOL             Map2NewElem(Elem2D *newElement,  GVector *U[],
00051                                const GINT  nU, GIBuffer  *iremap);     // Map from current elem to specified element
00052 GDOUBLE           ComputeUL2  (const GINT );                           // L-2 norm for u^2  
00053 GDOUBLE           ComputeDUL2 (const GINT );                           // L-2 norm for Du/Dx
00054 GDOUBLE           &operator    ()(const GSHORT  nLevel, const GLONG i);// Field member index value at time level n
00055            friend ostream& operator<<(ostream&, Field2D &);            // Output stream operator
00056 
00057 
00058 
00059 private:
00060 
00061 // Private methods:
00062 GBOOL             Resize(GINT , GINT );                                // Resize dynamically allocated quantities
00063 void              DeleteDynamic();                                     // Delete dynamically allocated quantities
00064 
00065 // Private data:
00066 GINT             Np1;              // 1-expansion order
00067 GINT             Np2;              // 2-expansion order
00068 GINT             NN1;              // No. 1-expansion nodes 
00069 GINT             NN2;              // No. 2-expansion nodes 
00070 GINT             iTot;             // Total no. expansion nodes
00071 GINT             nTimeLevels;      // Number of time levels retained
00072 GINT             iTimeLevel;       // Which time level to get/set, where appropriate
00073 GBOOL            bInitialized;     // Has field been initialized?
00074 GDOUBLE          *time;            // Time at time level n, n-1, n-2...
00075 GNBasis          *basis1;          // 1-basis
00076 GNBasis          *basis2;          // 2-basis
00077 Elem2D           *elem;            // Associated element
00078 SIForceList      *flist_ ;         // State-independent force list
00079 GVector          **Un;             // Coeffs at time step n, n-1, n-2,...nTimeLevels (that at index nTimeLevels is temp space)
00080 GVector          *u_bdy_;          // Bdy values
00081 GMemMgr          *vtmpmgr_;        // temp-mem mgr
00082 
00083 
00084 };
00085 
00086 #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