132 cubature_degree = in_cubature_degree;
136 std::stringstream ss;
137 ss <<
"CubaturePoints (Degree=" << cubature_degree;
142 if(cell_data.
isSide() && spatialDimension==1) {
150 Teuchos::RCP<shards::CellTopology> sideTopo = getSideTopology(cell_data);
152 Intrepid2::DefaultCubatureFactory cubature_factory;
153 Teuchos::RCP<Intrepid2::Cubature<PHX::Device::execution_space,double,double>> intrepid_cubature;
156 if (Teuchos::is_null(sideTopo)) {
158 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(topo, cubature_degree);
162 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*sideTopo, cubature_degree);
171 const int cell_dim = cell_topology->getDimension();
172 const int subcell_dim = cell_dim-1;
173 const int num_faces_per_cell = cell_topology->getSubcellCount(subcell_dim);
177 std::string point_rule_name;
179 std::stringstream ss;
180 ss <<
"CubaturePoints (Degree=" << getOrder() <<
",surface)";
181 point_rule_name = ss.str();
186 const int num_points_per_cell = num_faces_per_cell;
187 const int num_points_per_face = 1;
188 PointRule::setup(point_rule_name, num_cells, num_points_per_cell, num_faces, num_points_per_face, cell_topology);
189 _point_offsets.resize(3,0);
190 _point_offsets[0] = 0;
191 _point_offsets[1] = num_points_per_face;
192 _point_offsets[2] = _point_offsets[1]+num_points_per_face;
196 Intrepid2::DefaultCubatureFactory cubature_factory;
198 _point_offsets.resize(num_faces_per_cell+1,0);
199 int test_face_size = -1;
200 for(
int subcell_index=0; subcell_index<num_faces_per_cell; ++subcell_index){
201 Teuchos::RCP<shards::CellTopology> face_topology = Teuchos::rcp(
new shards::CellTopology(cell_topology->getCellTopologyData(subcell_dim,subcell_index)));
202 const auto & intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*face_topology, getOrder());
203 const int num_face_points = intrepid_cubature->getNumPoints();
204 _point_offsets[subcell_index+1] = _point_offsets[subcell_index] + num_face_points;
207 if(test_face_size==-1){
208 test_face_size = num_face_points;
210 TEUCHOS_ASSERT(num_face_points == test_face_size);
214 const int num_points_per_cell = _point_offsets.back();
215 const int num_points_per_face = _point_offsets[1];
217 PointRule::setup(point_rule_name, num_cells, num_points_per_cell, num_faces, num_points_per_face, cell_topology);
225 cv_type = in_cv_type;
226 if (cv_type ==
"volume") {
227 cubature_degree = 75;
229 if (cv_type ==
"side") {
230 cubature_degree = 85;
232 if (cv_type ==
"boundary") {
233 cubature_degree = 95;
238 std::stringstream ss;
239 ss <<
"CubaturePoints ControlVol (Index=" << cubature_degree;
243 Teuchos::RCP<Intrepid2::Cubature<PHX::Device::execution_space,double,double> > intrepid_cubature;
245 int tmp_num_points = 0;
246 if (cv_type ==
"volume") {
248 intrepid_cubature = Teuchos::rcp(
new Intrepid2::CubatureControlVolume<PHX::Device::execution_space,double,double>(topo));
249 tmp_num_points = intrepid_cubature->getNumPoints();
251 else if (cv_type ==
"side") {
253 intrepid_cubature = Teuchos::rcp(
new Intrepid2::CubatureControlVolumeSide<PHX::Device::execution_space,double,double>(topo));
254 tmp_num_points = intrepid_cubature->getNumPoints();
256 else if (cv_type ==
"boundary") {
258 intrepid_cubature = Teuchos::rcp(
new Intrepid2::CubatureControlVolumeBoundary<PHX::Device::execution_space,double,double>(topo,cell_data.
side()));
259 tmp_num_points = intrepid_cubature->getNumPoints();
292 Teuchos::RCP< Intrepid2::Cubature<PHX::Device::execution_space,double,double> > intrepid_cubature;
293 Intrepid2::DefaultCubatureFactory cubature_factory;
296 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*(topology),cubature_degree);
298 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*(side_topology),cubature_degree);
300 int num_ip = intrepid_cubature->getNumPoints();
301 Kokkos::DynRankView<double,PHX::Device> cub_weights(
"cub_weights",num_ip);
305 cub_points = Kokkos::DynRankView<double,PHX::Device>(
"cub_points", num_ip, topology->getDimension());
306 intrepid_cubature->getCubature(cub_points, cub_weights);
309 cub_points = Kokkos::DynRankView<double,PHX::Device>(
"cub_points", num_ip, side_topology->getDimension());
310 intrepid_cubature->getCubature(cub_points, cub_weights);