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

CellNormalExpr.h

Go to the documentation of this file.
00001 #ifndef CELLNORMALEXPR_H
00002 #define CELLNORMALEXPR_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "ExprBase.h"
00007 #include "DenseSerialVector.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 UserLevelSymbolics
00020    * CellNormalExpr returns the outward normal of the boundary cell on which
00021    * it is being evaluated. Attempting to evaluate a CellNormalExpr on a
00022    * non-boundary cell is an error.
00023    */
00024 
00025   class CellNormalExpr : public ExprBase
00026     {
00027     public:
00028       /** \name User-level methods */
00029       //@{
00030       /** Construct with an optional name */
00031       CellNormalExpr(int direction, const string& name = "");
00032       //@}
00033 
00034       virtual ~CellNormalExpr(){;}
00035 
00036       /** \name Developer-only methods */
00037       //@{
00038       // evaluation
00039 
00040       /** average over the nodes of a cell */
00041       virtual ExprValue average(const Cell& cell) const ;
00042 
00043       /** */
00044       virtual void evaluate(const WorkSet& workSet,
00045                             const QuadratureFamily& quadFamily,
00046                             DenseSerialVector& result) const ;
00047 
00048 
00049       // differentiation
00050       /** take derivative: first
00051        * derivative will be 1 if d=coordDirection, 0 otherwise. */
00052       virtual void derivative(const MultiIndex& d, Expr& result) const ;
00053 
00054       // ordering support
00055       /** */
00056       virtual bool operator==(const Expr& other) const ;
00057       /** */
00058       virtual bool operator<(const Expr& other) const ;
00059       /** */
00060       virtual int sortPriority() const {return CELLNORMALEXPR;}
00061 
00062       // RTTI
00063       /** identify self as a CellNormalExpr */
00064       virtual bool isCellNormalExpr() const {return true;}
00065 
00066       /** virtual copy ctor */
00067       virtual ExprBase* clone() const ;
00068 
00069       /** print */
00070       virtual void print(ostream& os, bool paren=false) const ;
00071       /** write to string */
00072       virtual string toString(bool paren=false) const ;
00073       /** write to XML form */
00074       virtual XMLObject toXML() const ;
00075 
00076       //@}
00077     private:
00078       int direction_;
00079       string name_;
00080 
00081     };
00082 
00083 
00084 }
00085 #endif
00086 
00087 
00088 
00089 
00090 

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


Documentation generated by