99 cubature_degree = in_cubature_degree;
103 std::stringstream ss;
104 ss <<
"CubaturePoints (Degree=" << cubature_degree;
109 if(cell_data.
isSide() && spatialDimension==1) {
117 Teuchos::RCP<shards::CellTopology> sideTopo = getSideTopology(cell_data);
119 Intrepid2::DefaultCubatureFactory cubature_factory;
120 Teuchos::RCP<Intrepid2::Cubature<PHX::Device::execution_space,double,double>> intrepid_cubature;
123 if (Teuchos::is_null(sideTopo)) {
125 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(topo, cubature_degree);
129 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*sideTopo, cubature_degree);
138 const int cell_dim = cell_topology->getDimension();
139 const int subcell_dim = cell_dim-1;
140 const int num_faces_per_cell = cell_topology->getSubcellCount(subcell_dim);
144 std::string point_rule_name;
146 std::stringstream ss;
147 ss <<
"CubaturePoints (Degree=" << getOrder() <<
",surface)";
148 point_rule_name = ss.str();
153 const int num_points_per_cell = num_faces_per_cell;
154 const int num_points_per_face = 1;
155 PointRule::setup(point_rule_name, num_cells, num_points_per_cell, num_faces, num_points_per_face, cell_topology);
156 _point_offsets.resize(3,0);
157 _point_offsets[0] = 0;
158 _point_offsets[1] = num_points_per_face;
159 _point_offsets[2] = _point_offsets[1]+num_points_per_face;
163 Intrepid2::DefaultCubatureFactory cubature_factory;
165 _point_offsets.resize(num_faces_per_cell+1,0);
166 int test_face_size = -1;
167 for(
int subcell_index=0; subcell_index<num_faces_per_cell; ++subcell_index){
168 Teuchos::RCP<shards::CellTopology> face_topology = Teuchos::rcp(
new shards::CellTopology(cell_topology->getCellTopologyData(subcell_dim,subcell_index)));
169 const auto & intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*face_topology, getOrder());
170 const int num_face_points = intrepid_cubature->getNumPoints();
171 _point_offsets[subcell_index+1] = _point_offsets[subcell_index] + num_face_points;
174 if(test_face_size==-1){
175 test_face_size = num_face_points;
177 TEUCHOS_ASSERT(num_face_points == test_face_size);
181 const int num_points_per_cell = _point_offsets.back();
182 const int num_points_per_face = _point_offsets[1];
184 PointRule::setup(point_rule_name, num_cells, num_points_per_cell, num_faces, num_points_per_face, cell_topology);
192 cv_type = in_cv_type;
193 if (cv_type ==
"volume") {
194 cubature_degree = 75;
196 if (cv_type ==
"side") {
197 cubature_degree = 85;
199 if (cv_type ==
"boundary") {
200 cubature_degree = 95;
205 std::stringstream ss;
206 ss <<
"CubaturePoints ControlVol (Index=" << cubature_degree;
210 Teuchos::RCP<Intrepid2::Cubature<PHX::Device::execution_space,double,double> > intrepid_cubature;
212 int tmp_num_points = 0;
213 if (cv_type ==
"volume") {
215 intrepid_cubature = Teuchos::rcp(
new Intrepid2::CubatureControlVolume<PHX::Device::execution_space,double,double>(topo));
216 tmp_num_points = intrepid_cubature->getNumPoints();
218 else if (cv_type ==
"side") {
220 intrepid_cubature = Teuchos::rcp(
new Intrepid2::CubatureControlVolumeSide<PHX::Device::execution_space,double,double>(topo));
221 tmp_num_points = intrepid_cubature->getNumPoints();
223 else if (cv_type ==
"boundary") {
225 intrepid_cubature = Teuchos::rcp(
new Intrepid2::CubatureControlVolumeBoundary<PHX::Device::execution_space,double,double>(topo,cell_data.
side()));
226 tmp_num_points = intrepid_cubature->getNumPoints();
259 Teuchos::RCP< Intrepid2::Cubature<PHX::Device::execution_space,double,double> > intrepid_cubature;
260 Intrepid2::DefaultCubatureFactory cubature_factory;
263 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*(topology),cubature_degree);
265 intrepid_cubature = cubature_factory.create<PHX::Device::execution_space,double,
double>(*(side_topology),cubature_degree);
267 int num_ip = intrepid_cubature->getNumPoints();
268 Kokkos::DynRankView<double,PHX::Device> cub_weights(
"cub_weights",num_ip);
272 cub_points = Kokkos::DynRankView<double,PHX::Device>(
"cub_points", num_ip, topology->getDimension());
273 intrepid_cubature->getCubature(cub_points, cub_weights);
276 cub_points = Kokkos::DynRankView<double,PHX::Device>(
"cub_points", num_ip, side_topology->getDimension());
277 intrepid_cubature->getCubature(cub_points, cub_weights);