11 #ifndef PANZER_DIRICHLET_RESIDUAL_IMPL_HPP
12 #define PANZER_DIRICHLET_RESIDUAL_IMPL_HPP
21 template<
typename EvalT,
typename Traits>
26 std::string residual_name = p.
get<std::string>(
"Residual Name");
27 std::string dof_name = p.
get<std::string>(
"DOF Name");
28 std::string value_name = p.
get<std::string>(
"Value Name");
37 this->addEvaluatedField(residual);
38 this->addDependentField(dof);
39 this->addDependentField(value);
41 std::string n =
"Dirichlet Residual Evaluator";
46 template<
typename EvalT,
typename Traits>
53 cell_data_size = residual.fieldTag().dataLayout().extent(1);
57 template<
typename EvalT,
typename Traits>
63 auto residual_v = residual.get_static_view();
64 auto dof_v = dof.get_static_view();
65 auto value_v = value.get_static_view();
66 auto local_cell_data_size = cell_data_size;
67 Kokkos::parallel_for (workset.
num_cells, KOKKOS_LAMBDA (index_t i) {
68 for (std::size_t j = 0; j < local_cell_data_size; ++j)
69 residual_v(i,j)=dof_v(i,j)-value_v(i,j);
int num_cells
DEPRECATED - use: numCells()
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)