00001 /* @HEADER@ */ 00002 // ************************************************************************ 00003 // 00004 // Sundance 00005 // Copyright (2005) Sandia Corporation 00006 // 00007 // Copyright (year first published) Sandia Corporation. Under the terms 00008 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government 00009 // retains certain rights in this software. 00010 // 00011 // This library is free software; you can redistribute it and/or modify 00012 // it under the terms of the GNU Lesser General Public License as 00013 // published by the Free Software Foundation; either version 2.1 of the 00014 // License, or (at your option) any later version. 00015 // 00016 // This library is distributed in the hope that it will be useful, but 00017 // WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 // Lesser General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Lesser General Public 00022 // License along with this library; if not, write to the Free Software 00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00024 // USA 00025 // Questions? Contact Kevin Long (krlong@sandia.gov), 00026 // Sandia National Laboratories, Livermore, California, USA 00027 // 00028 // ************************************************************************ 00029 /* @HEADER@ */ 00030 00031 #include "SundanceGaussianQuadratureType.hpp" 00032 #include "SundanceGaussianQuadrature.hpp" 00033 #include "SundanceGauss1D.hpp" 00034 #include "SundanceTriangleQuadrature.hpp" 00035 #include "SundanceQuadQuadrature.hpp" 00036 #include "SundanceTetQuadrature.hpp" 00037 #include "SundanceBrickQuadrature.hpp" 00038 00039 using namespace Sundance; 00040 using namespace Sundance; 00041 using namespace Sundance; 00042 using namespace Sundance; 00043 using namespace Sundance; 00044 using namespace Teuchos; 00045 00046 GaussianQuadratureType::GaussianQuadratureType() 00047 : QuadratureTypeBase() 00048 { 00049 00050 } 00051 00052 XMLObject GaussianQuadratureType::toXML() const 00053 { 00054 XMLObject rtn("GaussianQuadratureType"); 00055 return rtn; 00056 } 00057 00058 00059 bool GaussianQuadratureType::supportsCellType(const CellType& cellType) const 00060 { 00061 switch(cellType) 00062 { 00063 case PointCell: 00064 case LineCell: 00065 case TriangleCell: 00066 case QuadCell: 00067 case TetCell: 00068 case BrickCell: 00069 return true; 00070 default: 00071 return false; 00072 } 00073 } 00074 00075 int GaussianQuadratureType::maxOrder(const CellType& cellType) const 00076 { 00077 switch(cellType) 00078 { 00079 case TetCell: 00080 return TetQuadrature::maxOrder(); 00081 default: 00082 return -1; 00083 } 00084 } 00085 00086 00087 bool GaussianQuadratureType::hasLimitedOrder(const CellType& cellType) const 00088 { 00089 switch(cellType) 00090 { 00091 case TetCell: 00092 return true; 00093 default: 00094 return false; 00095 } 00096 } 00097 00098 bool GaussianQuadratureType::supports(const CellType& cellType, int order) const 00099 { 00100 if (order <= 0) return false; 00101 00102 switch(cellType) 00103 { 00104 case PointCell: 00105 return true; 00106 case LineCell: 00107 return true; 00108 case TriangleCell: 00109 return true; 00110 case QuadCell: 00111 return true; 00112 case TetCell: 00113 return TetQuadrature::supportsOrder(order); 00114 case BrickCell: 00115 return true; 00116 default: 00117 return false; 00118 } 00119 } 00120 00121 QuadratureFamily GaussianQuadratureType::createQuadFamily(int order) const 00122 { 00123 return new GaussianQuadrature(order); 00124 }