13 #include "Teuchos_Assert.hpp"
14 #include "Phalanx_DataLayout_MDALayout.hpp"
15 #include "Intrepid2_DefaultCubatureFactory.hpp"
26 setup(ptName,np,cell_data);
32 const int num_points_per_cell,
34 const int num_points_per_face,
37 setup(point_rule_name, num_cells, num_points_per_cell, num_faces, num_points_per_face, cell_topology);
48 setup(description.
getType(), num_cells, num_points_per_cell, 0, 0, cell_topology);
52 setup(
const std::string & ptName,
61 _num_points_per_face = -1;
65 "PointRule::setup - Base topology from cell_data cannot be null!");
67 "PointRule::setup - Spatial dimension from cell_data does not match the cell topology.");
70 "PointRule::setup - Failed to allocate cell topology!");
73 if(cell_data.
isSide() && spatial_dimension==1) {
78 side_topology = getSideTopology(cell_data);
79 if (side_topology!=Teuchos::null)
80 side = cell_data.
side();
84 "Failed to allocate side topology!");
91 rcp(
new MDALayout<Cell,IP>(workset_size,num_points));
94 rcp(
new MDALayout<Cell,IP,Dim>(workset_size, num_points,
98 rcp(
new MDALayout<Cell,IP,Dim,Dim>(workset_size, num_points,
103 rcp(
new MDALayout<Cell,IP,Dim>(workset_size, num_points,3));
105 rcp(
new MDALayout<Cell,IP,Dim,Dim>(workset_size, num_points,3,3));
111 setup(
const std::string & point_rule_name,
113 const int num_points_per_cell,
115 const int num_points_per_face,
119 topology = cell_topology;
121 "PointRule::setup - Cell topology cannot be null.");
123 point_name = point_rule_name;
124 num_points = num_points_per_cell;
125 spatial_dimension = cell_topology->getDimension();
126 workset_size = num_cells;
127 _num_faces = num_faces;
128 _num_points_per_face = num_points_per_face;
157 if (cell_data.
isSide() && spatial_dimension>1) {
158 int side = cell_data.
side();
161 std::runtime_error,
"Error - local side "
162 << side <<
" is not in range (0->" << topology->getSideCount()-1
163 <<
") of topologic entity!");
165 sideTopo =
Teuchos::rcp(
new shards::CellTopology(topology->getCellTopologyData(topology->getDimension()-1,side)));
167 else if(cell_data.
isSide() && spatial_dimension==1) {
168 sideTopo =
Teuchos::rcp(
new shards::CellTopology(shards::getCellTopologyData<shards::Node>()));
229 os <<
"panzer::PointRule ( "
230 <<
"Name = " << getName()
231 <<
", Dimension = " << spatial_dimension
232 <<
", Workset Size = " << workset_size
233 <<
", Num Points = " << num_points
234 <<
", Side = " << side
int baseCellDimension() const
Dimension of the base cell. NOT the dimension of the local side, even if the side() method returns tr...
void setup(const std::string &ptName, int np, const panzer::CellData &cell_data)
bool is_null(const std::shared_ptr< T > &p)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::RCP< const shards::CellTopology > getCellTopology() const
Get CellTopology for the base cell.
Teuchos::RCP< PHX::DataLayout > getCellDataLayout() const
virtual int numPoints(const shards::CellTopology &topo) const =0
Get the points for a particular topology.
const std::string & getName() const
std::size_t numCells() const
virtual void print(std::ostream &os)
print information about the integration rule
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Data for determining cell topology and dimensionality.
Teuchos::RCP< PHX::DataLayout > getFacePointDataLayout() const
Teuchos::RCP< PHX::DataLayout > getFaceDataLayout() const
const PointGenerator & getGenerator() const
const std::string & getType() const
Get unique string associated with the type of point descriptor. This will be used generate a hash to ...
static Teuchos::RCP< shards::CellTopology > getSideTopology(const CellData &cell_data)
#define TEUCHOS_ASSERT(assertion_test)
Teuchos::RCP< PHX::DataLayout > getCellPointDataLayout() const