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

dd_rect.hpp

Go to the documentation of this file.
00001 //************************************************************************************
00002 // Module       : dd_rect.hpp
00003 // Date         : 7/17/02 (DLR)
00004 // Copyright    : 2002-2006 Copyright University Corporation for Atmospheric
00005 //                Research
00006 // Description  : Encapsulates the methods and data associated with
00007 //                the object that decomposes a general 2d (3d) rectangular
00008 //                (cubic) domain into a specified number of elements in each
00009 //                coordinate direction.
00010 // Derived From : none.
00011 // Modifications:
00012 //************************************************************************************
00013 #if !defined(DD_RECT_HPP)
00014 #define DD_RECT_HPP 
00015 #include "gtypes.h"
00016 #include "point.hpp"
00017 
00018 class DD_Rect
00019 {
00020 public:
00021                          DD_Rect();
00022                          DD_Rect(GFLOAT *X0, GFLOAT *X1, GINT    n);
00023 //                       DD_Rect(const DD_Rect &);
00024                          ~DD_Rect();
00025          GBOOL           DoPart();                                                    // Do the partitioning
00026          void            SetDomain(GFLOAT *X0, GFLOAT *X1, GINT    n);
00027          void            SetPartSize(GINT    Nx, GINT    Ny, GINT    Nz=0);
00028          void            SetElemDescretization(GLONG Nx, GLONG Ny, GLONG Nz=0);
00029          GBOOL           SetBoundaryCond(GFLOAT *P0, GFLOAT *P1, GINT    n, BDYTYPE btype);  
00030          GBOOL           SetCorners(GINT    n, BDYTYPE btype);                       // Set bdy cond on corner nodes 
00031          GBOOL           ResetPeriodic();                                            // Relabels periodic nodes
00032          GINT            NumVertices() ;
00033          GINT            **GetNeighborList();
00034          GINT            *GetNeighborNum();
00035          GLONG           **GetNodeIDs();
00036          GLONG           *GetNodeNum();
00037          GLONG           GetNodeDynRange();
00038          GFLOAT          *GetGraphVertexCoords(GINT    idir);
00039          void            **GetDualVertexCoords ();
00040          GLONG           **GetBdyNodeIndices();
00041          GLONG           *GetBdyNodeNum();
00042          BDYTYPE         **GetBdyCond();
00043          GINT            **GetbBdy();
00044          Point3D         *GetDomainVertices();
00045          GINT             GetNumDomainVertices();
00046 
00047 
00048 private:
00049 //    methods:
00050          GBOOL             DoPart1D();                                                       // Do the  1d partitioning
00051          GBOOL             DoPart2D();                                                       // Do the 2d partitioning
00052          GBOOL             DoPart3D();                                                       // Do the 3d partitioning
00053          void              DoPeriodic(GINT    idir, GBOOL bval);
00054          void              DeleteDynamic();                                                  // Delete all dynamic quantities
00055          GBOOL             CreateDynamic();                                                  // Create all dynamic quantities
00056          GBOOL             Set1dBdyCond(GFLOAT *P0, GFLOAT *P1, GINT    n, BDYTYPE btype);   // Set bcs for 1d problem
00057          GBOOL             Set2dBdyCond(GFLOAT *P0, GFLOAT *P1, GINT    n, BDYTYPE btype);   // Set bcs for 2d problem
00058          GBOOL             Set3dBdyCond(GFLOAT *P0, GFLOAT *P1, GINT    n, BDYTYPE btype);   // Set bcs for 3d problem
00059          GBOOL             bCornerNode(GINT    node, GINT    &ivertex);                      // Is node a corner node?
00060 
00061 //    data:
00062          GBOOL           bPartitioned;       // Has partitition been done?
00063          GBOOL           bPeriodic[3];       // Periodicity flag--adjusts node_ids for periodic bc's
00064          GINT            nd;                 // Number of spatial dimensions
00065          GINT            nv;                 // Number of graph vertices 
00066          GINT            NE[3];              // Number of elements in the x-, y-, and z-dir
00067          GLONG           NN[3];              // Number of nodes/descretization in the x-, y-, and z-dir
00068          GLONG           node_dyn_range;     // Dynamic range for node ids
00069          GFLOAT          P0[3];              // Position of lower left corner
00070          GFLOAT          P1[3];              // Position of diagonal right corner
00071          GINT            **neighbors;        // Neighbor list; one list for each graph  vertex       
00072          GINT            *nne;               // Number of negibors for each graph  vertex       
00073          GLONG           *nno;               // Number of nodes for each graph  vertex       
00074          GLONG           *bnno;              // Number of bdy nodes for each graph  vertex       
00075          GLONG           **node_ids;         // Node id's; a set for each vertex
00076          GLONG           **bdy_node_indices; // Boundary node id's; an index set for each vertex points to node_ids elements
00077          GLONG           **bdy_ids;          // For each boundary node id, tells which bdy it lies on (0-3)
00078          GINT            ncorner_ids;        // Number of bdy nodes that are duplicated
00079          GLONG           *lcorner_ids;       // Local corner bdy node indices 
00080          GLONG           *gcorner_ids;       // Global corner bdy node indices 
00081          GINT            *ivert;             // Dual vert. index corresp. to corner bdy nodes
00082          BDYTYPE         **bcs;              // Boundary condition for each of the boundary nodes
00083          GINT            **bdyn;             // Is bdy global bdy?
00084          GFLOAT          **graph_coords;     // Graph vertex coordinate lists; one coord of length nv for each direction
00085          GFLOAT          **dual_coords1 ;    // Dual coordinate list; one list for each vertex       
00086          Point3D         **dual_coords2 ;    // Dual coordinate list; one list for each vertex       
00087          Point3D         **dual_coords3 ;    // Dual coordinate list; one list for each vertex       
00088          Point3D          *pV;               // Vertices of global domain
00089 
00090 };
00091 
00092 #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