46#include "Teuchos_Assert.hpp"
47#include "Phalanx_DataLayout_MDALayout.hpp"
48#include "Intrepid2_DefaultCubatureFactory.hpp"
59 setup(ptName,np,cell_data);
63PointRule(
const std::string & point_rule_name,
65 const int num_points_per_cell,
67 const int num_points_per_face,
68 const Teuchos::RCP<const shards::CellTopology> & cell_topology)
70 setup(point_rule_name, num_cells, num_points_per_cell, num_faces, num_points_per_face, cell_topology);
77 const Teuchos::RCP<const shards::CellTopology> & cell_topology,
81 setup(description.
getType(), num_cells, num_points_per_cell, 0, 0, cell_topology);
85setup(
const std::string & ptName,
97 TEUCHOS_TEST_FOR_EXCEPTION(
topology==Teuchos::null,std::runtime_error,
98 "PointRule::setup - Base topology from cell_data cannot be null!");
100 "PointRule::setup - Spatial dimension from cell_data does not match the cell topology.");
102 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(
topology), std::runtime_error,
103 "PointRule::setup - Failed to allocate cell topology!");
117 "Failed to allocate side topology!");
121 using PHX::MDALayout;
144setup(
const std::string & point_rule_name,
146 const int num_points_per_cell,
148 const int num_points_per_face,
149 const Teuchos::RCP<const shards::CellTopology> & cell_topology)
153 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(
topology),std::runtime_error,
154 "PointRule::setup - Cell topology cannot be null.");
186 Teuchos::RCP<shards::CellTopology> sideTopo;
193 TEUCHOS_TEST_FOR_EXCEPTION( (
side >=
static_cast<int>(
topology->getSideCount())),
194 std::runtime_error,
"Error - local side "
195 <<
side <<
" is not in range (0->" <<
topology->getSideCount()-1
196 <<
") of topologic entity!");
198 sideTopo = Teuchos::rcp(
new shards::CellTopology(
topology->getCellTopologyData(
topology->getDimension()-1,
side)));
201 sideTopo = Teuchos::rcp(
new shards::CellTopology(shards::getCellTopologyData<shards::Node>()));
207Teuchos::RCP<PHX::DataLayout>
209{
return Teuchos::rcp(
new PHX::MDALayout<Cell>(
workset_size));}
211Teuchos::RCP<PHX::DataLayout>
213{
return Teuchos::rcp(
new PHX::MDALayout<Cell,Dim>(
workset_size, dim0));}
215Teuchos::RCP<PHX::DataLayout>
217{
return Teuchos::rcp(
new PHX::MDALayout<Cell,Dim,Dim>(
workset_size, dim0, dim1));}
220Teuchos::RCP<PHX::DataLayout>
224Teuchos::RCP<PHX::DataLayout>
228Teuchos::RCP<PHX::DataLayout>
233Teuchos::RCP<PHX::DataLayout>
235{
return Teuchos::rcp(
new PHX::MDALayout<Face>(
_num_faces));}
237Teuchos::RCP<PHX::DataLayout>
239{
return Teuchos::rcp(
new PHX::MDALayout<Face,Dim>(
_num_faces, dim0));}
241Teuchos::RCP<PHX::DataLayout>
243{
return Teuchos::rcp(
new PHX::MDALayout<Face,Dim,Dim>(
_num_faces, dim0, dim1));}
246Teuchos::RCP<PHX::DataLayout>
250Teuchos::RCP<PHX::DataLayout>
254Teuchos::RCP<PHX::DataLayout>
262 os <<
"panzer::PointRule ( "
267 <<
", Side = " <<
side
Data for determining cell topology and dimensionality.
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.
std::size_t numCells() 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 ...
virtual int numPoints(const shards::CellTopology &topo) const =0
Get the points for a particular topology.
Teuchos::RCP< PHX::DataLayout > getFaceDataLayout() const
Teuchos::RCP< PHX::DataLayout > getFacePointDataLayout() const
Teuchos::RCP< PHX::DataLayout > dl_vector
Data layout for vector fields.
Teuchos::RCP< PHX::DataLayout > dl_vector3
Data layout for vector fields - full (x,y,z).
Teuchos::RCP< PHX::DataLayout > dl_scalar
Data layout for scalar fields.
static Teuchos::RCP< shards::CellTopology > getSideTopology(const CellData &cell_data)
Teuchos::RCP< shards::CellTopology > side_topology
virtual void print(std::ostream &os)
print information about the integration rule
int side
Defaults to -1 if this is volume and not sideset.
void setup(const std::string &ptName, int np, const panzer::CellData &cell_data)
Teuchos::RCP< PHX::DataLayout > dl_tensor3x3
Data layout for vector fields - full ((xx,xy,xz),(yx,yy,yz),(zx,zy,zz)) (or transpose?...
Teuchos::RCP< PHX::DataLayout > getCellDataLayout() const
Teuchos::RCP< PHX::DataLayout > dl_tensor
Data layout for rank-2 tensor fields.
Teuchos::RCP< PHX::DataLayout > getCellPointDataLayout() const
Teuchos::RCP< const shards::CellTopology > topology
const std::string & getName() const