Go to the documentation of this file.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_QUADRATUREEVALMEDIATOR_H
00032 #define SUNDANCE_QUADRATUREEVALMEDIATOR_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
00041 namespace Sundance
00042 {
00043 using namespace Teuchos;
00044
00045
00046
00047
00048 class QuadratureEvalMediator : public StdFwkEvalMediator
00049 {
00050 public:
00051
00052
00053
00054 QuadratureEvalMediator(const Mesh& mesh,
00055 int cellDim,
00056 const QuadratureFamily& quad);
00057
00058
00059 virtual ~QuadratureEvalMediator(){;}
00060
00061
00062
00063
00064 virtual void evalCoordExpr(const CoordExpr* expr,
00065 RCP<EvalVector>& vec) const ;
00066
00067
00068
00069 virtual void evalDiscreteFuncElement(const DiscreteFuncElement* expr,
00070 const Array<MultiIndex>& mi,
00071 Array<RCP<EvalVector> >& vec) const ;
00072
00073
00074
00075 virtual void evalCellDiameterExpr(const CellDiameterExpr* expr,
00076 RCP<EvalVector>& vec) const ;
00077
00078
00079
00080
00081 virtual void evalCellVectorExpr(const CellVectorExpr* expr,
00082 RCP<EvalVector>& vec) const ;
00083
00084
00085 virtual void setCellType(const CellType& cellType,
00086 const CellType& maxCellType,
00087 bool isInternalBdry) ;
00088
00089
00090 virtual void print(std::ostream& os) const ;
00091
00092
00093 Array<Array<double> >* getRefBasisVals(const BasisFamily& basis,
00094 int diffOrder) const ;
00095
00096
00097 RCP<Array<Array<Array<double> > > > getFacetRefBasisVals(const BasisFamily& basis, int diffOrder) const ;
00098
00099
00100 int numQuadPts(const CellType& cellType) const ;
00101
00102 static double& totalFlops() {static double rtn = 0; return rtn;}
00103
00104
00105
00106 static void addFlops(const double& flops) {totalFlops() += flops;}
00107
00108
00109
00110
00111
00112
00113
00114
00115 int numEvaluationCases() const {return numEvaluationCases_;}
00116
00117
00118
00119 static Time& coordEvaluationTimer() ;
00120
00121 private:
00122
00123
00124
00125 void fillFunctionCache(const DiscreteFunctionData* f,
00126 const MultiIndex& mi) const ;
00127
00128
00129
00130 void computePhysQuadPts() const ;
00131
00132
00133 int numEvaluationCases_;
00134
00135
00136 QuadratureFamily quad_;
00137
00138
00139 Map<CellType, int> numQuadPtsForCellType_;
00140
00141
00142
00143
00144
00145
00146
00147 Map<CellType, RCP<Array<Point> > > quadPtsForReferenceCell_;
00148
00149
00150
00151
00152
00153 Map<CellType, RCP<Array<Array<Point> > > > quadPtsReferredToMaxCell_;
00154
00155
00156 mutable Array<Point> physQuadPts_;
00157
00158
00159 mutable Array<Map<OrderedPair<BasisFamily, CellType>, RCP<Array<Array<Array<double> > > > > > refFacetBasisVals_;
00160
00161 };
00162 }
00163
00164
00165 #endif