11 #ifndef PANZER_EVALUATOR_VECTOR_TO_SCALAR_DECL_HPP
12 #define PANZER_EVALUATOR_VECTOR_TO_SCALAR_DECL_HPP
16 #include "Phalanx_Evaluator_Macros.hpp"
17 #include "Phalanx_MDField.hpp"
22 template<
typename EvalT,
typename Traits>
67 template <
typename EvalT,
typename Traits>
69 const std::string & scalarPrefix,
70 const std::vector<std::string> & postfix,
76 using Teuchos::rcp_const_cast;
79 for(std::size_t i=0;i<postfix.size();i++)
80 scalarNames->push_back(scalarPrefix+postfix[i]);
83 input.
set(
"Vector Name",vectorName);
85 input.
set(
"Data Layout Vector",rcp_const_cast<PHX::DataLayout>(vectorLayout));
86 input.
set(
"Data Layout Scalar",rcp_const_cast<PHX::DataLayout>(scalarLayout));
102 template <
typename EvalT,
typename Traits>
104 const std::vector<std::string> & postfix,
108 return vectorToScalarEvaluator<EvalT,Traits>(vectorName,vectorName,postfix,vectorLayout,scalarLayout);
RCP< const T > getConst() const
PHX::MDField< const ScalarT, Cell, Point, Dim > vector_field
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Teuchos::RCP< PHX::Evaluator< Traits > > vectorToScalarEvaluator(const std::string &vectorName, const std::string &scalarPrefix, const std::vector< std::string > &postfix, const Teuchos::RCP< const PHX::DataLayout > &vectorLayout, const Teuchos::RCP< const PHX::DataLayout > &scalarLayout)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
std::vector< PHX::MDField< ScalarT, Cell, Point > > scalar_fields
VectorToScalar(const Teuchos::ParameterList &p)
void evaluateFields(typename Traits::EvalData d)
typename EvalT::ScalarT ScalarT