11 #ifndef PANZER_RESPONSE_SCATTER_EVALUATOR_EXTREMEVALUE_IMPL_HPP
12 #define PANZER_RESPONSE_SCATTER_EVALUATOR_EXTREMEVALUE_IMPL_HPP
17 #include "PanzerDiscFE_config.hpp"
19 #include "Phalanx_Evaluator_Macros.hpp"
20 #include "Phalanx_MDField.hpp"
21 #include "Phalanx_DataLayout_MDALayout.hpp"
27 #include "Thyra_SpmdVectorBase.hpp"
28 #include "Teuchos_ArrayRCP.hpp"
35 template<
typename EvalT,
typename Traits>
42 , scatterObj_(extremeValueScatter)
60 std::string n =
"Extreme Value Response Scatter: " + name;
64 template<
typename EvalT,
typename Traits>
67 const std::string & responseName,
71 : responseName_(responseName)
72 , scatterObj_(extremeValueScatter)
90 std::string n =
"Extreme Value Response Scatter: " + responseName;
94 template<
typename EvalT,
typename Traits>
104 template<
typename EvalT,
typename Traits>
108 auto hostField = Kokkos::create_mirror_view(cellExtremeValue_.get_view());
109 Kokkos::deep_copy(hostField, cellExtremeValue_.get_view());
112 responseObj_->value = (responseObj_->value < hostField(i)) ? hostField(i) : responseObj_->value;
114 responseObj_->value = (responseObj_->value > hostField(i)) ? hostField(i) : responseObj_->value;
123 using Teuchos::rcp_dynamic_cast;
124 using Thyra::SpmdVectorBase;
131 dgdx->getNonconstLocalData(ptrFromRef(local_dgdx));
134 scatterObj_->scatterDerivative(cellExtremeValue_,d,this->wda,local_dgdx);
Teuchos::RCP< GlobalEvaluationDataContainer > gedc
int num_cells
DEPRECATED - use: numCells()
static std::string buildLookupName(const std::string &responseName)
void preEvaluate(typename Traits::PreEvalData d)
std::size_t numCells() const
ResponseScatterEvaluator_ExtremeValue(const std::string &name, const CellData &cd, bool useMax, const Teuchos::RCP< ExtremeValueScatterBase > &functionalScatter)
A constructor with concrete arguments instead of a parameter list.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Data for determining cell topology and dimensionality.
PHX::MDField< const ScalarT, panzer::Cell > cellExtremeValue_
void evaluateFields(typename Traits::EvalData d)
Teuchos::RCP< PHX::FieldTag > scatterHolder_
#define TEUCHOS_ASSERT(assertion_test)