41 const Teuchos::RCP<STK_Interface> mesh,
42 const Teuchos::RCP<const panzer::PointRule> & pointRule,
43 const std::vector<std::string> & names,
44 const std::vector<double> & scaling)
55 TEUCHOS_ASSERT(pointRule->num_points==1);
60 for (std::size_t fd = 0; fd < names.size(); ++fd) {
62 PHX::MDField<const ScalarT,Cell,IP,Dim>(
names_[fd]+
"_"+pointRule->getName(),pointRule->dl_vector);
67 PHX::Tag<ScalarT> scatterHolder(scatterName,Teuchos::rcp(
new PHX::MDALayout<panzer::Dummy>(0)));
68 this->addEvaluatedField(scatterHolder);
70 this->setName(scatterName+
": STK-Scatter Vector Fields");
88 std::vector<std::string> dimStrings(3);
94 const std::vector<std::size_t> & localCellIds = this->
wda(workset).cell_local_ids;
95 std::string blockId = this->
wda(workset).block_id;
98 for(std::size_t fieldIndex=0; fieldIndex<
scatterFields_.size();fieldIndex++) {
99 PHX::MDField<const ScalarT,panzer::Cell,panzer::IP,panzer::Dim> & field =
scatterFields_[fieldIndex];
100 std::string fieldName =
names_[fieldIndex]+dimStrings[d];
102 PHX::MDField<double,panzer::Cell,panzer::NODE> cellValue
108 auto cellValue_v = cellValue.get_static_view();
109 auto field_v = field.get_static_view();
110 Kokkos::parallel_for(field_v.extent(0), KOKKOS_LAMBDA (
int i) {
111 cellValue_v(i,0) = field_v(i,0,d);
116 mesh_->setCellFieldData(fieldName,blockId,localCellIds,cellValue.get_view(),scaling);