11 #ifndef PANZER_PARAMETER_IMPL_HPP
12 #define PANZER_PARAMETER_IMPL_HPP
14 #include "PanzerDiscFE_config.hpp"
24 template<
typename EvalT,
typename TRAITS>
27 const std::string field_name,
33 this->addEvaluatedField(target_field);
36 param = panzer::createAndRegisterScalarParameter<EvalT>(parameter_name,param_lib);
39 std::string n =
"Parameter Evaluator";
44 template<
typename EvalT,
typename TRAITS>
49 auto param_val = param->getValue();
50 auto target_field_v = target_field.get_static_view();
51 auto target_field_h = Kokkos::create_mirror_view(target_field_v);
53 for (
int cell=0; cell < workset.num_cells; ++cell) {
54 for (std::size_t pt=0; pt<target_field_v.extent(1); ++pt)
55 target_field_h(cell,pt) = param_val;
57 Kokkos::deep_copy(target_field_v, target_field_h);
Sacado::ScalarParameterLibrary< panzer::EvaluationTraits > ParamLib
Parameter(const std::string parameter_name, const std::string field_name, const Teuchos::RCP< PHX::DataLayout > &data_layout, panzer::ParamLib ¶m_lib)
void evaluateFields(typename TRAITS::EvalData ud)