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.");
94 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 1), std::invalid_argument,
95 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
99 case shards::Hexahedron<>::key:
100 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 3), std::invalid_argument,
101 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.");
103 std::vector< Teuchos::RCP< Cubature<Scalar,ArrayPoint,ArrayWeight> > > lineCubs(3);
111 case shards::Wedge<>::key:
112 TEUCHOS_TEST_FOR_EXCEPTION( (degree.size() < 2), std::invalid_argument,
113 ">>> ERROR (DefaultCubatureFactory): Provided degree array is of insufficient length.")
115 std::vector< Teuchos::RCP< Cubature<Scalar,ArrayPoint,ArrayWeight> > > miscCubs(2);
123 TEUCHOS_TEST_FOR_EXCEPTION( ( (cellTopology.getBaseCellTopologyData()->key != shards::Line<>::key) &&
124 (cellTopology.getBaseCellTopologyData()->key != shards::Triangle<>::key) &&
125 (cellTopology.getBaseCellTopologyData()->key != shards::Quadrilateral<>::key) &&
126 (cellTopology.getBaseCellTopologyData()->key != shards::Tetrahedron<>::key) &&
127 (cellTopology.getBaseCellTopologyData()->key != shards::Hexahedron<>::key) &&
128 (cellTopology.getBaseCellTopologyData()->key != shards::Wedge<>::key) ),
129 std::invalid_argument,
130 ">>> ERROR (DefaultCubatureFactory): Invalid cell topology prevents cubature creation.");
139 template<
class Scalar,
class ArrayPo
int,
class ArrayWeight>
141 const shards::CellTopology & cellTopology,
int degree) {
142 std::vector<int> d(3);
143 d[0] = degree; d[1] = degree; d[2] = degree;
144 return create(cellTopology, d);
148 template<
class Scalar,
class ArrayPo
int,
class ArrayWeight>
150 const ArrayPoint& cellVertices,
Defines Gauss integration rules on a line.
Defines direct integration rules on a tetrahedron.
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 integration rules for the composite tetrahedron.
Defines tensor-product cubature (integration) rules in Intrepid.