46 #include "Teuchos_Assert.hpp" 47 #include "Phalanx_DataLayout_MDALayout.hpp" 48 #include "Intrepid2_DefaultCubatureFactory.hpp" 49 #include "Intrepid2_CubatureControlVolume.hpp" 50 #include "Intrepid2_CubatureControlVolumeSide.hpp" 51 #include "Intrepid2_CubatureControlVolumeBoundary.hpp" 59 setup(in_cubature_degree,cell_data);
71 cubature_degree = in_cubature_degree;
76 ss <<
"CubaturePoints (Degree=" << cubature_degree;
81 if(cell_data.
isSide() && spatialDimension==1) {
91 Intrepid2::DefaultCubatureFactory<double,Kokkos::DynRankView<double,PHX::Device> > cubature_factory;
97 intrepid_cubature = cubature_factory.create(*topo, cubature_degree);
101 intrepid_cubature = cubature_factory.create(*sideTopo, cubature_degree);
111 cv_type = in_cv_type;
112 if (cv_type ==
"volume") {
113 cubature_degree = 75;
115 if (cv_type ==
"side") {
116 cubature_degree = 85;
118 if (cv_type ==
"boundary") {
119 cubature_degree = 95;
124 std::stringstream ss;
125 ss <<
"CubaturePoints ControlVol (Index=" << cubature_degree;
132 if (cv_type ==
"volume") {
134 intrepid_cubature =
Teuchos::rcp(
new Intrepid2::CubatureControlVolume<
double,Kokkos::DynRankView<double,PHX::Device>,Kokkos::DynRankView<double,PHX::Device> >(topo));
135 num_points = intrepid_cubature->getNumPoints();
137 else if (cv_type ==
"side") {
139 intrepid_cubature =
Teuchos::rcp(
new Intrepid2::CubatureControlVolumeSide<
double,Kokkos::DynRankView<double,PHX::Device>,Kokkos::DynRankView<double,PHX::Device> >(topo));
140 num_points = intrepid_cubature->getNumPoints();
142 else if (cv_type ==
"boundary") {
145 Intrepid2::CubatureControlVolumeBoundary<
double,Kokkos::DynRankView<double,PHX::Device>,Kokkos::DynRankView<double,PHX::Device> >(topo,cell_data.
side()));
146 num_points = intrepid_cubature->getNumPoints();
153 {
return cubature_degree; }
157 os <<
"IntegrationRule ( " 158 <<
"Name = " << getName()
159 <<
", Degree = " << cubature_degree
160 <<
", Dimension = " << spatial_dimension
161 <<
", Workset Size = " << workset_size
162 <<
", Num Points = " << num_points
163 <<
", Side = " << side
171 Intrepid2::DefaultCubatureFactory<double,Kokkos::DynRankView<double,PHX::Device> > cubature_factory;
174 intrepid_cubature = cubature_factory.create(*(topology),cubature_degree);
176 intrepid_cubature = cubature_factory.create(*(side_topology),cubature_degree);
178 int num_ip = intrepid_cubature->getNumPoints();
179 Kokkos::DynRankView<double,PHX::Device> cub_weights(
"cub_weights",
num_ip);
183 cub_points = Kokkos::DynRankView<double,PHX::Device>(
"cub_points",
num_ip, topology->getDimension());
184 intrepid_cubature->getCubature(cub_points, cub_weights);
187 cub_points = Kokkos::DynRankView<double,PHX::Device>(
"cub_points",
num_ip, side_topology->getDimension());
188 intrepid_cubature->getCubature(cub_points, cub_weights);
void setup(const std::string &ptName, int np, const panzer::CellData &cell_data)
bool is_null(const std::shared_ptr< T > &p)
void referenceCoordinates(Kokkos::DynRankView< double, PHX::Device > &container)
Construct an array containing the reference coordinates.
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.
void setup(int cubature_degree, const panzer::CellData &cell_data)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Data for determining cell topology and dimensionality.
void setup_cv(const panzer::CellData &cell_data, std::string cv_type)
virtual void print(std::ostream &os)
print information about the integration rule
int order() const
Returns the order of integration (cubature degree in intrepid lingo)
IntegrationRule(int cubature_degree, const panzer::CellData &cell_data)
if side = -1 then we use the cell volume integration rule.