43 #ifndef PANZER_DIRICHLET_RESIDUAL_IMPL_HPP
44 #define PANZER_DIRICHLET_RESIDUAL_IMPL_HPP
53 template<
typename EvalT,
typename Traits>
58 std::string residual_name = p.
get<std::string>(
"Residual Name");
59 std::string dof_name = p.
get<std::string>(
"DOF Name");
60 std::string value_name = p.
get<std::string>(
"Value Name");
65 residual = PHX::MDField<ScalarT>(residual_name, data_layout);
66 dof = PHX::MDField<const ScalarT>(dof_name, data_layout);
67 value = PHX::MDField<const ScalarT>(value_name, data_layout);
69 this->addEvaluatedField(residual);
70 this->addDependentField(dof);
71 this->addDependentField(value);
73 std::string n =
"Dirichlet Residual Evaluator";
78 template<
typename EvalT,
typename Traits>
85 cell_data_size = residual.fieldTag().dataLayout().extent(1);
89 template<
typename EvalT,
typename Traits>
95 for (index_t i = 0; i < workset.
num_cells; ++i)
96 for (std::size_t j = 0; j < cell_data_size; ++j)
97 residual(i,j)=dof(i,j)-value(i,j);
T & get(const std::string &name, T def_value)
DirichletResidual(const Teuchos::ParameterList &p)
void evaluateFields(typename Traits::EvalData d)
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)