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"
35template<
typename EvalT,
typename Traits>
40 const Teuchos::RCP<ExtremeValueScatterBase> & extremeValueScatter)
51 RCP<PHX::DataLayout> dl_dummy = rcp(
new PHX::MDALayout<panzer::Dummy>(0));
56 RCP<PHX::DataLayout> dl_cell = rcp(
new PHX::MDALayout<panzer::Cell>(cd.
numCells()));
60 std::string n =
"Extreme Value Response Scatter: " + name;
64template<
typename EvalT,
typename Traits>
67 const std::string & responseName,
70 const Teuchos::RCP<ExtremeValueScatterBase> & extremeValueScatter)
81 RCP<PHX::DataLayout> dl_dummy = rcp(
new PHX::MDALayout<panzer::Dummy>(0));
86 RCP<PHX::DataLayout> dl_cell = rcp(
new PHX::MDALayout<panzer::Cell>(cd.
numCells()));
87 cellExtremeValue_ = PHX::MDField<const ScalarT,panzer::Cell>(integrandName,dl_cell);
90 std::string n =
"Extreme Value Response Scatter: " + responseName;
94template<
typename EvalT,
typename Traits>
99 responseObj_ = Teuchos::rcp_dynamic_cast<Response_ExtremeValue<EvalT> >(
104template<
typename EvalT,
typename Traits>
123 using Teuchos::rcp_dynamic_cast;
124 using Thyra::SpmdVectorBase;
129 Teuchos::ArrayRCP<double> local_dgdx;
130 RCP<SpmdVectorBase<double> > dgdx = rcp_dynamic_cast<SpmdVectorBase<double> >(
responseObj_->getGhostedVector());
131 dgdx->getNonconstLocalData(ptrFromRef(local_dgdx));
132 TEUCHOS_ASSERT(!local_dgdx.is_null());
Data for determining cell topology and dimensionality.
std::size_t numCells() const
WorksetDetailsAccessor wda
static std::string buildLookupName(const std::string &responseName)
std::string responseName_
void preEvaluate(typename Traits::PreEvalData d)
PHX::MDField< const ScalarT, panzer::Cell > cellExtremeValue_
Teuchos::RCP< ExtremeValueScatterBase > scatterObj_
Teuchos::RCP< Response_ExtremeValue< EvalT > > responseObj_
void evaluateFields(typename Traits::EvalData d)
Teuchos::RCP< PHX::FieldTag > scatterHolder_
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.
int num_cells
DEPRECATED - use: numCells().
Teuchos::RCP< GlobalEvaluationDataContainer > gedc
Container of global (non-cell-local) data, e.g. distributed vectors needed by gather/scatter evaluato...
const PED & PreEvalData
Data type passed to PHX::Evaluator::preEvaluate().
const panzer::Workset & EvalData
Data type passed to PHX::Evaluator::evaluateFields(): a single workset holding the cell data for one ...