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

AffineLineReferenceCell.h

Go to the documentation of this file.
00001 #ifndef AFFINELINEREFERENCECELL_H
00002 #define AFFINELINEREFERENCECELL_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "AffineReferenceCell.h"
00007 #include "ReferenceCell.h"
00008 #include "LineFacetSet.h"
00009 
00010 namespace Sundance
00011 {
00012 
00013   using namespace TSF;
00014   using std::string;
00015 
00016   using std::ostream;
00017   /** \ingroup LowLevelGeometry
00018    * Reference cell for affine lines
00019    */
00020 
00021   class AffineLineReferenceCell : public AffineReferenceCell
00022     {
00023     public:
00024       /** \name Developer-only methods */
00025       //@{
00026       /** empty ctor */
00027       AffineLineReferenceCell();
00028       /** dtor */
00029       virtual ~AffineLineReferenceCell(){;}
00030 
00031       /** return descriptive name of type */
00032       virtual const string& typeName() const {return typeName_;}
00033       /** return topology code (LineCell) */
00034       virtual CellTopologyCode topologyCode() const {return LineCell;}
00035 
00036       /**  return dimension of cell (1) */
00037       virtual int dim() const {return 1;}
00038       /** return number of nodes (2) */
00039       virtual int numNodes() const {return 2;}
00040       /** return number of vertices (2) */
00041       virtual int numVertices() const {return 2;}
00042       /** return number of d-facets */
00043       virtual int numFacets(int d) const ;
00044 
00045       // faceting
00046       /** return list of nodes for the facet of given dimension */
00047       virtual const TSFArray<TSFArray<int> >& facetNodePtrs(int facetDim) const ;
00048       /** return reference cell of the given facet */
00049       virtual const ReferenceCell& facetReferenceCell(int facetDim,
00050                                                       int facetNumber) const ;
00051       /** get pointers to facets of the f-th d-facet */
00052       virtual const TSFArray<TSFArray<int> >& facetFacetPtrs(int d, int f) const ;
00053       /** create a facet set */
00054       virtual FacetSetBase* newFacetSet() const {return new LineFacetSet();}
00055 
00056       /** get the jacobian of this cell */
00057       virtual void constantJacobian(const Cell& cell,
00058                                     CellJacobian& J) const ;
00059 
00060       /** constant-Jacobian, embedded cell computation */
00061       virtual void constantDetJacobian(const Cell& cell,
00062                                        double& detJ) const ;
00063 
00064       /** do push-forward map (reference to physical coordinates) */
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       /** compute outward normal of cell */
00075       virtual Point normal(const Cell& cell) const ;
00076     private:
00077       void initFacets();
00078 
00079       static string typeName_;
00080       static ReferenceCell pointFacetReferenceCell_;
00081       static TSFArray<TSFArray<int> > facetPtrs_;
00082     };
00083 
00084 }
00085 #endif
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 

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


Documentation generated by