43 #ifndef PANZER_RESPONSE_SCATTER_EVALUATOR_EXTREMEVALUE_IMPL_HPP
44 #define PANZER_RESPONSE_SCATTER_EVALUATOR_EXTREMEVALUE_IMPL_HPP
49 #include "PanzerDiscFE_config.hpp"
51 #include "Phalanx_Evaluator_Macros.hpp"
52 #include "Phalanx_MDField.hpp"
53 #include "Phalanx_DataLayout_MDALayout.hpp"
59 #include "Thyra_SpmdVectorBase.hpp"
60 #include "Teuchos_ArrayRCP.hpp"
67 template<
typename EvalT,
typename Traits>
74 , scatterObj_(extremeValueScatter)
92 std::string n =
"Extreme Value Response Scatter: " + name;
96 template<
typename EvalT,
typename Traits>
99 const std::string & responseName,
103 : responseName_(responseName)
104 , scatterObj_(extremeValueScatter)
119 cellExtremeValue_ = PHX::MDField<const ScalarT,panzer::Cell>(integrandName,dl_cell);
122 std::string n =
"Extreme Value Response Scatter: " + responseName;
126 template<
typename EvalT,
typename Traits>
136 template<
typename EvalT,
typename Traits>
142 responseObj_->value = (responseObj_->value < cellExtremeValue_(i)) ? cellExtremeValue_(i) : responseObj_->value;
144 responseObj_->value = (responseObj_->value > cellExtremeValue_(i)) ? cellExtremeValue_(i) : responseObj_->value;
153 using Teuchos::rcp_dynamic_cast;
154 using Thyra::SpmdVectorBase;
161 dgdx->getNonconstLocalData(ptrFromRef(local_dgdx));
164 scatterObj_->scatterDerivative(cellExtremeValue_,d,this->wda,local_dgdx);
Teuchos::RCP< GlobalEvaluationDataContainer > gedc
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)