11 #ifndef PANZER_DOF_BASIS_TO_BASIS_IMPL_HPP
12 #define PANZER_DOF_BASIS_TO_BASIS_IMPL_HPP
16 #include "Intrepid2_FunctionSpaceTools.hpp"
17 #include "Phalanx_DataLayout_MDALayout.hpp"
18 #include "Intrepid2_Basis.hpp"
19 #include "Teuchos_Assert.hpp"
24 template <
typename EvalT,
typename TRAITST>
38 this->addDependentField(dof_source_coeff);
39 this->addEvaluatedField(dof_target_coeff);
44 Kokkos::DynRankView<double,PHX::Device>intrpCoords =
45 Kokkos::DynRankView<double,PHX::Device>(
"intrpCoords",targetBasis.
cardinality(),targetBasis.
dimension());
47 targetBasis.
getIntrepid2Basis<PHX::exec_space,double,
double>()->getDofCoords(intrpCoords);
52 Kokkos::DynRankView<double,PHX::Device> basisRef =
55 sourceBasis.
getIntrepid2Basis()->getValues(basisRef, intrpCoords, Intrepid2::OPERATOR_VALUE);
61 Intrepid2::FunctionSpaceTools<PHX::exec_space>::HGRADtransformVALUE(basis,basisRef);
63 std::string n =
"DOF_BasisToBasis: " + dof_target_coeff.fieldTag().name();
68 template <
typename EvalT,
typename TRAITST>
72 dof_target_coeff.deep_copy(
ScalarT(0.0));
74 if(workset.num_cells>0) {
77 Intrepid2::FunctionSpaceTools<PHX::exec_space>::evaluate(dof_target_coeff.get_view(),
78 dof_source_coeff.get_view(),
int cardinality() const
Returns the number of basis coefficients.
int dimension() const
Returns the dimension of the basis from the topology.
DOF_BasisToBasis(const std::string &fieldName, const PureBasis &sourceBasis, const PureBasis &targetBasis)
Ctor.
Teuchos::RCP< Intrepid2::Basis< PHX::Device::execution_space, double, double > > getIntrepid2Basis() const
int numCells() const
Returns the number of cells in the data layouts.
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>