52 template<
class Scalar,
class ArrayPo
int,
class ArrayWeight>
54 const shards::CellTopology & cellTopology,
55 const std::vector<int> & degree) {
58 Teuchos::RCP<Cubature<Scalar,ArrayPoint,ArrayWeight> > pickCubature;
60 switch (cellTopology.getBaseCellTopologyData()->key) {
62 case shards::Line<>::key:
63 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 1), std::invalid_argument,
64 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
68 case shards::Triangle<>::key:
69 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 1), std::invalid_argument,
70 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
74 case shards::Quadrilateral<>::key:
75 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 2), std::invalid_argument,
76 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
78 std::vector< Teuchos::RCP< Cubature<Scalar,ArrayPoint,ArrayWeight> > > lineCubs(2);
85 case shards::Tetrahedron<>::key:
86 if (cellTopology.getCellTopologyData()->key == shards::Tetrahedron<11>::key)
88 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 1), std::invalid_argument,
89 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
95 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 1), std::invalid_argument,
96 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
100 case shards::Hexahedron<>::key:
101 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 3), std::invalid_argument,
102 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
104 std::vector< Teuchos::RCP< Cubature<Scalar,ArrayPoint,ArrayWeight> > > lineCubs(3);
112 case shards::Wedge<>::key:
113 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 2), std::invalid_argument,
114 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.")
116 std::vector< Teuchos::RCP< Cubature<Scalar,ArrayPoint,ArrayWeight> > > miscCubs(2);
123 case shards::Pyramid<>::key:
124 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 3), std::invalid_argument,
125 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
127 std::vector< Teuchos::RCP< Cubature<Scalar,ArrayPoint,ArrayWeight> > > lineCubs(3);
136 TEUCHOS_TEST_FOR_EXCEPTION( ( (cellTopology.getBaseCellTopologyData()->key != shards::Line<>::key) &&
137 (cellTopology.getBaseCellTopologyData()->key != shards::Triangle<>::key) &&
138 (cellTopology.getBaseCellTopologyData()->key != shards::Quadrilateral<>::key) &&
139 (cellTopology.getBaseCellTopologyData()->key != shards::Tetrahedron<>::key) &&
140 (cellTopology.getBaseCellTopologyData()->key != shards::Hexahedron<>::key) &&
141 (cellTopology.getBaseCellTopologyData()->key != shards::Pyramid<>::key) &&
142 (cellTopology.getBaseCellTopologyData()->key != shards::Wedge<>::key) ),
143 std::invalid_argument,
144 ">>> ERROR (DefaultCubatureFactory): Invalid cell topology prevents cubature creation.");
153 template<
class Scalar,
class ArrayPo
int,
class ArrayWeight>
155 const shards::CellTopology & cellTopology,
int degree) {
156 std::vector<int> d(3);
157 d[0] = degree; d[1] = degree; d[2] = degree;
158 return create(cellTopology, d);
162 template<
class Scalar,
class ArrayPo
int,
class ArrayWeight>
164 const ArrayPoint& cellVertices,
Defines Gauss integration rules on a line.
Defines direct integration rules on a tetrahedron.
Defines tensor-product cubature (integration) rules in Intrepid.
Defines direct integration rules on a triangle.
Teuchos::RCP< Cubature< Scalar, ArrayPoint, ArrayWeight > > create(const shards::CellTopology &cellTopology, const std::vector< int > °ree)
Factory method.
Defines tensor-product cubature (integration) rules in Intrepid.
Defines GaussJacobi20 integration rules on a line.