43 #ifndef PANZER_TENSOR_TO_STD_VECTOR_IMPL_HPP
44 #define PANZER_TENSOR_TO_STD_VECTOR_IMPL_HPP
51 template<
typename EvalT,
typename Traits>
62 const std::vector<std::string>& vector_names =
65 vector_fields.resize(vector_names.size());
66 for (std::size_t i=0; i < vector_names.size(); ++i)
68 PHX::MDField<ScalarT,Cell,Point,Dim>(vector_names[i], vector_dl);
71 PHX::MDField<const ScalarT,Cell,Point,Dim,Dim>(p.
get<std::string>
72 (
"Tensor Name"), tensor_dl);
74 this->addDependentField(tensor_field);
76 for (std::size_t i=0; i < vector_fields.size(); ++i)
77 this->addEvaluatedField(vector_fields[i]);
79 std::string n =
"TensorToStdVector: " + tensor_field.fieldTag().name();
84 template<
typename EvalT,
typename Traits>
91 typedef typename PHX::MDField<ScalarT,Cell,Point,Dim>::size_type size_type;
94 for (index_t cell = 0; cell < workset.
num_cells; ++cell) {
97 for (size_type pt = 0; pt < tensor_field.extent(1); ++pt) {
100 for (std::size_t vec = 0; vec < vector_fields.size(); ++vec) {
103 for (std::size_t dim = 0; dim < tensor_field.extent(2); ++dim) {
105 vector_fields[vec](cell,pt,dim) = tensor_field(cell,pt,vec,dim);
T & get(const std::string &name, T def_value)
TensorToStdVector(const Teuchos::ParameterList &p)
void evaluateFields(typename Traits::EvalData d)