43 #ifndef PANZER_EVALUATOR_TENSOR_TO_STD_VECTOR_DECL_HPP
44 #define PANZER_EVALUATOR_TENSOR_TO_STD_VECTOR_DECL_HPP
49 #include "Phalanx_Evaluator_Macros.hpp"
50 #include "Phalanx_MDField.hpp"
64 template<
typename EvalT,
typename Traits>
67 public PHX::EvaluatorWithBaseImpl<Traits>,
68 public PHX::EvaluatorDerived<EvalT, Traits>
104 template <
typename EvalT,
typename Traits>
106 const std::string & vectorPrefix,
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 vectorNames->push_back(vectorPrefix+postfix[i]);
120 input.
set(
"Tensor Name", tensorName);
122 input.
set(
"Data Layout Tensor",rcp_const_cast<PHX::DataLayout>(tensorLayout));
123 input.
set(
"Data Layout Vector",rcp_const_cast<PHX::DataLayout>(vectorLayout));
139 template <
typename EvalT,
typename Traits>
141 const std::vector<std::string> & postfix,
145 return tensorToStdVectorEvaluator<EvalT,Traits>(tensorName,tensorName,postfix,tensorLayout,vectorLayout);
RCP< const T > getConst() const
std::vector< PHX::MDField< ScalarT, Cell, Point, Dim > > vector_fields
Vector (to be filled)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
TensorToStdVector(const Teuchos::ParameterList &p)
PHX::MDField< const ScalarT, Cell, Point, Dim, Dim > tensor_field
Tensor (to be distributed to vector)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< PHX::Evaluator< Traits > > tensorToStdVectorEvaluator(const std::string &tensorName, const std::string &vectorPrefix, const std::vector< std::string > &postfix, const Teuchos::RCP< const PHX::DataLayout > &tensorLayout, const Teuchos::RCP< const PHX::DataLayout > &vectorLayout)
typename EvalT::ScalarT ScalarT
Transform at Tensor to a std::vector of PHX-vectors.
void evaluateFields(typename Traits::EvalData d)