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>
87 const std::vector<PHX::Tag<ScalarT>> & output);
104 template <
typename EvalT,
typename Traits>
106 const std::string & scalarPrefix,
107 const std::vector<std::string> & postfix,
113 using Teuchos::rcp_const_cast;
116 for(std::size_t i=0;i<postfix.size();i++)
117 scalarNames->push_back(scalarPrefix+postfix[i]);
120 input.
set(
"Vector Name",vectorName);
122 input.
set(
"Data Layout Vector",rcp_const_cast<PHX::DataLayout>(vectorLayout));
123 input.
set(
"Data Layout Scalar",rcp_const_cast<PHX::DataLayout>(scalarLayout));
139 template <
typename EvalT,
typename Traits>
141 const std::vector<std::string> & postfix,
145 return vectorToScalarEvaluator<EvalT,Traits>(vectorName,vectorName,postfix,vectorLayout,scalarLayout);
RCP< const T > getConst() const
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
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