43 #ifndef PANZER_DOF_GRADIENT_IMPL_HPP 44 #define PANZER_DOF_GRADIENT_IMPL_HPP 49 #include "Intrepid2_FunctionSpaceTools.hpp" 55 template <
typename ScalarT,
typename ArrayT>
56 struct evaluateGrad_withSens {
57 evaluateGrad_withSens (PHX::MDField<ScalarT> dof_grad,
58 PHX::MDField<ScalarT,Cell,Point>
dof_value,
59 const ArrayT grad_basis) :
62 KOKKOS_INLINE_FUNCTION
70 for (
int d=0; d<spaceDim; d++) {
100 "DOFGradient: Basis of type \"" <<
basis->
name() <<
"\" does not support GRAD");
105 std::string n =
"DOFGradient: " +
dof_gradient.fieldTag().name() +
" ("+PHX::typeAsString<EvalT>()+
")";
128 if (workset.num_cells == 0 )
130 typedef decltype(this->wda(workset).bases[
basis_index]->grad_basis) ArrayT;
132 Kokkos::parallel_for(workset.num_cells, eval);
std::vector< std::string >::size_type getBasisIndex(std::string basis_name, panzer::Workset &workset, WorksetDetailsAccessor &wda)
Returns the index in the workset bases for a particular BasisIRLayout name.
std::string name() const
A unique key that is the combination of the basis type and basis order.
PHX::MDField< ScalarT, Cell, Point > dof_value_
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void operator()(const FieldMultTag< NUM_FIELD_MULT > &, const std::size_t &cell) const
PHX::MDField< ScalarT > dof_grad_
bool supportsGrad() const
PHX::MDField< ScalarT > dof_gradient
PHX_EVALUATOR_CTOR(BasisValues_Evaluator, p)
PHX_EVALUATE_FIELDS(BasisValues_Evaluator, workset)
PHX::MDField< ScalarT, Cell, Point > dof_value
Interpolates basis DOF values to IP DOF Gradient values.
Teuchos::RCP< const panzer::PureBasis > basis
Interpolates basis DOF values to IP DOF values.
PHX_POST_REGISTRATION_SETUP(BasisValues_Evaluator, sd, fm)