00001 #ifndef POINTREFERENCECELL_H 00002 #define POINTREFERENCECELL_H 00003 00004 #include "SundanceDefs.h" 00005 00006 #include "AffineReferenceCell.h" 00007 #include "ReferenceCell.h" 00008 00009 00010 namespace Sundance 00011 { 00012 00013 using namespace TSF; 00014 using std::string; 00015 00016 using std::ostream; 00017 00018 /** 00019 * \ingroup LowLevelGeometry 00020 * Reference cell for points 00021 */ 00022 00023 class PointReferenceCell : public AffineReferenceCell 00024 { 00025 public: 00026 /** */ 00027 PointReferenceCell(); 00028 virtual ~PointReferenceCell() {;} 00029 00030 // --------------- introspection methods --------------------------- 00031 00032 virtual const string& typeName() const {return typeName_;} 00033 virtual CellTopologyCode topologyCode() const {return PointCell;} 00034 00035 // cell dimension 00036 virtual int dim() const {return 0;} 00037 // number of nodes 00038 virtual int numNodes() const {return 1;} 00039 // number of vertices (vertices are nodes which correspond to zero-cells) 00040 virtual int numVertices() const {return 1;} 00041 // number of d-facets 00042 virtual int numFacets(int /*d*/) const {return 0;} 00043 00044 // ----------------- faceting methods ------------------------------ 00045 00046 // points have no facets, so these methods will throw exceptions 00047 // if called. 00048 00049 virtual const TSFArray<TSFArray<int> >& facetNodePtrs(int facetDim) const ; 00050 00051 virtual const ReferenceCell& facetReferenceCell(int facetDim, 00052 int facetNumber) const ; 00053 virtual const TSFArray<TSFArray<int> >& facetFacetPtrs(int d, int facetNum) const ; 00054 00055 virtual FacetSetBase* newFacetSet() const ; 00056 00057 // ------------- mapping-related methods --------------------------- 00058 00059 // constant-Jacobian methods, for efficiency on affine cells. 00060 virtual void constantJacobian(const Cell& cell, 00061 CellJacobian& J) const ; 00062 virtual void constantDetJacobian(const Cell& cell, 00063 double& detJ) const ; 00064 00065 virtual void pushFwd(const Cell& cell, 00066 const TSFArray<Point>& ref, 00067 TSFArray<Point>& phys) const ; 00068 00069 00070 00071 /** compute diameter of cell */ 00072 virtual double diameter(const Cell& cell) const ; 00073 00074 private: 00075 static CellJacobian J_; 00076 static string typeName_; 00077 00078 // dummy data for -Wall returns 00079 static TSFArray<TSFArray<int> > dummyFacetPtrs_; 00080 static ReferenceCell dummyFacets_; 00081 }; 00082 00083 } 00084 #endif 00085 00086 00087 00088 00089 00090 00091 00092