00001 #ifndef GAUSSIANQUADRATURE_H 00002 #define GAUSSIANQUADRATURE_H 00003 00004 #include "SundanceDefs.h" 00005 #include "QuadratureFamilyBase.h" 00006 #include "TSFHashtable.h" 00007 #include "XMLObject.h" 00008 00009 00010 namespace Sundance 00011 { 00012 00013 using namespace TSF; 00014 using std::string; 00015 00016 using std::ostream; 00017 00018 /** \ingroup UserLevelFE 00019 * Abstract, geometry-independent symmetric Gaussian quadrature rule 00020 */ 00021 00022 class GaussianQuadrature : public QuadratureFamilyBase 00023 { 00024 public: 00025 /** \name User-level methods */ 00026 //@{ 00027 /** create a Gauss-Legendre quadrature rule of a given 00028 * polynomial order */ 00029 GaussianQuadrature(int polyOrder) 00030 : QuadratureFamilyBase("GaussianQuadrature", 00031 polyOrder) {;} 00032 //@} 00033 00034 /** \name Developer-only methods */ 00035 //@{ 00036 /** create from an XML specification */ 00037 GaussianQuadrature(const XMLObject& xml); 00038 /** TUVD */ 00039 virtual ~GaussianQuadrature(){;} 00040 00041 /** return an identifying string */ 00042 virtual const string& typeName() const {return typeName_;} 00043 00044 //@} 00045 protected: 00046 00047 /** compute a rule for the reference line cell */ 00048 virtual QuadraturePoints getLineRule() const ; 00049 00050 /** compute a rule for the reference triangle cell */ 00051 virtual QuadraturePoints getTriangleRule() const ; 00052 00053 /** compute a rule for the reference quad cell */ 00054 virtual QuadraturePoints getQuadRule() const ; 00055 00056 /** compute a rule for the reference tet cell */ 00057 virtual QuadraturePoints getTetRule() const ; 00058 00059 00060 /** compute a rule for the reference brick cell */ 00061 virtual QuadraturePoints getBrickRule() const ; 00062 00063 static string typeName_; 00064 static TSFHashtable<int, QuadraturePoints> lineRules_; 00065 static TSFHashtable<int, QuadraturePoints> triangleRules_; 00066 static TSFHashtable<int, QuadraturePoints> quadRules_; 00067 static TSFHashtable<int, QuadraturePoints> brickRules_; 00068 static TSFHashtable<int, QuadraturePoints> tetRules_; 00069 }; 00070 00071 extern "C" 00072 { 00073 /** \relates GaussianQuadrature creator function used in dynamic loading */ 00074 QuadratureFamilyBase* createXMLGaussianQuadrature(const XMLObject& xml); 00075 } 00076 00077 } 00078 #endif