11 #ifndef PANZER_EVALUATOR_SUM_HPP
12 #define PANZER_EVALUATOR_SUM_HPP
14 #include "Phalanx_Evaluator_Macros.hpp"
15 #include "Phalanx_MDField.hpp"
34 template<
typename EvalT,
typename Traits>
68 template<
unsigned int RANK>
71 template<
unsigned int RANK>
72 KOKKOS_INLINE_FUNCTION
81 template<
typename EvalT,
typename TRAITS,
typename Tag0,
typename Tag1=
void,
typename Tag2=
void>
91 template<
typename EvalT,
typename TRAITS,
typename Tag0>
101 std::vector< PHX::MDField<const ScalarT,Tag0> >
values;
104 template<
typename EvalT,
typename TRAITS,
typename Tag0,
typename Tag1>
121 const std::vector<double> & scalar_values,
127 struct ScalarsTag {};
128 KOKKOS_INLINE_FUNCTION
129 void operator()(
const ScalarsTag,
const unsigned c)
const;
131 struct NoScalarsTag {};
132 KOKKOS_INLINE_FUNCTION
133 void operator()(
const NoScalarsTag,
const unsigned c)
const;
139 std::vector< PHX::MDField<const ScalarT,Tag0,Tag1> >
values;
144 enum {MAX_VALUES=20};
146 PHX::View<const ScalarT**> value_views[MAX_VALUES];
171 template<
typename EvalT,
typename TRAITS,
typename Tag0,
typename Tag1,
typename Tag2>
174 const std::vector<std::string> & value_names,
Teuchos::RCP< PHX::Evaluator< TRAITS > > buildStaticSumEvaluator(const std::string &sum_name, const std::vector< std::string > &value_names, const Teuchos::RCP< PHX::DataLayout > &data_layout)
Sum(const Teuchos::ParameterList &p)
PHX::View< const double * > scalars
static const int MAX_VALUES
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
KOKKOS_INLINE_FUNCTION void operator()(PanzerSumTag< RANK >, const int &i) const
PHX::MDField< const ScalarT, Tag0, Tag1 > current_value
SumStatic(const Teuchos::ParameterList &p)
std::vector< PHX::MDField< const ScalarT, Tag0 > > values
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
PHX::View< const double * > scalars
PHX::MDField< ScalarT > sum
virtual void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &vm)=0
PHX::MDField< ScalarT, Tag0, Tag1 > sum
void evaluateFields(typename Traits::EvalData d)
typename EvalT::ScalarT ScalarT
std::size_t cell_data_size
void evaluateFields(typename TRAITS::EvalData d)
std::vector< PHX::MDField< const ScalarT, Tag0, Tag1 > > values
PHX::MDField< const ScalarT > values[MAX_VALUES]
PHX::MDField< ScalarT, Tag0 > sum