$extrastylesheet
00001 00002 // The libMesh Finite Element Library. 00003 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00004 00005 // This library is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with this library; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 // Local includes 00020 #include "libmesh/fe_type.h" 00021 #include "libmesh/quadrature_clough.h" 00022 #include "libmesh/quadrature_gauss.h" 00023 00024 namespace libMesh 00025 { 00026 00027 // --------------------------------------- 00028 // FEType class members 00029 00030 UniquePtr<QBase> 00031 FEType::default_quadrature_rule (const unsigned int dim, 00032 const int extraorder) const 00033 { 00034 00035 // Clough elements have at least piecewise cubic functions 00036 if (family == CLOUGH) 00037 { 00038 // this seems ridiculous but for some reason gcc 3.3.5 wants 00039 // this when using complex numbers (spetersen 04/20/06) 00040 const unsigned int seven = 7; 00041 00042 return UniquePtr<QBase> 00043 (new QClough(dim, 00044 static_cast<Order> 00045 (std::max(static_cast<unsigned int> 00046 (this->default_quadrature_order()), seven + extraorder)))); 00047 } 00048 00049 if (family == SUBDIVISION) 00050 return UniquePtr<QBase> 00051 (new QGauss(dim, static_cast<Order>(1 + extraorder))); 00052 00053 return UniquePtr<QBase> 00054 (new QGauss(dim, static_cast<Order>(this->default_quadrature_order() 00055 + extraorder))); 00056 } 00057 00058 } // namespace libMesh