00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
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>& ,
00090 Array<double>& ) 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>& ,
00100 Array<double>& ) 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>& ,
00110 Array<double>& ) 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>& ,
00120 Array<double>& ) 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>& ,
00130 Array<double>& ) 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 }