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

iconn_amr.hpp

Go to the documentation of this file.
00001 //************************************************************************************//
00002 // Module       : iconn_amr.cpp
00003 // Date         : 8/25/03 (DLR)
00004 // Copyright    : 2003-2006 Copyright University Corporation for Atmospheric
00005 //                Research
00006 // Description  : Encapsulates the access methods and data associated with
00007 //                defining a simple (I)nterpolation-based (Conn)ectivity-type
00008 //                (AMR) method.
00009 // Derived From : GS (gather/scatter class) 
00010 // Modifications:
00011 //************************************************************************************//
00012 #if !defined(ICONN_AMR_HPP)
00013 #define ICONN_AMR_HPP
00014 
00015 #include "gtypes.h"
00016 #include <iostream.h>
00017 #include <stdlib.h>
00018 #include "gelemlist.hpp"
00019 #include "gelemindex.hpp"
00020 #include "gfieldlist.hpp"
00021 #include "vdb.hpp"
00022 #include "gtlist.hpp"
00023 #include "gttlist.hpp"
00024 #include "point.hpp"
00025 #include "glop.hpp"
00026 #include "gkeygen.hpp"
00027 #include "gs.hpp"
00028 
00029 #if 0
00030 #if !defined(GELEM_INDEX_DEF)
00031 #define GELEM_INDEX_DEF
00032 struct stElemIndex {
00033 GINT      i_elem;
00034 GIBuffer  v_indices;
00035 GIBuffer  vv_indices;
00036 GIBuffer  e_indices;
00037 };
00038 #endif
00039 #endif
00040 
00041 class IConnAMR : public GS
00042 {
00043 public:
00044                            IConnAMR();
00045                            IConnAMR(GElemList *gelems);
00046                           ~IConnAMR();
00047 
00048          void              SetGlobalDomain(Point *domain, GINT  ndomain,
00049                                            GIBuffer &igPeriodicity     ); // Set points defining global domain
00050          void              SetDoJInterp(GBOOL bInterp);                   // Do interpolations, J?
00051          void              SetDoJtInterp(GBOOL bInterp);                  // Do interpolations, Jt?
00052          void              SetDoExchange(GBOOL bExch);                    // Do data exchange?
00053          void              SetKeyGen(GKeyGen *keygen);                    // Set mortar id generator
00054          void              SetSynch(GBOOL synch);                         // Do synch of mortar endpoints?
00055          void              DoProjection(GBOOL proj);                      // Do a projection?
00056          void              DoMult(GBOOL mult);                            // Use multiplicity in projection?
00057          void              PreMask(GBOOL mask);                           // Use mask before J?
00058          void              SetElements(GElemList *elems);                 // Initialize domain decomposition
00059          GBOOL             Init();                                        // Initialize domain decomposition
00060          GBOOL             GSOp(GVecList &veclist, G_OP op);              // Carry out GS operation
00061          GBOOL             DSOp(GVecList &veclist, G_OP op, GCHandle h) {
00062                            return GSOp(veclist, op); }                    // For backward compatibility                             
00063          GBOOL             Host2Mortar(GVecList &v);                      // Apply J^T
00064          GBOOL             Mortar2Host(GVecList &v);                      // Apply J
00065          void              SetCycle(GINT icycle);
00066 
00067 protected:
00068          // Methods: 
00069          GBOOL             InitDB();                                      // Initialize DBs
00070          GBOOL             DoMortaring();                                 // Config mortars; do connectivity
00071          GBOOL             FindMortarIDs();                               // Creates mortar node ids for GlOp
00072          GBOOL             FindEdgeNeighbors(Point &v1, GINT  m1, Point &v2, GINT  m2,
00073                                              Point &mid, GINT  mm, GINT  md, 
00074                                              Point &pv1, Point &pv2, GBOOL bPeriodic[],
00075                                              GINT  hostid, GBOOL bGB, GNeighborList &eneighs);
00076          GBOOL             DoPeriodicMortars();
00077          void              ComputeMortarBdy(Point  &vj, Point &vk, GINT  jedge, GINT  mm, 
00078                                             Point &vP1, Point &vP2);
00079          GBOOL             WrapPeriodicVPoint(Point &vpt, GINT  ivert, Elem2D &elem);
00080          GBOOL             WrapPeriodicEPoint(Point &vpt, GINT  iedge, Elem2D &elem);
00081          void              RegularizeMortar(GDBuffer *xreg[], GMortar1D *mortar);
00082 
00083 
00084          // Member data
00085          GINT              nprocs_;            // number of procs
00086          GINT              nLocal_;            // number of local 'messages'
00087          GINT              maxmsg_;            // among all procs, the max msg length
00088          GINT              icycle_;            // cycle no.
00089          GNODEID           maxid_;             // max of all mortar node ids
00090          GINT              nglobDomain_;       // no. points specifying global domain
00091          GSHORT            this_rank_;         // local processor rank (id)
00092          GBOOL             bInitialized_;      // has Init completed successfully?
00093          GBOOL             bSynchMortars_;     // flag indicating whether to synch mortar endpoints
00094          GBOOL             bDoJInterp_;        // apply J matrices?
00095          GBOOL             bDoJtInterp_;       // apply  J^T matrices?
00096          GBOOL             bDoDataExch_;       // do data exchange?
00097          GBOOL             bProjection_;       // do a projection?
00098          GBOOL             bUseMult_;          // use multiplicity in projection?
00099          GBOOL             bPreMask_;          // use mask before J-application?
00100          GBOOL             bGlobalDomain_;     // has global domain been set?
00101          GDOUBLE           gdL_[GDIM];         // periodic box dimensions, if used
00102          GCHandle          hDSOp_;             // GlOp handle
00103          VDB               db_midpnt_;         // midpoint database
00104          VDB               db_vertex_;         // vertex database
00105          Point             *globDomain_;       // points defining global (rect) domain (used for bcs)
00106          GElemList         *gelems_;           // element list pointer
00107          GFieldList        *gfields_;          // field list pointer
00108          GNIDBuffer         mortarids_;        // 'flat' mortar node id array
00109          GIBuffer           bgPeriodicity_;    // global bdy faces periodicity flags
00110          GKeyGen           *keygen_;           // Morton ordering object
00111          GVector           flat_mortars_;      // 'flat' vector containing all mortar data
00112          GVector           *xm_[GDIM];         // mortar nodal points, for temp space
00113          GDBuffer          *xreg_[GDIM];       // regularized mortar nodal points, for temp space
00114          GlOp              *glop_;             // global gs operator
00115 
00116 };
00117 
00118 #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