43 #ifndef PANZER_EVALUATOR_VECTOR_TO_SCALAR_DECL_HPP
44 #define PANZER_EVALUATOR_VECTOR_TO_SCALAR_DECL_HPP
48 #include "Phalanx_Evaluator_Macros.hpp"
49 #include "Phalanx_MDField.hpp"
54 template<
typename EvalT,
typename Traits>
58 public PHX::EvaluatorDerived<EvalT, Traits>
82 const std::vector<PHX::Tag<ScalarT>> & output);
99 template <
typename EvalT,
typename Traits>
101 const std::string & scalarPrefix,
102 const std::vector<std::string> & postfix,
108 using Teuchos::rcp_const_cast;
111 for(std::size_t i=0;i<postfix.size();i++)
112 scalarNames->push_back(scalarPrefix+postfix[i]);
115 input.
set(
"Vector Name",vectorName);
117 input.
set(
"Data Layout Vector",rcp_const_cast<PHX::DataLayout>(vectorLayout));
118 input.
set(
"Data Layout Scalar",rcp_const_cast<PHX::DataLayout>(scalarLayout));
134 template <
typename EvalT,
typename Traits>
136 const std::vector<std::string> & postfix,
140 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 const &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