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

BrickReferenceCell.h

Go to the documentation of this file.
00001 #ifndef BRICKREFERENCECELL_H
00002 #define BRICKREFERENCECELL_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "ReferenceCellBase.h"
00007 #include "ReferenceCell.h"
00008 #include "BrickFacetSet.h"
00009 
00010 
00011 namespace Sundance
00012 {
00013 
00014   using namespace TSF;
00015   using std::string;
00016 
00017   using std::ostream;
00018 
00019   /** \ingroup LowLevelGeometry
00020    * Reference cell for bricks
00021    */
00022 
00023   class BrickReferenceCell : public ReferenceCellBase
00024     {
00025     public:
00026       /** empty ctor */
00027       BrickReferenceCell();
00028       /** dtor */
00029       virtual ~BrickReferenceCell(){;}
00030 
00031       /** type identification */
00032       virtual const string& typeName() const {return typeName_;}
00033       /** return topology code (BrickCell) */
00034       virtual CellTopologyCode topologyCode() const {return BrickCell;}
00035 
00036       /** return cell dimension */
00037       virtual int dim() const {return 3;}
00038       /** return number of nodes */
00039       virtual int numNodes() const {return 8;}
00040       /** number of vertices (vertices are nodes which correspond to zero-cells) */
00041       virtual int numVertices() const {return 8;}
00042       /** number of d-facets */
00043       virtual int numFacets(int d) const ;
00044 
00045       // faceting
00046       /** */
00047       virtual const TSFArray<TSFArray<int> >& facetNodePtrs(int facetDim) const ;
00048       /** */
00049       virtual const ReferenceCell& facetReferenceCell(int facetDim,
00050                                                       int facetNumber) const ;
00051       /** */
00052       virtual const TSFArray<TSFArray<int> >& facetFacetPtrs(int cellDim,
00053                                                              int facetNumber) const ;
00054       /** */
00055       virtual FacetSetBase* newFacetSet() const {return new BrickFacetSet();}
00056 
00057 
00058       /** Jacobian computation, general non-affine case. */
00059       virtual void jacobian(const Cell& cell,
00060                             const TSFArray<Point>& refpts,
00061                             TSFArray<CellJacobian>& J) const ;
00062 
00063       /** Jacobian computation on embedded cells */
00064       virtual void detJacobian(const Cell& cell,
00065                                const TSFArray<Point>& refpts,
00066                                TSFArray<double>& detJ) const ;
00067 
00068       /** constant-Jacobian, maximal-dimension computation,
00069        * for efficiency on affine cells. */
00070       virtual void constantJacobian(const Cell& cell,
00071                                     CellJacobian& J) const ;
00072 
00073       /** constant-Jacobian, embedded cell computation,
00074        * for efficiency on affine cells. */
00075       virtual void constantDetJacobian(const Cell& cell,
00076                                        double& detJ) const ;
00077 
00078       /** do push-forward map (reference to physical coordinates) */
00079       virtual void pushFwd(const Cell& cell,
00080                            const TSFArray<Point>& ref,
00081                            TSFArray<Point>& phys) const ;
00082 
00083       /** pullback maps physical coords to reference coords. */
00084       virtual void pullBack(const Cell& cell,
00085                             const TSFArray<Point>& phys,
00086                             TSFArray<Point>& ref) const ;
00087 
00088       /** compute diameter of cell */
00089       virtual double diameter(const Cell& cell) const ;
00090 
00091       friend class AffineLineReferenceCell;
00092     private:
00093       /** */
00094       void initFacets();
00095 
00096       static string typeName_;
00097       static ReferenceCell pointFacetReferenceCell_;
00098       static ReferenceCell lineFacetReferenceCell_;
00099       static ReferenceCell quadFacetReferenceCell_;
00100       static TSFArray<TSFArray<TSFArray<int> > > facetNodePtrs_;
00101       static TSFArray<TSFArray<TSFArray<TSFArray<int> > > > facetFacetPtrs_;
00102     };
00103 
00104 }
00105 #endif
00106 
00107 
00108 
00109 

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


Documentation generated by