11 #ifndef PANZER_RESPONSE_SCATTER_EVALUATOR_IPCoordinates_IMPL_HPP
12 #define PANZER_RESPONSE_SCATTER_EVALUATOR_IPCoordinates_IMPL_HPP
17 #include "PanzerDiscFE_config.hpp"
19 #include "Phalanx_Evaluator_Macros.hpp"
20 #include "Phalanx_MDField.hpp"
21 #include "Phalanx_DataLayout_MDALayout.hpp"
33 template<
typename EvalT,
typename Traits>
37 : responseName_(name), ir_order_(ir_order)
49 std::string n =
"IPCoordinates Response Scatter: " + name;
53 template<
typename EvalT,
typename Traits>
63 template<
typename EvalT,
typename Traits>
71 template<
typename EvalT,
typename Traits>
78 if (tmpCoords_.size() != Teuchos::as<std::size_t>(iv.
ip_coordinates.extent(2))) {
80 for(std::size_t dim=0;dim<tmpCoords_.size();dim++)
81 tmpCoords_[dim].clear();
84 auto ip_coordinates_h = Kokkos::create_mirror_view(PHX::as_view(iv.
ip_coordinates));
85 Kokkos::deep_copy(ip_coordinates_h, PHX::as_view(iv.
ip_coordinates));
91 for (index_t cell = 0; cell < workset.
num_cells; ++cell)
93 tmpCoords_[dim].push_back(ip_coordinates_h(static_cast<int>(cell),ip,dim));
97 template<
typename EvalT,
typename Traits>
101 std::vector<panzer::Traits::Residual::ScalarT> & coords = *responseObj_->getNonconstCoords();
104 for (std::size_t dim = 0; dim < tmpCoords_.size(); ++dim) {
105 for (
typename std::vector<ScalarT>::const_iterator x=tmpCoords_[dim].begin(); x != tmpCoords_[dim].end(); ++ x)
106 coords.push_back(Sacado::scalarValue(*x));
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
Teuchos::RCP< GlobalEvaluationDataContainer > gedc
int num_cells
DEPRECATED - use: numCells()
static std::string buildLookupName(const std::string &responseName)
ResponseScatterEvaluator_IPCoordinates(const std::string &name, int ir_order)
A constructor with concrete arguments instead of a parameter list.
std::vector< int >::size_type getIntegrationRuleIndex(int ir_degree, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
void evaluateFields(typename Traits::EvalData d)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Array_CellIPDim ip_coordinates
void postEvaluate(typename Traits::PostEvalData d)
void preEvaluate(typename Traits::PreEvalData d)
Teuchos::RCP< const std::vector< panzer::Workset > > worksets_
Teuchos::RCP< PHX::FieldTag > scatterHolder_