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

Lagrange.h

Go to the documentation of this file.
00001 #ifndef LAGRANGE_H
00002 #define LAGRANGE_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "ScalarBasis.h"
00007 #include "XMLObject.h"
00008 
00009 
00010 namespace Sundance
00011 {
00012 
00013   using namespace TSF;
00014   using std::string;
00015 
00016   using std::ostream;
00017 
00018   /** \ingroup UserLevelFE
00019    * Symbolic, geometry-independent representation of Lagrange basis
00020    * functions.
00021    */
00022   class Lagrange : public ScalarBasis
00023     {
00024     public:
00025       /** \name User-level methods */
00026       //@{
00027       /** Create a Lagrange basis of a given order. */
00028       Lagrange(int order);
00029       //@}
00030 
00031       /** \name Developer-only methods */
00032       //@{
00033       /** construct from an XML specification */
00034       Lagrange(const XMLObject& object);
00035 
00036       /**
00037        * assign DOF numbers for a set of function IDs on a specified cell
00038        */
00039       virtual void setNodeNumbers(const Cell& cell,
00040                                   const TSFArray<int>& funcID,
00041                                   TemporaryMapper& tmpMap) const ;
00042 
00043       /** get the DOF numbers for a set of function IDs on a specified
00044        * cell
00045        */
00046       virtual void getNodeNumbers(const Cell& cell,
00047                                   const TSFArray<int>& funcID,
00048                                   TemporaryMapper& tmpMap,
00049                                   TSFArray<TSFArray<int> >& indices) const ;
00050 
00051       /**
00052        * find the DOF list for one of the facets of a specified cell
00053        */
00054       virtual void getFacetDOFs(const Cell& c, int facetDim, int facetIndex,
00055                                 const TSFArray<int>& maximalDOFs,
00056                                 TSFArray<int>& facetDOFs) const ;
00057       /**
00058        * Find the points at the nodes. Some points may have been processed already
00059        * and are marked as inactive with the bool array. Inactive points are not
00060        * returned.
00061        */
00062       virtual void getNodalPoints(const Cell& cell,
00063                                   const TSFArray<bool>& activeNodes,
00064                                   TSFArray<Point>& evalPoints) const ;
00065       //@}
00066     protected:
00067       /** get number of nodes for a line cell */
00068       virtual int nNodesOnLine() const ;
00069 
00070       /** get number of nodes for a triangle cell */
00071       virtual int nNodesOnTriangle() const ;
00072 
00073       /** get number of nodes for a quad cell  */
00074       virtual int nNodesOnQuad() const ;
00075 
00076       /** get number of nodes for a tet cell */
00077       virtual int nNodesOnTet() const ;
00078 
00079       /** get number of nodes for a brick cell */
00080       virtual int nNodesOnBrick() const ;
00081 
00082       /** evaluate on a line cell  */
00083       virtual void evalOnLine(const Point& pt,
00084                               const MultiIndex& deriv,
00085                               DenseSerialVector& result) const ;
00086 
00087       /** evaluate on a triangle cell  */
00088       virtual void evalOnTriangle(const Point& pt,
00089                                   const MultiIndex& deriv,
00090                                   DenseSerialVector& result) const ;
00091 
00092       /** evaluate on a quad cell  */
00093       virtual void evalOnQuad(const Point& pt,
00094                               const MultiIndex& deriv,
00095                               DenseSerialVector& result) const ;
00096 
00097       /** evaluate on a tet cell  */
00098       virtual void evalOnTet(const Point& pt,
00099                              const MultiIndex& deriv,
00100                              DenseSerialVector& result) const ;
00101 
00102       /** evaluate on a brick cell  */
00103       virtual void evalOnBrick(const Point& pt,
00104                                const MultiIndex& deriv,
00105                                DenseSerialVector& result) const ;
00106     };
00107 
00108   extern "C"
00109   {
00110     /** \relates Lagrange create from an XML specification */
00111     BasisFamilyBase* createXMLLagrange(const XMLObject& xml);
00112   }
00113 
00114 }
00115 #endif

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


Documentation generated by