SundanceQuadratureFamilyBase.cpp
Go to the documentation of this file.
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 "SundanceQuadratureFamilyBase.hpp"
00032 
00033 
00034 using namespace Sundance;
00035 using namespace Teuchos;
00036 
00037 void QuadratureFamilyBase::getPoints(const CellType& cellType, 
00038                                      Array<Point>& quadPoints,
00039                                      Array<double>& quadWeights) const
00040 {
00041   switch(cellType)
00042     {
00043     case PointCell:
00044       quadPoints = tuple(Point());
00045       quadWeights = tuple(1.0);
00046       break;
00047     case LineCell:
00048       getLineRule(quadPoints, quadWeights);
00049       break;
00050     case TriangleCell:
00051       getTriangleRule(quadPoints, quadWeights);
00052       break;
00053     case QuadCell:
00054       getQuadRule(quadPoints, quadWeights);
00055       break;
00056     case TetCell:
00057       getTetRule(quadPoints, quadWeights);
00058       break;
00059     case BrickCell:
00060       getBrickRule(quadPoints, quadWeights);
00061       break;
00062     default:
00063 #ifndef TRILINOS_7
00064       SUNDANCE_ERROR("cell type " << cellType << " not handled in "
00065                      "QuadratureFamilyBase::getPoints()");
00066 #else
00067       SUNDANCE_ERROR7("cell type " << cellType << " not handled in "
00068                      "QuadratureFamilyBase::getPoints()");
00069 #endif
00070     }
00071 }
00072 
00073 void QuadratureFamilyBase::getAdaptedWeights(const CellType& cellType ,
00074                    int cellDim,
00075                                    int celLID ,
00076                                  int facetIndex ,
00077                                    const Mesh& mesh ,
00078                                    const ParametrizedCurve& globalCurve ,
00079                                    Array<Point>& quadPoints ,
00080                                    Array<double>& quadWeights ,
00081                                    bool &isCut) const {
00082 #ifndef TRILINOS_7
00083   SUNDANCE_ERROR("getAdaptedWeights rule for ACI(Adaptive Cell Integration) not available for " << toXML());
00084 #else
00085   SUNDANCE_ERROR7("getAdaptedWeights rule for ACI(Adaptive Cell Integration) not available for " << toXML());
00086 #endif
00087 }
00088 
00089 void QuadratureFamilyBase::getLineRule(Array<Point>& /* quadPoints */,
00090                                        Array<double>& /* quadWeights */) const 
00091 {
00092 #ifndef TRILINOS_7
00093   SUNDANCE_ERROR("Line rule not available for " << toXML());
00094 #else
00095   SUNDANCE_ERROR7("Line rule not available for " << toXML());
00096 #endif
00097 }
00098 
00099 void QuadratureFamilyBase::getTriangleRule(Array<Point>& /* quadPoints */,
00100                                            Array<double>& /* quadWeights */) const 
00101 {
00102 #ifndef TRILINOS_7
00103   SUNDANCE_ERROR("Triangle rule not available for " << toXML());
00104 #else
00105   SUNDANCE_ERROR7("Triangle rule not available for " << toXML());
00106 #endif
00107 }
00108 
00109 void QuadratureFamilyBase::getQuadRule(Array<Point>& /* quadPoints */,
00110                                            Array<double>& /* quadWeights */) const 
00111 {
00112 #ifndef TRILINOS_7
00113   SUNDANCE_ERROR("Quad cell rule not available for " << toXML());
00114 #else
00115   SUNDANCE_ERROR7("Quad cell rule not available for " << toXML());
00116 #endif
00117 }
00118 
00119 void QuadratureFamilyBase::getTetRule(Array<Point>& /* quadPoints */,
00120                                            Array<double>& /* quadWeights */) const 
00121 {
00122 #ifndef TRILINOS_7
00123   SUNDANCE_ERROR("Tet cell rule not available for " << toXML());
00124 #else
00125   SUNDANCE_ERROR7("Tet cell rule not available for " << toXML());
00126 #endif
00127 }
00128 
00129 void QuadratureFamilyBase::getBrickRule(Array<Point>& /* quadPoints */,
00130                                            Array<double>& /* quadWeights */) const 
00131 {
00132 #ifndef TRILINOS_7
00133   SUNDANCE_ERROR("Brick rule not available for " << toXML());
00134 #else
00135   SUNDANCE_ERROR7("Brick rule not available for " << toXML());
00136 #endif
00137 }

Site Contact