11 #ifndef __Panzer_DOF_Functors_hpp__
12 #define __Panzer_DOF_Functors_hpp__
14 #include "Phalanx_MDField.hpp"
15 #include "Phalanx_KokkosDeviceTypes.hpp"
22 namespace dof_functors {
24 template <
typename ScalarT,
typename Array,
int spaceDim>
38 PHX::View<ScalarT***> in_dof_ip,
40 bool in_use_shared_memory =
false)
48 KOKKOS_INLINE_FUNCTION
49 void operator()(
const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team)
const
51 const int cell = team.league_rank();
54 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
55 for (
int d=0; d<spaceDim; ++d) {
71 if (Sacado::IsADType<ScalarT>::value) {
80 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numFields), [&] (
const int& dof) {
86 for (
int dim=0; dim < spaceDim; ++dim) {
88 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
89 point_values(pt) = 0.0;
94 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
95 point_values(pt) += dof_values(dof) *
basis(cell,dof,pt,dim);
100 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
101 dof_ip(cell,pt,dim) = point_values(pt);
114 if (Sacado::IsADType<ScalarT>::value)
123 template <
typename ScalarT,
typename Array>
143 KOKKOS_INLINE_FUNCTION
157 template <
typename ScalarT,
typename Array,
int spaceDim>
172 PHX::View<const int*> in_offsets,
179 KOKKOS_INLINE_FUNCTION
183 for (
int d=0; d<spaceDim; d++) {
193 dof_ip(cell,pt,d).val() +=
dof_basis(cell, bf).val() * Sacado::scalarValue(
basis(cell, bf, pt, d));
201 template <
typename ScalarT,
typename Array>
216 PHX::View<const int*> in_offsets,
223 KOKKOS_INLINE_FUNCTION
KOKKOS_INLINE_FUNCTION void operator()(const unsigned int cell) const
KOKKOS_INLINE_FUNCTION void operator()(const unsigned int cell) const
PHX::View< const int * > offsets
PHX::View< const ScalarT ** > dof_basis
Kokkos::View< ScalarT *,typename PHX::DevLayout< ScalarT >::type, typename PHX::exec_space::scratch_memory_space, Kokkos::MemoryUnmanaged > scratch_view
PHX::View< const int * > offsets
PHX::Device execution_space
const bool use_shared_memory
size_t team_shmem_size(int) const
PHX::MDField< const ScalarT, Cell, Point > dof_basis
PHX::MDField< const ScalarT, Cell, Point > dof_basis
KOKKOS_INLINE_FUNCTION void operator()(const unsigned int cell) const
PHX::MDField< ScalarT, Cell, Point > dof_ip
EvaluateDOFFastSens_Scalar(PHX::MDField< const ScalarT, Cell, Point > in_dof_basis, PHX::MDField< ScalarT, Cell, Point > in_dof_ip, PHX::View< const int * > in_offsets, Array in_basis)
PHX::MDField< ScalarT, Cell, Point, Dim > dof_ip
PHX::Device execution_space
EvaluateDOFWithSens_Scalar(PHX::MDField< const ScalarT, Cell, Point > in_dof_basis, PHX::MDField< ScalarT, Cell, Point > in_dof_ip, Array in_basis)
KOKKOS_INLINE_FUNCTION void operator()(const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const
PHX::Device execution_space
PHX::MDField< const ScalarT, Cell, Point > dof_basis
PHX::View< ScalarT *** > dof_ip
EvaluateDOFWithSens_Vector(PHX::View< const ScalarT ** > in_dof_basis, PHX::View< ScalarT *** > in_dof_ip, Array in_basis, bool in_use_shared_memory=false)
EvaluateDOFFastSens_Vector(PHX::MDField< const ScalarT, Cell, Point > in_dof_basis, PHX::MDField< ScalarT, Cell, Point, Dim > in_dof_ip, PHX::View< const int * > in_offsets, Array in_basis)
PHX::MDField< ScalarT, Cell, Point > dof_ip