00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 #ifndef SUNDANCE_CURVEEVALMEDIATOR_H
00032 #define SUNDANCE_CURVEEVALMEDIATOR_H
00033 
00034 #include "SundanceDefs.hpp"
00035 #include "SundanceMap.hpp"
00036 #include "SundanceStdFwkEvalMediator.hpp"
00037 #include "SundanceQuadratureFamily.hpp"
00038 #include "SundanceBasisFamily.hpp"
00039 #include "SundanceOrderedTuple.hpp"
00040 #include "SundanceParametrizedCurve.hpp"
00041 
00042 namespace Sundance
00043 {
00044 using namespace Teuchos;
00045 
00046 
00047 
00048 
00049 class CurveEvalMediator : public StdFwkEvalMediator
00050 {
00051 public:
00052 
00053 
00054 
00055   CurveEvalMediator(const Mesh& mesh,
00056   const ParametrizedCurve& paramcurve ,
00057     int cellDim,
00058     const QuadratureFamily& quad);
00059 
00060 
00061 
00062   virtual ~CurveEvalMediator(){;}
00063 
00064       
00065 
00066 
00067   virtual void evalCoordExpr(const CoordExpr* expr,
00068     RCP<EvalVector>& vec) const ;
00069       
00070 
00071 
00072   virtual void evalDiscreteFuncElement(const DiscreteFuncElement* expr,
00073     const Array<MultiIndex>& mi,
00074     Array<RCP<EvalVector> >& vec) const ;
00075 
00076 
00077 
00078   virtual void evalCellDiameterExpr(const CellDiameterExpr* expr,
00079     RCP<EvalVector>& vec) const ;
00080 
00081 
00082 
00083 
00084   virtual void evalCurveNormExpr(const CurveNormExpr* expr,
00085     RCP<EvalVector>& vec) const ;
00086 
00087 
00088 
00089   virtual void evalCellVectorExpr(const CellVectorExpr* expr,
00090     RCP<EvalVector>& vec) const ;
00091             
00092 
00093   virtual void setCellType(const CellType& cellType,
00094     const CellType& maxCellType,
00095     bool isInternalBdry) ;
00096 
00097 
00098   virtual void print(std::ostream& os) const ;
00099 
00100 
00101   RCP<Array<Array<Array<double> > > > getFacetRefBasisVals(const BasisFamily& basis, int diffOrder) const ;
00102 
00103 
00104   int numQuadPts(const CellType& cellType) const ;
00105 
00106   static double& totalFlops() {static double rtn = 0; return rtn;}
00107 
00108       
00109 
00110   static void addFlops(const double& flops) {totalFlops() += flops;}
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119   int numEvaluationCases() const {return numEvaluationCases_;}
00120 
00121 
00122 
00123   static Time& coordEvaluationTimer() ;
00124 
00125 private:
00126 
00127 
00128   int numEvaluationCases_;
00129 
00130 
00131   QuadratureFamily quad_;
00132 
00133 
00134   int numQuadPtsForMaxCell_;
00135 
00136 
00137   CellType maxCellType_;
00138 
00139 
00140   CellType curveCellType_;
00141 
00142 
00143   ParametrizedCurve paramcurve_;
00144       
00145 };
00146 }
00147 
00148 
00149 #endif