Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

DistributedDOFMap.h

Go to the documentation of this file.
00001 #ifndef DISTRIBUTEDDOFMAP_H
00002 #define DISTRIBUTEDDOFMAP_H
00003 
00004 #include "SundanceDefs.h"
00005 #include "DOFMapBase.h"
00006 #include "CellSetFunctionList.h"
00007 
00008 
00009 namespace Sundance
00010 {
00011 
00012   using namespace TSF;
00013   using std::string;
00014 
00015   using std::ostream;
00016 
00017   /** \ingroup LowLevelFE
00018    * Map from (cell, function) to global DOF index
00019    */
00020 
00021   class DistributedDOFMap : public DOFMapBase
00022     {
00023     public:
00024       /** */
00025       DistributedDOFMap(const Mesh& mesh, int nFunc,
00026                         const TSFArray<TSFArray<TSFSmartPtr<CellSetFunctionList> > >& cellSetTables);
00027       /** */
00028       DistributedDOFMap(const Mesh& mesh, const BasisFamily& basis);
00029 
00030       /** */
00031       virtual ~DistributedDOFMap(){;}
00032 
00033       /** */
00034       virtual const TSFArray<int>& lookup(int cellDim, int cellIndex,
00035                                           int funcID) const
00036         {return map_[cellDim][cellIndex][funcID];}
00037 
00038       /** */
00039       virtual void guaranteedLookup(int cellDim, int cellIndex,
00040                                     int funcID, const BasisFamily& basis,
00041                                     TSFArray<int>& indices) const ;
00042 
00043       /** */
00044       virtual int guaranteedPointLookup(int cellIndex, int funcID) const ;
00045 
00046       /** */
00047       int numberOfGlobalDOFs() const {return nGlobalDOFs_;}
00048       /** */
00049       int numberOfLocalDOFs() const {return nLocalDOFs_;}
00050       /** */
00051       int numberOfRemoteDOFs() const {return nRemoteDOFs_;}
00052       /** */
00053       int highestLocalDOF() const {return highestLocalDOF_;}
00054       /** */
00055       int lowestLocalDOF() const {return lowestLocalDOF_;}
00056 
00057       /** */
00058       const TSFSmartPtr<TSFArray<int> >& remoteDOFList() const {return remoteDOFList_;}
00059       /** */
00060       const TSFSmartPtr<TSFArray<int> >& updateList() const {return updateList_;}
00061 
00062       /** */
00063       const Mesh& mesh() const {return mesh_;}
00064 
00065       /** */
00066       virtual void getCellTypes(TSFNonDupArray<CellTopologyCode>& cellTypes) const
00067         {cellTypes = cellTypes_;}
00068 
00069       virtual void print() const ;
00070 
00071       virtual int maxCellDimension() const {return maxCellDimension_;}
00072 
00073       static bool& verboseMapConstruction() {static bool rtn=false; return rtn;}
00074 
00075     private:
00076       // map_[cellDim][cellIndex][funcID][localIndex]
00077       TSFArray<TSFArray<TSFArray<TSFArray<int> > > > map_;
00078       TSFArray<TSFArray<bool> > cellTag_;
00079       TSFNonDupArray<CellTopologyCode> cellTypes_;
00080       int maxCellDimension_;
00081 
00082 
00083 
00084       static TSFTimer& mapAssemblyTimer();
00085     };
00086 
00087 
00088 }
00089 #endif

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by