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 "SundanceFeketeQuadratureType.hpp" 00032 #include "SundanceFeketeQuadrature.hpp" 00033 #include "SundanceGaussLobatto1D.hpp" 00034 #include "SundanceFeketeTriangleQuadrature.hpp" 00035 00036 using namespace Sundance; 00037 using namespace Teuchos; 00038 00039 FeketeQuadratureType::FeketeQuadratureType() : 00040 QuadratureTypeBase() 00041 { 00042 00043 } 00044 00045 XMLObject FeketeQuadratureType::toXML() const 00046 { 00047 XMLObject rtn("FeketeQuadratureType"); 00048 return rtn; 00049 } 00050 00051 bool FeketeQuadratureType::supportsCellType(const CellType& cellType) const 00052 { 00053 switch (cellType) 00054 { 00055 case PointCell: 00056 case LineCell: 00057 case TriangleCell: 00058 case QuadCell: 00059 case BrickCell: 00060 return true; 00061 default: 00062 return false; 00063 } 00064 } 00065 00066 int FeketeQuadratureType::maxOrder(const CellType& cellType) const 00067 { 00068 switch (cellType) 00069 { 00070 case TriangleCell: 00071 return FeketeTriangleQuadrature::maxOrder(); 00072 default: 00073 return -1; 00074 } 00075 } 00076 00077 bool FeketeQuadratureType::hasLimitedOrder(const CellType& cellType) const 00078 { 00079 switch (cellType) 00080 { 00081 case TriangleCell: 00082 return true; 00083 default: 00084 return false; 00085 } 00086 } 00087 00088 bool FeketeQuadratureType::supports(const CellType& cellType, int order) const 00089 { 00090 if (order <= 0) 00091 return false; 00092 00093 switch (cellType) 00094 { 00095 case PointCell: 00096 return true; 00097 case LineCell: 00098 return true; 00099 case QuadCell: 00100 return true; 00101 case BrickCell: 00102 return true; 00103 case TriangleCell: 00104 return FeketeTriangleQuadrature::supportsOrder(order); 00105 default: 00106 return false; 00107 } 00108 } 00109 00110 QuadratureFamily FeketeQuadratureType::createQuadFamily(int order) const 00111 { 00112 return new FeketeQuadrature(order); 00113 }