11 #ifndef PANZER_GATHER_INTEGRATION_COORDINATES_IMPL_HPP
12 #define PANZER_GATHER_INTEGRATION_COORDINATES_IMPL_HPP
14 #include "Teuchos_Assert.hpp"
15 #include "Phalanx_DataLayout.hpp"
20 #include "Teuchos_FancyOStream.hpp"
22 template<
typename EvalT,
typename TRAITS>
28 ss <<
"IR_" << degree <<
" IntegrationCoordinates";
32 template<
typename EvalT,
typename TRAITS>
40 this->addEvaluatedField(quadCoordinates_);
41 this->addUnsharedField(Teuchos::rcp_const_cast<PHX::FieldTag>(quadCoordinates_.fieldTagPtr()));
43 this->setName(
"GatherIntegrationCoordinates: "+fieldName(quadDegree_));
47 template<
typename EvalT,
typename TRAITS>
54 Kokkos::deep_copy(quadCoordinates_.get_static_view(),0.0);
58 template<
typename EvalT,
typename TRAITS>
65 auto d_quadCoordinates = quadCoordinates_.get_static_view();
68 Kokkos::MDRangePolicy<PHX::Device,Kokkos::Rank<3>> policy({0,0,0},{int(workset.num_cells),s_ip_coordinates.extent_int(1),s_ip_coordinates.extent_int(2)});
69 Kokkos::parallel_for(
"GatherIntegrationCoords", policy, KOKKOS_LAMBDA (
const int i,
const int j,
const int k) {
70 auto s_ip_coordinates_tmp = s_ip_coordinates;
71 auto d_quadCoordinates_tmp = d_quadCoordinates;
72 if constexpr(Sacado::IsADType<typename EvalT::ScalarT>::value) {
73 d_quadCoordinates_tmp(i,j,k).val() = s_ip_coordinates_tmp(i,j,k);
76 d_quadCoordinates_tmp(i,j,k) = s_ip_coordinates_tmp(i,j,k);
std::vector< int >::size_type getIntegrationRuleIndex(int ir_degree, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
void evaluateFields(typename TRAITS::EvalData d)
Array_CellIPDim ip_coordinates
KOKKOS_FORCEINLINE_FUNCTION array_type get_static_view()
GatherIntegrationCoordinates()
Teuchos::RCP< PHX::DataLayout > dl_vector
Data layout for vector fields.
static std::string fieldName(int degree)
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)