SundanceQuadratureFamilyBase.cpp
Go to the documentation of this file.
00001 /* @HEADER@ */
00002 // ************************************************************************
00003 // 
00004 //                             Sundance
00005 //                 Copyright 2011 Sandia Corporation
00006 // 
00007 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00008 // the U.S. Government retains certain rights in this software.
00009 //
00010 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are
00012 // met:
00013 //
00014 // 1. Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 //
00017 // 2. Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 //
00021 // 3. Neither the name of the Corporation nor the names of the
00022 // contributors may be used to endorse or promote products derived from
00023 // this software without specific prior written permission.
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // Questions? Contact Kevin Long (kevin.long@ttu.edu)
00038 // 
00039 
00040 /* @HEADER@ */
00041 
00042 #include "SundanceQuadratureFamilyBase.hpp"
00043 
00044 
00045 using namespace Sundance;
00046 using namespace Teuchos;
00047 
00048 void QuadratureFamilyBase::getPoints(const CellType& cellType, 
00049                                      Array<Point>& quadPoints,
00050                                      Array<double>& quadWeights) const
00051 {
00052   switch(cellType)
00053     {
00054     case PointCell:
00055       quadPoints = tuple(Point());
00056       quadWeights = tuple(1.0);
00057       break;
00058     case LineCell:
00059       getLineRule(quadPoints, quadWeights);
00060       break;
00061     case TriangleCell:
00062       getTriangleRule(quadPoints, quadWeights);
00063       break;
00064     case QuadCell:
00065       getQuadRule(quadPoints, quadWeights);
00066       break;
00067     case TetCell:
00068       getTetRule(quadPoints, quadWeights);
00069       break;
00070     case BrickCell:
00071       getBrickRule(quadPoints, quadWeights);
00072       break;
00073     default:
00074 #ifndef TRILINOS_7
00075       SUNDANCE_ERROR("cell type " << cellType << " not handled in "
00076                      "QuadratureFamilyBase::getPoints()");
00077 #else
00078       SUNDANCE_ERROR7("cell type " << cellType << " not handled in "
00079                      "QuadratureFamilyBase::getPoints()");
00080 #endif
00081     }
00082 }
00083 
00084 void QuadratureFamilyBase::getAdaptedWeights(const CellType& cellType ,
00085                    int cellDim,
00086                                    int celLID ,
00087                                  int facetIndex ,
00088                                    const Mesh& mesh ,
00089                                    const ParametrizedCurve& globalCurve ,
00090                                    Array<Point>& quadPoints ,
00091                                    Array<double>& quadWeights ,
00092                                    bool &isCut) const {
00093 #ifndef TRILINOS_7
00094   SUNDANCE_ERROR("getAdaptedWeights rule for ACI(Adaptive Cell Integration) not available for " << toXML());
00095 #else
00096   SUNDANCE_ERROR7("getAdaptedWeights rule for ACI(Adaptive Cell Integration) not available for " << toXML());
00097 #endif
00098 }
00099 
00100 void QuadratureFamilyBase::getLineRule(Array<Point>& /* quadPoints */,
00101                                        Array<double>& /* quadWeights */) const 
00102 {
00103 #ifndef TRILINOS_7
00104   SUNDANCE_ERROR("Line rule not available for " << toXML());
00105 #else
00106   SUNDANCE_ERROR7("Line rule not available for " << toXML());
00107 #endif
00108 }
00109 
00110 void QuadratureFamilyBase::getTriangleRule(Array<Point>& /* quadPoints */,
00111                                            Array<double>& /* quadWeights */) const 
00112 {
00113 #ifndef TRILINOS_7
00114   SUNDANCE_ERROR("Triangle rule not available for " << toXML());
00115 #else
00116   SUNDANCE_ERROR7("Triangle rule not available for " << toXML());
00117 #endif
00118 }
00119 
00120 void QuadratureFamilyBase::getQuadRule(Array<Point>& /* quadPoints */,
00121                                            Array<double>& /* quadWeights */) const 
00122 {
00123 #ifndef TRILINOS_7
00124   SUNDANCE_ERROR("Quad cell rule not available for " << toXML());
00125 #else
00126   SUNDANCE_ERROR7("Quad cell rule not available for " << toXML());
00127 #endif
00128 }
00129 
00130 void QuadratureFamilyBase::getTetRule(Array<Point>& /* quadPoints */,
00131                                            Array<double>& /* quadWeights */) const 
00132 {
00133 #ifndef TRILINOS_7
00134   SUNDANCE_ERROR("Tet cell rule not available for " << toXML());
00135 #else
00136   SUNDANCE_ERROR7("Tet cell rule not available for " << toXML());
00137 #endif
00138 }
00139 
00140 void QuadratureFamilyBase::getBrickRule(Array<Point>& /* quadPoints */,
00141                                            Array<double>& /* quadWeights */) const 
00142 {
00143 #ifndef TRILINOS_7
00144   SUNDANCE_ERROR("Brick rule not available for " << toXML());
00145 #else
00146   SUNDANCE_ERROR7("Brick rule not available for " << toXML());
00147 #endif
00148 }

Site Contact