46 #include "Teuchos_Assert.hpp" 47 #include "Phalanx_DataLayout_MDALayout.hpp" 48 #include "Intrepid2_DefaultCubatureFactory.hpp" 58 setup(ptName,np,cell_data);
62 setup(
const std::string & ptName,
73 "PointRule::setup - Base topology from cell_data cannot be null!");
75 "PointRule::setup - Spatial dimension from cell_data does not match the cell topology.");
78 "PointRule::setup - Failed to allocate cell topology!");
81 if(cell_data.
isSide() && spatial_dimension==1) {
86 side_topology = getSideTopology(cell_data);
87 if (side_topology!=Teuchos::null)
88 side = cell_data.
side();
92 "Failed to allocate side topology!");
99 rcp(
new MDALayout<Cell,IP>(workset_size,num_points));
102 rcp(
new MDALayout<Cell,IP,Dim>(workset_size, num_points,
106 rcp(
new MDALayout<Cell,IP,Dim,Dim>(workset_size, num_points,
111 rcp(
new MDALayout<Cell,IP,Dim>(workset_size, num_points,3));
113 rcp(
new MDALayout<Cell,IP,Dim,Dim>(workset_size, num_points,3,3));
133 if (cell_data.
isSide() && spatial_dimension>1) {
134 int side = cell_data.
side();
137 std::runtime_error,
"Error - local side " 138 << side <<
" is not in range (0->" << topology->getSideCount()-1
139 <<
") of topologic entity!");
141 sideTopo =
Teuchos::rcp(
new shards::CellTopology(topology->getCellTopologyData(topology->getDimension()-1,side)));
143 else if(cell_data.
isSide() && spatial_dimension==1) {
144 sideTopo =
Teuchos::rcp(
new shards::CellTopology(shards::getCellTopologyData<shards::Node>()));
152 os <<
"panzer::PointRule ( " 153 <<
"Name = " << getName()
154 <<
", Dimension = " << spatial_dimension
155 <<
", Workset Size = " << workset_size
156 <<
", Num Points = " << num_points
157 <<
", Side = " << side
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)
int baseCellDimension() const
Dimension of the base cell. NOT the dimension of the local side, even if the side() method returns tr...
Teuchos::RCP< const shards::CellTopology > getCellTopology() const
Get CellTopology for the base cell.
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.
static Teuchos::RCP< shards::CellTopology > getSideTopology(const CellData &cell_data)
const std::string & getName() const
#define TEUCHOS_ASSERT(assertion_test)
std::size_t numCells() const