43 #ifndef PANZER_DOF_BASIS_TO_BASIS_IMPL_HPP 44 #define PANZER_DOF_BASIS_TO_BASIS_IMPL_HPP 48 #include "Intrepid2_FunctionSpaceTools.hpp" 49 #include "Phalanx_DataLayout_MDALayout.hpp" 50 #include "Intrepid2_Basis.hpp" 51 #include "Teuchos_Assert.hpp" 56 template <
typename EvalT,
typename TRAITST>
68 dof_source_coeff = PHX::MDField<ScalarT>(fieldName,sourceBasis.
functional);
69 dof_target_coeff = PHX::MDField<ScalarT>(fieldName,targetBasis.
functional);
71 this->addDependentField(dof_source_coeff);
72 this->addEvaluatedField(dof_target_coeff);
78 Teuchos::rcp_dynamic_cast<Intrepid2::DofCoordsInterface<Kokkos::DynRankView<double,PHX::Device> > >(targetBasis.
getIntrepid2Basis(),
true);
80 Kokkos::DynRankView<double,PHX::Device>intrpCoords =
81 Kokkos::DynRankView<double,PHX::Device>(
"intrpCoords",targetBasis.
cardinality(),targetBasis.
dimension());
83 coords_interface->getDofCoords(intrpCoords);
88 Kokkos::DynRankView<double,PHX::Device> basisRef =
91 sourceBasis.
getIntrepid2Basis()->getValues(basisRef, intrpCoords, Intrepid2::OPERATOR_VALUE);
97 Intrepid2::FunctionSpaceTools::HGRADtransformVALUE<double>(
basis,basisRef);
99 std::string n =
"DOF_BasisToBasis: " + dof_target_coeff.fieldTag().name();
104 template <
typename EvalT,
typename TRAITST>
108 this->utils.setFieldData(dof_source_coeff,fm);
109 this->utils.setFieldData(dof_target_coeff,fm);
113 template <
typename EvalT,
typename TRAITST>
117 dof_target_coeff.deep_copy(
ScalarT(0.0));
119 if(workset.num_cells>0) {
122 Intrepid2::FunctionSpaceTools::evaluate<ScalarT>(dof_target_coeff,dof_source_coeff,
basis);
void postRegistrationSetup(typename TRAITST::SetupData d, PHX::FieldManager< TRAITST > &vm)
DOF_BasisToBasis(const std::string &fieldName, const PureBasis &sourceBasis, const PureBasis &targetBasis)
Ctor.
int dimension() const
Returns the dimension of the basis from the topology.
Teuchos::RCP< Intrepid2::Basis< double, Kokkos::DynRankView< double, PHX::Device > > > getIntrepid2Basis() const
int numCells() const
Returns the number of cells in the data layouts.
Teuchos::RCP< const panzer::PureBasis > basis
Interpolates basis DOF values to IP DOF values.
void evaluateFields(typename TRAITST::EvalData workset)
Description and data layouts associated with a particular basis.
#define TEUCHOS_ASSERT(assertion_test)
Teuchos::RCP< PHX::DataLayout > functional
<Cell,Basis> or <Cell,Basis>
int cardinality() const
Returns the number of basis coefficients.