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

QuadExprSpecifier.h

Go to the documentation of this file.
00001 #ifndef QUADEXPRSPECIFIER_H
00002 #define QUADEXPRSPECIFIER_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "Expr.h"
00007 #include "QuadratureFamily.h"
00008 
00009 namespace Sundance
00010 {
00011 
00012   using namespace TSF;
00013   using std::string;
00014 
00015   using std::ostream;
00016 
00017   /** */
00018 
00019   class QuadExprSpecifier
00020     {
00021     public:
00022       /** empty ctor for containers */
00023       QuadExprSpecifier() : quad_(), expr_(){}
00024       /** construct given a quad point set, a basis evaluator, and
00025        * the order of differentiation used when evaluating the basis */
00026       QuadExprSpecifier(const QuadratureFamily& quad,
00027                         const Expr& expr);
00028 
00029       /** test equality with another specifier. Two objects are equal if
00030        * they refer to the same quad points, basis, and deriv order */
00031       bool operator==(const QuadExprSpecifier& other) const ;
00032 
00033       /** hash code for hashtable lookup */
00034       int hashCode() const {return hashCode_;}
00035 
00036       /** write as a string */
00037       string toString() const ;
00038     protected:
00039       QuadratureFamily quad_;
00040       Expr expr_;
00041       int hashCode_;
00042     };
00043 
00044 
00045 }
00046 
00047 namespace TSF
00048 {
00049   inline string toString(const Sundance::QuadExprSpecifier& qbs)
00050     {
00051       return qbs.toString();
00052     }
00053 
00054   inline int hashCode(const Sundance::QuadExprSpecifier& qbs)
00055     {
00056       return qbs.hashCode();
00057     }
00058 }
00059 #endif

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


Documentation generated by