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

CellDiameterExpr.h

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

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


Documentation generated by