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

DiffOp.h

Go to the documentation of this file.
00001 #ifndef DIFFOP_H
00002 #define DIFFOP_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "Expr.h"
00007 #include "Derivative.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 LowLevelSymbolics
00020    * A differential operator of the form (Expr)*(Derivative).
00021    */
00022 
00023   class DiffOp : public ExprBase
00024     {
00025     public:
00026       /** \name Developer-only methods */
00027       //@{
00028       /** ctor */
00029       DiffOp(const Expr& coeff, const Derivative& d);
00030 
00031 
00032 
00033       // ordering support
00034       /** */
00035       virtual int sortPriority() const {return DIFFOP;}
00036       /** */
00037       virtual bool operator==(const Expr& other) const ;
00038       /** */
00039       virtual bool operator<(const Expr& other) const ;
00040 
00041       // RTTI
00042       /** */
00043       virtual bool isDiffOp() const {return true;}
00044 
00045       // miscellany
00046       /** */
00047       virtual ExprBase* clone() const ;
00048       /** */
00049       virtual void print(ostream& os, bool paren=false) const ;
00050 
00051       // DiffOp specific
00052       /** */
00053       Expr operate(const Expr& operand) const ;
00054       /** */
00055       Expr leftMultiply(const Expr& lhs) const ;
00056 
00057       /** extract the mesh */
00058       virtual bool getMesh(Mesh& mesh) const ;
00059       //@}
00060     private:
00061       Expr coeff_;
00062       Derivative d_;
00063     };
00064 
00065 }
00066 #endif

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


Documentation generated by