11 #ifndef PANZER_MULTIVARIATE_PARAMETER_IMPL_HPP
12 #define PANZER_MULTIVARIATE_PARAMETER_IMPL_HPP
14 #include "PanzerDiscFE_config.hpp"
25 template<
typename EvalT,
typename TRAITS>
29 const std::string field_name,
34 this->addEvaluatedField(target_field);
36 param.resize(num_param);
37 for (
int i=0; i<num_param; ++i) {
39 ss << parameter_name <<
"_" << i;
40 param[i] = panzer::createAndRegisterScalarParameter<EvalT>(
46 std::string n =
"Multi-variate Parameter Evaluator";
51 template<
typename EvalT,
typename TRAITS>
56 const int num_param = param.size();
57 for (
int i=0; i<num_param; ++i)
58 sum += param[i]->getValue();
60 for (index_t cell = 0; cell < workset.num_cells; ++cell) {
62 pt < target_field.extent(1); ++pt) {
63 target_field(cell,pt) = sum;
void evaluateFields(typename TRAITS::EvalData ud)
MultiVariateParameter(const std::string parameter_name, const int num_param, const std::string field_name, const Teuchos::RCP< PHX::DataLayout > &data_layout, panzer::ParamLib ¶m_lib)
Sacado::ScalarParameterLibrary< panzer::EvaluationTraits > ParamLib